on 06-10-2014 9:59 AM
Hi experts,
I need to enable/disable a text field in web dynpro depending on the user's employee type based in LDAP.
The problem is, I do not know how to pull this data since I do not know the attribute name for the employee type in LDAP.
Is there a way I could find the attribute name for this in web dynpro?
If not, how would I know this?
By the way, this is how I pulled the user's data in LDAP. But I can't pull the data for employee type since I do not know its attribute name! :
IUser l_currentUser = WDClientUser.getCurrentUser().getSapUser();
String l_loginUser = l_currentUser.getUserAccounts()[0].getLogonUid();
String l_userRegion = l_currentUser.getAttribute("com.sap.security.core.usermanagement","ExtRegion")[0];
Thanks in advance for the help!
Regards,
Vey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patralekha,
I tried this one but I get a java.lang.NullPointerException.
StringBuffer result = new StringBuffer();
for (int i = 0; i < parameter1.length; i++) {
result.append( parameter1[i] );
}
String mynewstring = result.toString();
wdContext.currentCtx_vn_EAttributeElement().setCtx_va_EAttribute(mynewstring);
What seems to be the problem?
Regards,
Vey
Hi Patralekha,
Upon checking the UME Configuration,
I was able to get this:
<principal type="user">
<nameSpaces>
<nameSpace name="com.sap.security.core.usermanagement">
<attributes>
<attribute name="employeeType">
<physicalAttribute name="employeeType"/>
</attribute>
...
Here is the code I used to get the attribute:
String l_userAtt = l_currentUser.getAttribute("com.sap.security.core.usermanagement","employeeType")[0];
wdContext.currentCtx_vn_EAttributeElement().setCtx_va_EAttribute(l_userAtt);
But upon trying to get this specific attribute, I still get the NullPointerException...
Thanks and Regards,
Vey
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.