on 11-15-2010 1:00 PM
Hi All,
My requirement is based on the company code drop down selection the user id drop down gets populated, these users are retreived from the portal ie I am using the below code:
IGroupFactory grpFactory = UMFactory.getGroupFactory();
IUserFactory usrFactory = UMFactory.getUserFactory();
IGroupSearchFilter grpSearchFilter = grpFactory.getGroupSearchFilter();
grpSearchFilter.setDisplayName(UserGroupDisplayname,1,false);
ISearchResult grpResult = grpFactory.searchGroups(grpSearchFilter);
while (grpResult.hasNext()) {
strGroupID = (String) grpResult.next();
}
grpInd = grpFactory.getGroup(strGroupID);
iterUsers = grpInd.getUserMembers(false);
ISearchResult userList = (ISearchResult)grpInd.getUserMembers(false);
wdContext.nodeUserList().invalidate();
IPrivateEasyPayAdminView.IUserListElement userElement = wdContext.nodeUserList().createUserListElement();
userElement.setUserId("");
userElement.setUserDisplayName("Please select a user");
wdContext.nodeUserList().addElement(userElement);
while(iterUsers.hasNext()){
strUserId = (String) iterUsers.next();
objUser = usrFactory.getUser(strUserId);
userElement = wdContext.nodeUserList().createUserListElement();
userElement.setUserId(objUser.getName());
userElement.setUserDisplayName(objUser.getName()"-"objUser.getDisplayName());
wdContext.nodeUserList().addElement(userElement);
}
But when we were creating user groups in portal I was successfully able to retreive the users but now our requirement is tht users will be maintained in R/3 and now this code for one company code I am getting array out of bound error and for another I am only getting one entry tht is the one I hard coded Select a user.
Thank you
Regards,
Preet
Hi,
I believe, there exists some standard function module to retrieve the User list maintained in R/3
Please check the function module to get the user list - SO_USER_LIST_READ
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Preet,
Based on company code you need users in the second dropdown, if it is coming from R/3 then you have a RFC which will get the company code and exports the user in the table, bind the table to the drop down by index.
On changing the company code you need to call the RFC, so that users will get change.
I hope it clears your query.
Regards
Nizamudeen SM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.