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: 

Get PERNR using SY-UNAME

Former Member
0 Kudos

Hi All,

How to find personnel number (PERNR )using SAP logon username(SY-UNAME)?

Please let me know your thoughts....

Thanks & Regards

Santhosh

5 REPLIES 5

Former Member
0 Kudos

Hi

You can use RP_GET_PERNR_FROM_USERID function module to get the pernr.

Give USRTY parameter = '0001' (SY-UNAME).

CALL FUNCTION 'RP_GET_PERNR_FROM_USERID'
EXPORTING
BEGDA = sy-datum
ENDDA = sy-datum
USRID = G_SYUNAME
USRTY = '0001'
IMPORTING
USR_PERNR = G_PERNR
EXCEPTIONS
RETCD = 1
OTHERS = 2

With Regards

Nikunj Shah

Former Member
0 Kudos

Hi,

use this FM,

RH_GET_PERSON_FROM_USER

regards,

storm

former_member188685
Active Contributor
0 Kudos

Go to the Table

PA0105

with subtype "0001"

with the value USRID = SY-UNAME

you will get the PERNR for the particular user.

Former Member

Get it from table USR21

0 Kudos

thank you.