cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine the username via scripting?

former_member195355
Participant
0 Kudos
485

Hello,

Is it possible to determine the username via SAP Personas scripting?

My aim is to retrieve the username when a user logs into SAP, utilize it to determine their personnel number, and subsequently display the user's basic SAP HR information on the SMEN screen.

Any guidance, assistance, or suggestions would be greatly appreciated.

Thank you!

View Entire Topic
Damean
Active Contributor

Should be able to use session info library to get the detail; sample statement as below:

var user = session.info.user;

// returns current USER

eedens
Participant

I've previously built out a flavor for HR using PA20. Here's a couple RFC's that may be useful for getting additional HR info:

PAD_EMPLOYEE_HIREDATE_GET

BAPI_USR01DOHR_GETEMPLOYEE

smarchesini
SAP Champion
SAP Champion
0 Kudos

The solution does not work in S/4HANA Cloud