03-04-2011 9:36 AM
Hello ABAP experts,
how can I create a random SU01 user name which is not yet existing in a system?
I found function module SUSR_GENERATE_PASSWORD to create a new password, but couldn't find a FM to create a random SU01 user name.
Thanks and best regards,
Oliver
03-04-2011 10:01 AM
03-04-2011 10:30 AM
Hi,
For Mass creation of User Names you can use LSMW and do a recording.
You can go for BAPI_User_Create
Input Parameters you have to specify are Username, Logondata (valid from and valid until), Password and Address (Lastname).
This is also mentioned in the documentation which can be retrieved by using transaction Bapi.
Thanks
Arbind
03-04-2011 11:41 AM
You don't have a specific FM for user but you can use FM RANDOM_C_BY_SET.
CALL FUNCTION 'RANDOM_C_BY_SET'
EXPORTING
LEN_MIN = 12
LEN_MAX = 12
CHAR_MIN = 1
CHAR_MAX = 36
charset = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'
IMPORTING
RND_VALUE = username.
Depending on the chars you want in the user name you can include them in parameter charset.