on 10-15-2006 6:13 PM
Hi all,
I have a specific requirement to develope using Webdynpro. I want to programically display the list of users currently logged-in . Could some one help me . I promise to award points for the solution.
Thank you in advance
Regards
Maruti
Hi,
This procedure is for currently logged in user access.
You should add security.api.jar for UMFactory
Right click on your project name--->java buildpath ? Libraries>Add Variables --> Eclips home >Extend>Plugin-->com.sap.security_2.00 --> lib --> com.sap.security.api.jar .
Create Username and Email id context attributes. And Bind it with the UI elements like textview.
Write the below code in view implementation init method.
doinit method () implementation
try {
String firstName = WDClientUser.getCurrentUser().getFirstName();
String lastName = WDClientUser.getCurrentUser().getLastName();
String name = firstName + " " + lastName;
wdContext.currentContextElement().setUser(name);
ISearchResult rst = UMFactory.getUserFactory().getUniqueIDs();
IUser iuser = null;
while (rst.hasNext()) {
iuser =
UMFactory.getUserFactory().getUser(rst.next().toString());
if ((firstName.equalsIgnoreCase(iuser.getFirstName())) & (lastName.equalsIgnoreCase(iuser.getLastName()))) {
String emailId = iuser.getEmail();
wdContext.currentContextElement().setMailID(emailId);
}
}
} catch (WDUMException e) {
e.printStackTrace();
} catch (UMException ue) {
ue.printStackTrace();
}
Regards,
Saraswathi.
Pls reward points for useful information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maruti,
You need to add something called com.sap.security.api.jar file to the library of your project(It will be in SAP\JDT\eclipse\plugins folder). when you want access the UME APIs.
See this thread
/thread/99462 [original link is broken]
/thread/198332 [original link is broken]
Regards, Suresh KB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.