Application Development and Automation 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: 
Read only

user name in the program

Former Member
0 Likes
1,201

hi guys,

may i know how to program the code to retrieve the current user ID who are using the program.

for example, i need code in SAP script, for cheque printing, that the user who performed the cheque print, will have his name on the cheque, as "prepared by". so how am i going to do so?

appreciate the help. thanks

5 REPLIES 5
Read only

Former Member
0 Likes
1,071

Hi,

Use system Field SY_UNAME. It picks the current user ID.

Best regards,

raam

Read only

Former Member
0 Likes
1,071

You can try using the system variable SY-UNAME

Read only

Former Member
0 Likes
1,071

Hi,

Use system field SY-UNAME.....It will take the current user ID.

Goto the table SYST to get all the system fields.

Reward if helpful.

Thanks.

Read only

Former Member
1,071

Hi

U can also use the method below in addition to the variable sy-uname.

data: l_user type sy-uname.

l_user = CL_ABAP_SYST=>GET_USER_NAME( ).

Reward if found useful.

Thanks

Prakash Ghantasala

Read only

pole_li
Active Participant
0 Likes
1,071

Hi,

Use SY-UNAME.

Btw, You can use SE11 to browse structure SYST to get all the system fields.

Regards,

Pole