cancel
Showing results for 
Search instead for 
Did you mean: 

Access System mapped id pswd in WEB DYNPRO appln ???????

Former Member
0 Kudos

Hello All,

I have created a Web Dynpro application where in I need to access the system mapped id and password in my Web Dynpro code

The code is as follows -

String sysalias = "SAP_Reference_System";

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();

}

I have added the following JARS in my project

1) saaj-api.jar

2) usermapping_api.jar

3) prtapi.jar

4) security.api.jar

Also in the Project Web Dynpro -> Service References -> have added the following entry

The project builds fine.

However gives the following warning during deployment -

server ID <b>15709251:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application ''local/test'' for startup. Reason=Clusterwide exception: Failed to start dependent service ''PORTAL:sap.com/com.sap.portal.usermapping'' of application ''local/test''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?</b>

Please help. Its really urgent.

Thanks in advance,

Samta

Message was edited by:

samta nichani

Message was edited by:

samta nichani

Accepted Solutions (1)

Accepted Solutions (1)

former_member182294
Active Contributor
0 Kudos

Hi,

Check this thread /message/463945#463945 [original link is broken], this will solve your problem.

Regards

Abhilash

Answers (0)