cancel
Showing results for 
Search instead for 
Did you mean: 

Update TRDAT of LOGON DATA

takashiootake
Explorer
0 Kudos

Hi Everyone,

I want to unlock user & password reset automatically as a lot of such request come to our SAP maintenance team every day. I found useful FM for user unlock and initialize password. They work to satisfy my requirement. 

BAPI_USER_UNLOCK --> Unlock user

BAPI_USER_CHANGE --> Set initial password

However I need to update last logon date ( TRDAT ) of USR02 as background job is running on our system. It is designed to check last logon date ( TRDAT ) of all dialog users except system users and if user has not logged on SAP system over 30 days, locks user. It is running on 7:00 AM everyday.

So I need to update ( set same date as sy-datum ) TRDAT after unlock & password initialized.  

As mentioned in below note changing TRDAT of USR02 seems to be prohibited & there is no FM to do it.

    "2718543 - Can the fields from USR02 table be modified?"

2718543 - Can the fields from USR02 table be modified? - SAP for Me

 

When user try to logon by initial password, system prompts to change password. At this point, TRDAT will be updated.  So I imagine there is possibility to update TRDAT using logon simulating FM.

Is there any idea ? 

Sandra_Rossi
Active Contributor
0 Kudos

Don't update it, full stop. Good thing that this SAP note exists, although it is a technical restriction, I would consider that the login information should NEVER be altered by a program or another user, I consider it at the same privacy level that the password should not be known by administrators. Instead, you should review the logic of your custom program.

EDIT: why not storing the date in a custom table?

View Entire Topic
takashiootake
Explorer
0 Kudos

I found out FM which enable to update TRDAT same as sy-datum. However as updating TRDAT is prohibited by attached note officially. I refrain to do it. 

Thank you.

Sandra_Rossi
Active Contributor
0 Kudos
If you want to change anything about security, you should contact SAP Consulting.