‎2007 Apr 23 7:22 PM
Has anyone had success in using this BAPI to create a user of Type Dialog AND have the password Deactivated? This can be done via BDC, but runs too lenghty. Searches for other 'Deactivate PSWD' results in Delete PSWD only.
The end result should be 'Logon Data' tab in SU01 displays 'Password Deactivated' after user is created as type 'Dialog.'
Any suggestions?
‎2007 Apr 23 9:18 PM
Thanks Bhaskar,
I actually resolved this by following the BAPI_USER_CREATE1 with BAPI_USER_CHANGE.
The FM's are as follows:
CALL FUNCTION 'BAPI_USER_CREATE1'
EXPORTING
username = username
logondata = logondata
password = password
defaults = defaults
address = address
ref_user = roles_ref_usr
alias = alias
TABLES
parameter = parameters
return = t_return.
Then call...
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = username
logondata = logondata
logondatax = logondatax
TABLES
return = t_return.
Note the following fields that need to be set in both LOGONDATA and LOGONDATAX:
MOVE: 'X' TO logondata-codvn.
MOVE: 'X' TO logondatax-codvn.
The BAPI_USER_CREATE1 has the codvn in LOGONDATA but no structure (importing) for LOGONDATAX which was the problem.
FYI: LOGONDATA and RETURN are the same structure in both FM's so adding the BAPI_USER_CHANGE is simple.
Thanks for your quick reply and suggestion.
Regards,
Sam