cancel
Showing results for 
Search instead for 
Did you mean: 

To obtain a password to a JCO client dynamically

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello Alex,

Check this

/thread/13806 [original link is broken]

/thread/6447 [original link is broken]

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Thanks Maksim, it solved the problem!

Alex

Answers (0)