Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM to set User validity

Former Member
0 Likes
4,078

Hi

Is there a functional module that I can use to set a user's 'Valid From' and 'Vaild Through' dates?

I'm using BAPI_USER_UNLOCK to unlock a user, but at the same time I would like to set the valid dates.

Edit: I noticed the FM BAPI_USER_CHANGE might help, but not sure which params to use there.

Tx

1 ACCEPTED SOLUTION
Read only

michael_kozlowski
Active Contributor
0 Likes
2,248

Use FM BAPI_USER_CHANGE. Try like this:

username = 'TEDDYTESTER'.

logondata-gltgv = valid-from.

logondatax-gltgv = 'X'.

logondata-gltgb = valid-to.

logondatax-gltgb = 'X'.

call function 'BAPI_USER_CHANGE'

     exporting

         username          = username

         LOGONDATA         = logondata

         LOGONDATAX        = logondatax

    tables

           return           = return .

2 REPLIES 2
Read only

0 Likes
2,248

Hi Patricio,

I have never used it; however, I believe that you can use BAPI_USER_CHANGE. See the LOGONDATA parameter.

Respectfully,

Brian

Read only

michael_kozlowski
Active Contributor
0 Likes
2,249

Use FM BAPI_USER_CHANGE. Try like this:

username = 'TEDDYTESTER'.

logondata-gltgv = valid-from.

logondatax-gltgv = 'X'.

logondata-gltgb = valid-to.

logondatax-gltgb = 'X'.

call function 'BAPI_USER_CHANGE'

     exporting

         username          = username

         LOGONDATA         = logondata

         LOGONDATAX        = logondatax

    tables

           return           = return .