cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic JCOs for a WebDynpro development component

ashish_shah
Contributor
0 Kudos

Hi Experts,

I am developing a Development component in webDynpro, it is accessing a SAP R/3 RFC.

For now while creating a model to access the SAP R/3 RFC , i have specified the JCO names.

WD_MODELDATA_DEV , WD_RFC_METADATA_DEV

When this code will be moved to the Quality system and to the production systems, i want to change the name of the JCo dynamically.

( WD_MODELDATA_QUA , WD_RFC_METADATA_QUA and WD_MODELDATA_PROD , WD_RFC_METADATA_PROD )

Can you guys suggest how to achieve this?

Appriciate your help.

Regards,

Ashish Shah

Accepted Solutions (0)

Answers (4)

Answers (4)

ashish_shah
Contributor
0 Kudos

Hello Experts,

The idea is to create a JCO at Design time with these names:

WD_MODELDATA_

WD_RFC_METADATA_

Now whenever my code gets deplyoed to the development server, the JCO to be used at runtime should become

WD_MODELDATA_DEV

WD_RFC_METADATA_DEV

And for Quality system it should become

WD_MODELDATA_QUA

WD_RFC_METADATA_QUA

and so on.

Can anybody suggest how to do this?

Ashish Shah

Former Member
0 Kudos

Ashish. I'm still trying to understand your reasoning for wanting to do this. Would you take a minute to explain what you think this approach will do for you?

In my experience this would be very difficult and I really don't see any benefit but I could be missing something.

David.

ashish_shah
Contributor
0 Kudos

Hi David,

There are few reasons,

1) I want to check whether this is possible or not using webDynpro

2) I am trying to test the flexibility provided by JCo classes

3) I have such a requirement for one of the project.

Ashish Shah

Former Member
0 Kudos

Hello Ashish. Don't misunderstand my questions. I'm not saying you're wrong but I still don't understand WHY you have such a requirement for one of your projects.

What is confusing me is --- What is it that you (or whoever gave you the requirement) think will be accomplished by using different names for the JCO connection on different runtime systems? And why do you think that can't be accomplished by just using the same name for the JCO connections on each runtime system?

Based on my experience, this is not necessary. You can use the same name but just specify different parameters for the name on each runtime system.

David.

ashish_shah
Contributor
0 Kudos

Hello Guys,

I got some solution to my requirement from help.sap.com.

Mapping the used JCo destinations

The main reason to defined system defined JCo destinations is to provide the possibility to map at runtime the declared destination names to other ones. If you want to define such a mapping you have to call your Web Dynpro application with the following

URL parameter:

sap-wd-arfc-useSys=<DEFAULT_SYSTEM>:<SUFFIX_OF_MAPPED_SYSTEM>

The following URL starts the application FlightApp and maps the logical system WD_MODELDATA_DEST to the logical system WD_MODELDATA_DESTB20, as well as mapping the logical system WD_RFC_METADATA_DEST to the logical system WD_RFC_METADATA_DESTB20:

http://Yourhost:50000/webdynpro/dispatcher/local/Flight/FlightApp? 'sap-wdarfc-

useSys=WD_MODELDATA_DEST:B20&'sap-wd-arfcuseSys=

WD_RFC_METADATA_DEST:B20

Some remarks: the new system name used in the URL must begin with the previous system name and be at most 3 characters longer than the previous name. The full system name must be configured properly in the Web Dynpro Content Administrator. In the URL parameter, you must only use the suffix, not the full name. These restrictions were required to enforce security guidelines as well as to help keep URLs as short as possible.

Please keep in mind the following restrictions:

• You cannot change the mapping of destinations within a running application instance, i.e. concurrent access to different backend systems within an application instance is not possible.

• The JCo destination for application data MUST point to the same Technical System as the JCO destination used for getting the meta data. In other words, you cannot get your application data from one system (lets say "HRX") and configure the metadata to be fetched from a different system (lets say "CRM"). This will raise an exception because the metadata is inconsistent with the system you are fetching the data from.

If you require running an application against a different backend system than configured by default, then this is possible by specifying the alternative destination via URL parameter when starting the application.

Ashish Shah

Former Member
0 Kudos

Ashish,

Please go through this weblog.

/people/bertram.ganz/blog/2006/01/27/web-dynpro-adaptive-rfc--how-to-change-logical-system-names-after-model-import

Thanks!

Surya.

Former Member
0 Kudos

Ashish. Please don't take this response the wrong way. I'm not trying to say "Why do you want to do that?" in a condescending manner because I have heard that so many times when I've asked questions.

I'm just curious what is causing you to want to rename the tracks. From what I know, it seems that it would be really difficult to do what you want to do.

Are you trying to do this because you want to have different configurations for the JCOs on DEV, QA and PROD? If that is your only reason then you really don't need separate names. Since the JCOs are defined on each runtime system you can use the same name and specify different values on each runtime system.

David.

Former Member
0 Kudos

Ashish,

I agree what David says coming to the question "Why do you want to do that?"

May be we can come up with a better solution.

And also, these jco destination names are meant to be "logical", in the sense, one name and then should not matter if the destination backend changes so that you dont need to touch the code.

Regards,

Rajit

Former Member
0 Kudos