on 11-23-2004 4:27 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Correctly formulated question is a half of an answer...
1. What is "windows variables"?
2. What is exact type of UIElement?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.