cancel
Showing results for 
Search instead for 
Did you mean: 

Set JCO CLient via code

Former Member
0 Kudos

Hi All,

I need to use the same WD for several R/3 clients.

Is there a way that I could use several JCO reference and there for set the modeldata and the metadata reference that I need via code.

Regards,

Orlando Covault

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

There are tow options for JCO creations:

1: If you know at design time which JCO connections you want to use and that they are available on your system: create a Model for every connection.

2: If you want to create these connections dynamically change the JCO connection everytime you call your model like this:

IWDDynamicRFCModel model;

model = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(ModelName.class);

model.setJcoClient(connection)

--> continue calling code.

or:

model.setSystemName(<<JCO ClientName>>)

see: http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/modelimpl/dynamicrfc/IWDDynamicRF...

Also you can refer the blog from Anilkumar Vippagunta at

/people/anilkumar.vippagunta2/blog/2007/02/06/dynamic-jco-creation

regards

amit bagati

Former Member
0 Kudos

Thanks all for your suggestions,

I´ll tried some of them.

Regards,

Orlando Covault

nikhil_bose
Active Contributor
0 Kudos

follow this blog : how to create dynamic JCo creation

/people/anilkumar.vippagunta2/blog/2007/02/06/dynamic-jco-creation

You can use Dynamic JCo API

http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/modelimpl/dynamicrfc/IWDDynamicRF...

nikhiL

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

Using content administrator,RFC Model then you can not switch one JCO destinations to several clients.Instead you can use JCO API to acheive this when ever you require a connection create a method which takes client as a parameter and in the implementation create a jco connection object with the help of data passing to the method.Dynamically

switching clients is not possible as per my knowledge.

Regards

Kalyan