cancel
Showing results for 
Search instead for 
Did you mean: 

How to build a WDynpro App without JCO destinations in the WAS

younes_talha
Explorer
0 Kudos

Hi,

I would like to configure my webdynpro application so as it can work with several R/3 servers. For this purpose instead of using JCO destinations of the WAS I would like to use JCO clients in the webdynpro code. My question is: how can I make a webdynpro application work without JCO destinations? (knowing that this app should connect to several R/3 systems).

Thanks,

Younes

Accepted Solutions (0)

Answers (2)

Answers (2)

younes_talha
Explorer
0 Kudos

HI,

Thanks pran for your link it was really helpfull.

I managed to change dynamically modeldata system name using "myModel.setSystemName("myModelDataJCODestination")" function in the webdynpro code. My problem is still not solved because I still need JCO Destinations to make my application works.

Moreover I didnot managed to change metadata and dictinary system name because there are no setters for these attributes in the java class mymodel.java. I have noticed that those fields are final attributes and can be only hard coded.

My two questions are:

+ Is there a way to build an application without specifying at all JCO destinations? Without configuring anything in the wd content administrator.

+ How can I change dynamically metadata and dictionary connection parameters? (Especially changing the language of metadata because in my application it changes from a user to the other)

thanks for answers,

Younes

Former Member
0 Kudos

Hi Younes

You can create the JCO.Client objects manually using the JCO.createClient api . This can be passed to the model object using the myModel.setJCOClient method. I believe this overrides the connection parameters defined in the model destination for that JCO.Client object. I havent tried it.

But I am still not sure of how you can override the connection parameters for the META_DATA destintion.

I can understand the requirement of user needing to switch to multiple SAP systems at runtime. But isnt the number of SAP systems defininte for an user probably 'n'.

I thing it would be a better practice to define those 'n' destinations and switch across them

Just out of curiosity what scenario requires the introduction of new SAP systems dynamically (I mean systems that originally werent even decided to be part of the application)

Regards

Pran

htammen
Active Contributor
0 Kudos

Hi Younes,

my suggestion is to write an EJB that uses JCO to connect to the different R/3 systems. You could pass the R/3 connection parameters to the EJB.

To use the model concept of Web Dynpro generate a web service for the EJB.

Regards

Helmut

Former Member
0 Kudos

Hi Younes

Isnt the number of R/3 servers you intend to connect to definite and finite , In which case you can define destinations for all the servers you need to connect to and dynamically get the model at runtime to switch to the required dstinations . check this post to find out how url parameters can help with the switch

Regards

Pran