Skip to Content
0
Former Member
Nov 01, 2005 at 06:25 PM

To obtain a password to a JCO client dynamically

58 Views

Hi!

I'm with the following problem:

I am working in NWDS with a Portal Application, whose object is a DynPage. I have the following scenario: I need to do a R3 connection with a JCO client with the following parameters: client, user, password, lang, ashost, sysnr. The user(R3) I got dynamically with the following code:

String name = null;

IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

try {

// request is the actual PortalComponentRequest

IUser sapUser = request.getUser();

IUserMapping userMapping = UMFactory.getUserMapping();

Map map=null;

//UIDPW, SAPLOGONTICKET, SAP_R3_Cross, etc

name = userMapping.getR3UserName(sapUser,"SAP_R3_Cross",map,true);

}

catch (UMException e) {

e.getMessage();

e.printStackTrace();

}

As with the user, I need to obtain his password and follow to the JCO client creation method.

I have all others parameters.

JCOClient jcoClient = JCO.createClient(client, user, password(?), lang, ashost, sysnr);

Can you help me? If I cannot obtain this password, there is any other way to do this connection?

Best regards!

Alex