cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to read windows variables ?

Former Member
0 Kudos

Hi,

I create a webdynpro view - there is a UIElement where

i want to insert the Username from the windows variables automatically ?!

Thanks in Advance.

Regards

Anilkumar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Are you referring to the windows environment variable USERNAME?

If so, you can certainly not read it from the client machine...

What do you try to achieve? You might want to point your UME against your user store (LDAP) so that you can reuse your windows domain user?

Thanks

Bruno

Former Member
0 Kudos

Hi,

How can i point UME to a userstore (LDAP) ?

Basically i want to read the logged in user name(Like i027746 or D023489 )

Regards

Anilkumar

sid-desh
Advisor
Advisor
0 Kudos

Hi Anil,

You can use the UME api's to read the user id. There is a weblog also on this. You can use the code below to read the user id.

<i>IWDClientUser user = null;

try

{

user = WDClientUser.getCurrentUser();

}

catch(Exception ex)

{

/* Exception Handling */

}

IUserAccount[] accounts = user.getSAPUser().getUserAccounts();

if ( accounts!= null && accounts.length >= 1)

{

String username = (String) accounts[0].getLogonUid();

}</i>

Hope this is helpful.

Regards

Sidharth

Former Member
0 Kudos

Correctly formulated question is a half of an answer...

1. What is "windows variables"?

2. What is exact type of UIElement?

VS