Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM input: uname and output: last name and first name

Former Member
0 Kudos

Hi Experts,

Can you please tell me a function module which takes uname as input and gives last name and first name of user as output.

Thank you.

Regards,

Admir.

Points will be rewarded.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


DATA: WA_NAME_FIRST LIKE ADRP-NAME_FIRST,
      WA_NAME_LAST  LIKE ADRP-NAME_LAST.

SELECT SINGLE NAME_LAST NAME_FIRST 
INTO (WA_NAME_LAST, WA_NAME_FIRST)
FROM USER_ADDR
WHERE BNAME = SY-UNAME.

WRITE: / WA_NAME_LAST, WA_NAME_FIRST. 

Regards,

Ferry Lianto

5 REPLIES 5

Former Member
0 Kudos

use v_usr_name database view

0 Kudos

how to use this view?

Former Member
0 Kudos

FM : BAPI_USER_GET_DETAIL

former_member583013
Active Contributor
0 Kudos

Use USR21 to get the PERSNUMBER and then FM ADDR_SELECT_ADRC_SINGLE to get info...

Greetings,

Blag.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


DATA: WA_NAME_FIRST LIKE ADRP-NAME_FIRST,
      WA_NAME_LAST  LIKE ADRP-NAME_LAST.

SELECT SINGLE NAME_LAST NAME_FIRST 
INTO (WA_NAME_LAST, WA_NAME_FIRST)
FROM USER_ADDR
WHERE BNAME = SY-UNAME.

WRITE: / WA_NAME_LAST, WA_NAME_FIRST. 

Regards,

Ferry Lianto