*** Check if user exists :
*** BAPI_USER_EXISTENCE_CHECK
call function 'BAPI_USER_EXISTENCE_CHECK'
exporting
username = p_user
importing
return = ls_return.
if ls_return-number = '124'.
" DOES NOT EXISTS
elseif ls_return-number = '088'.
" EXISTS
endif.
*** SUSR_USER_CHECK_EXISTENCE
call function 'SUSR_USER_CHECK_EXISTENCE'
exporting
user_name = user_name
exceptions
user_name_not_exists = 1
others = 2.
if sy-subrc EQ 0.
" EXISTS
endif.
No comments:
Post a Comment