on 09-06-2006 7:32 PM
Hi,
in my WebDynpro application I need to fetch the R/3 username of the currently logged in user to put it in a input structure of a BAPI. The application is executed in EP. The R/3 usernames are mapped to the portal users.
Is it possible to retrieve the R/3 username (used for login to SAPGUI) from UME? If not...is there another solution for this scenario?
Thanks in advance.
Regards
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
thanks for your helpful answer.
I have tried the following code to fetch the R/3 username:
IUserMapping userMapping = UMFactory.getUserMapping();
Map map = null;
try {
String name = userMapping.getR3UserName (sapUser, "RE2", map, true);
m.reportSuccess("R3 Username: " + name);
} catch (UMException e) {
m.reportSuccess(e.toString());
}
But this code returns the portal username.
There are problems to retrieve the SystemLandscapeObjects, this line returns a empty arraylist.
ArrayList list = UMFactory.getSystemLandscapeWrappers();
Is there something wrong with our configuration, what to do to resolve this issues.
Thanks in advance.
Regards
Sebastian
Hi Sebastian,
In case your code is in EJB you can use "run-as". Check http://help.sap.com/saphelp_nw04/helpdata/en/60/bbfc3eea4d2e5ae10000000a114084/frameset.htm
Instead of "carCustomer" and "customer" specify "administrators".
Best regards, Maksim Rashchynski.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.