Code: Alles auswählen.
FUNCTION zbuch_user_shlp_exit.
TYPES: BEGIN OF ty_user_data.
TYPES: user TYPE usr02-bname,
full_name TYPE ad_namtext,
e_mail TYPE ad_smtpadr,
END OF ty_user_data.
DATA: lt_user_data TYPE TABLE OF ty_user_data.
DATA: ls_user_data TYPE ty_user_data.
FIELD-SYMBOLS: <fs_user_data> TYPE ty_user_data.
DATA: lt_userid TYPE TABLE OF usr02-bname.
FIELD-SYMBOLS: <fs_userid> TYPE usr02-bname.
DATA: ls_all_usr_data TYPE rsplppm_s_userdetails.
******************************************************************************
IF callcontrol-step = 'DISP'.
SELECT bname FROM usr02 INTO TABLE lt_userid.
IF ls_user_data-user <> <fs_user_data>-user.
MESSAGE E033(ZRUL_SAP_BIB) WITH '&' '&'.
ENDIF.
LOOP AT lt_userid ASSIGNING <fs_userid>.
CALL FUNCTION 'RSPLPPM_GET_USERDETAILS'
EXPORTING
i_user = <fs_userid>
IMPORTING
e_s_userdetails = ls_all_usr_data.
ls_user_data-user = ls_all_usr_data-uname.
ls_user_data-full_name = ls_all_usr_data-fullname.
ls_user_data-e_mail = ls_all_usr_data-email.
APPEND ls_user_data TO lt_user_data.
** IF user = ls_user_data-user.
** message e033(ZRUL_SAP_BIB) with zrul_besteller.
** ENDIF.
ENDLOOP.
record_tab[] = lt_user_data[].
EXIT.
ENDIF.
ENDFUNCTION.
Code: Alles auswählen.
FIELD meinfeld_uname SELECT * FROM usr02 WHERE bname = meinfeld_uname.