Problem solve Get help with specific problems with your technologies, process and projects.

Get the full name of a user

Sometimes we need to present a welcome message to the users.

Sometimes we need to present a welcome message to the users. Instead of saying "welcome" followed by sy-uname,...

it would be nicer if we use the full name of user as set by him/her in his profile. e.g. . Here is the code to get the full name. The code was written in version 4.7 and should work in 4.6B and above,


DATA: l_user_data TYPE soudatai1,
      l_user TYPE soudnamei1,
      l_fullname type SO_ADRNAM.

* give the logged on user id
  l_user-sapname = sy-uname.

* get the user data
  CALL FUNCTION 'SO_USER_READ_API1'
    EXPORTING
      user      = l_user
    IMPORTING
      user_data = l_user_data.

* get the user full name
  l_fullname = l_user_data-fullname.

This was last published in March 2003

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close