cancel
Showing results for 
Search instead for 
Did you mean: 

Client independent JCO connection

Former Member
0 Kudos

Hi,

as far as I understand creating a JCO connector via the WebDynpro content administrator requires a specific R/3 client.

Is there a way I can set the client dynamically during runtime of my WebDynpro application ?

Regards

Metin

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello Metin,

Client you can change with following (in case you are using adaptive RFC model. If it is not model but just JCo reference call WDSystemLandscape.getJCOClientConnection("NAME_OF_REFERENCE") to get a JCo.Client):


/*
Get JCo.Client from model class

wdContext.<ModelNode>Element().modelObject().modelInstance().getJcoClient();
*/
final JCO.Client client = ...
client.disconnect();
client.setProperty("jco.client.client", "100");
client.connect();

For me it seems to be ok from pooling perspective call disconnect and just after - connect (may be it is good idea to return client back to initial value after using). Experts, any doubts?

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi,

thanx for your help. As I have just found out its even possible to dynamically set the JCO.Client at runtime via ...modelInstance().setJCOClient(....).

Wonder whats the rationale behind that. Sure, its good to know you are flexible with your JCO connections. Guess, some WAS geek wouldnt go for administering all JCO connections via WebDynpro content administrator but rather provide connectivity to R/3 systems via JCA adapter and set them in some initializing code of his RFC models.

Cheers

Metin

former_member182372
Active Contributor
0 Kudos

Hello Metin,

It is possible even to pass JCo destination through URL parameter (sap.wdarfc.useSys). So, you have many options there to manage multiple data sources.

See links:

http://help.sap.com/saphelp_nw04/helpdata/en/af/84a34098022a54e10000000a1550b0/content.htm

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to use the web dynpro content administrator.pdf

Best regards, Maksim Rashchynski.

P.S.

Don`t forget to mark question as answered in case it is answered (it helps for further solutions searches) and reward points .

former_member182372
Active Contributor
0 Kudos

...

Doubled post. Administrators, please delete it.

Message was edited by: Maksim Rashchynski

Answers (0)