on 05-29-2007 9:25 AM
Hi All,
Could any body provide me the code for to get username in my iView. means in textview button.
Try this:
IWDClientUser clientUser = WDClientUser.forceLoggedInClientUser();
com.sap.security.api.IUser sapUser = clientUser.getSAPUser();
String user = sapUser.getUniqueName();
wdContext.currentContextElement().set<context field that binded to textview>(user);
Don't forget to add 'com.sap.security.api.jar' to your project.
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Say you have a context attribute say <b>Username</b> defined in you context which holds the username value,use the following code to get the username.
String name = wdContext.CurrentContextElement.getUsername();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.