[绝对原创] SAP Get User data by User ID
1, Table
Go to table USR21 and get the person number, then use that person number number go to ADRP
2, View
view V_USR_NAME is a view over the USR21 and ADRP tables
3, Function module
You can alternatively use SUSR_USER_ADDRESS_READ.The exporting parameter user_address would have the full name of the user in the field name_text.
DATA: user_address LIKE addr3_val.
CALL FUNCTION 'SUSR_USER_ADDRESS_READ'
IMPORTING
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
EXPORTING
user_address = user_address
* USER_USR03 =
EXCEPTIONS
user_address_not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
write:/ user_address-name_text.
ENDIF.