cancel
Showing results for 
Search instead for 
Did you mean: 

Access user data for a system ???????

Former Member
0 Kudos

Hi All,

I have developed a <b>Web Dynpro application</b> which accesses a back end R/3 System.

The application works this way -

1) When the user has personalised the id pswd for the system it takes him directly to the home page

2) If the user has not personalised it gives him a customized login page

For running this Web Dynpro application on portal, I have created a System and in the iView i have given this system name

<b>

Problem Statement -</b>

It works fine if the user has mapped/personalized his information

But if he has not personalized the data, it asks him for the System ID Pswd (i.e. the portal standard screen which we get when we try to access the backend R/3)

After entering the credentials there, it gives the customized login page of my applicaton.

<b>Questions-</b>

1) If the user has not personalized data, how do i retrieve the id pswd from the portal standard login screen when accessing an R/3

Please help.

<b>Its really urgent.</b>

I have added the following piece of<b> code </b>in my Web Dynpro application -

***********************************************************

String sysalias = "SAP_R3";

try {

IWDClientUser clientUser = WDClientUser.getCurrentUser();

IUser user = clientUser.getSAPUser();

IUserMappingService umserv = (IUserMappingService) PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);

IUserMappingData umdata=umserv.getMappingData(sysalias,user);

String R3username=umserv.getR3UserName(sysalias,user);

Map map = new HashMap();

try {

umdata.enrich(map);

} catch (NoLogonDataAvailableException e1) {

e1.printStackTrace();

}

String userid = (String) map.get("user");

String passwd = (String) map.get("mappedpassword");

wdComponentAPI.getMessageManager().reportSuccess("userid = " + userid );

wdComponentAPI.getMessageManager().reportSuccess("pswd = " + passwd);

} catch (WDUMException e) {

e.printStackTrace();

}

***********************************************************

Thanks and Regards,

Samta Nichani.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

Please help.

Its urgent.

Thanks and regards,

Sam