Code: Alles auswählen.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = user
* logondata = ls_logondata
* logondatax = ls_logondatax
* password = pwd
generate_pwd = abap_true
passwordx = 'X'
IMPORTING
generated_password = generated_pwd
TABLES
return = lt_return.
COMMIT WORK.
"Change Password Status so it doesnt have to be renewed
UPDATE usr02 SET
pwdinitial = 0
pwdstate = 2
WHERE bname = user.
IF sy-subrc <> 0.
MESSAGE 'Fehler bei änderung des User Stamms' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.