Hello Gurus,
I have seen several forums for this FM, I am also getting success message but data not reflecting in SU01 in destination clients. what could possibly be wrong.
Thanks in advance.
REFRESH i_logondata.
CLEAR i_logondata.
IF NOT i_file1-rfcdest IS INITIAL.
CALL FUNCTION 'ZS_FUNC_SECU_GLOBAL_USER' DESTINATION i_file1-rfcdest
IMPORTING
p_sysid = i_file1-sysid
TABLES
p_user = i_usr02
EXCEPTIONS
system_failure = 1 MESSAGE msg
communication_failure = 2 MESSAGE msg.
ENDIF.
READ TABLE i_usr02 WITH KEY mandt = i_file1-client
bname = i_file1-id.
IF sy-subrc EQ 0.
MOVE-CORRESPONDING i_usr02 TO i_logondata.
CONCATENATE i_file1-exp_date+6(4) "year
i_file1-exp_date+0(2) "month
i_file1-exp_date+3(2) "date
INTO i_logondata-gltgb.
APPEND i_logondata.
ENDIF.
*if they do update on that system using bapi_user_change
CALL FUNCTION 'BAPI_USER_CHANGE' DESTINATION i_file1-rfcdest
EXPORTING
username = i_file1-id
logondata = i_logondata
TABLES
return = i_bapiret2.
if sy-subrc eq 0.
COMMIT WORK.
read table i_bapiret2 index 1.
write:/ i_bapiret2-message, 'in system - ', i_bapiret2-SYSTEM.
endif.