Thanks Julius,
there is only one way for lock date to be a blank field but admin lock still set
Didn't get your point!
And this program is not to lock/unlock the IDs, this is for ID review.
System automatically locks all the inactive Ids after 30 days (Condition#1 - If last logon date is sy-datum-30, put admin lock and enter valid through date as sy-datum) - First program using BAPI
System automatically deletes the locked Ids (condition#1 - lock mode = admin lock, condition#2 - Valid through date is sy-datum-10) - Second program using BAPI.
One solution we found to fix this is - Put one more condition in deletion script that valid through date = sy-datum-10 AND NE 00.00.0000, so that it won't delete the IDs with valid through date as 00.00.0000
Regards,
Nick Loy