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: 

how can i receive the user name of the present operating system

Former Member
0 Kudos

HI,all.

how can i receive the user name of the present operating system from SAP.Have any funciton to use?Thankyou!

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello

If you are already on SAP release >= 6.20 then I recommend to use fm RFC_GET_SYSTEM_INFO.

Regards

Uwe

6 REPLIES 6

former_member181995
Active Contributor
0 Kudos

use sy-uname system field.

report ztest.

write:sy-uname.

thanks.

reward if solved.

0 Kudos

What I need is the user name of the computer, not a user name of SAP.thankyou!

0 Kudos

Hi,

there is probably many ways to do this - but I usually use function module ICF_SYSTEM_INFO because most I my coding uses the ICF.

Cheers

Graham Robbo

0 Kudos

A computer usually has no user name!

I guess you want to know the name of user exeuting the sap services on operating system level, don´t you?

uwe_schieferstein
Active Contributor
0 Kudos

Hello

If you are already on SAP release >= 6.20 then I recommend to use fm RFC_GET_SYSTEM_INFO.

Regards

Uwe

Former Member
0 Kudos

use object:

CL_GUI_FRONTEND_SERVICES

with method

ENVIRONMENT_GET_VARIABLE

The variable would be username if your limit yoruself for windows.