cancel
Showing results for 
Search instead for 
Did you mean: 

UME and R/3 username

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Sebastian,

Check

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

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

Former Member
0 Kudos

Any hints on that issue???

Thank you very much in advance.

Regards

Sebastian

former_member182372
Active Contributor
0 Kudos

Hi Sebastian,

Is your code running by authorized user (Administrator)?

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

the code is running by an authorized user, but this user does not have administrator privileges. Is that mandatory for this task? How to implement that without hardcoding an administrator password?

Thanks in advance.

Regards

Sebastian

former_member182372
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Maksim,

unfortunately the result is the same as before. Any other hints? Thanks for the support.

Regards

Sebastian