Get Fullname of SAP user using ABAP Function Module
ABAP developers frequently require to print user names on reports or SAP Smart Form documents. Programmers can use ABAP function module SO_USER_READ_API1 to read SAP user fullname by passing the SAP user code instead of using a SAP user name table. Passing SAP username as import parameter to the SO_USER_READ_API1 function module will return users full name (first name, middle name and last name) in the export structure.
Here is a sample ABAP program showing how to use SO_USER_READ_API1 ABAP function module to read SAP user fullname.
If the SAP user code is not provided, the below sample ABAP report will return the full name of the user who is running the program.
Above ABAP program will write first name and the last name of the SAP user whose SAPuser code is passed as import parameter to the SO_USER_READ_API1 ABAP function module and returned in fullname field of the user_data export structure.