cancel
Showing results for 
Search instead for 
Did you mean: 

passing parameters through Single JCo to different systems

Former Member
0 Kudos

I have created a web dynpro application and integrated into a portal, which access R/3 using a JCo destination and retrieves the data using a BAPI.

But I want to integrate the same application into another portal, which would access the different R/3 system having the same function module.

Is there any way for switching between two Jco destinations as the same application could be made to work for both the systems?

Please suggest me as I am stuck up with this issue.

Thanks for your response; the thing is the portals are sharing the same landscape.

Is there any other way to achieve switching of the JCO destinations even on the same landscape?

You have the same application but want to connect to different JCos.

I think you will be creating two WD iViews for the same application. In the application properties do the following:

Use the following url parameter to the application URI

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

In the default system you can change your JCo destination name

Please suggest me .

Thanks

Lohi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

1. You can change the JCO Connections at runtime for multiple client.

JCO.Client client= JCO.createClient(

<client>,

<User>,

<Password>,

<language>,

<SystemIP>,

<SystemID>);

// TODO: Connect the JCO

client.connect();

// TODO: Bind Jco Connection to the Model Class

<BAPI_NAME_MODEL> getModel = (<BAPI_NAME_MODEL>)com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory.getModelInstance(<BAPI_NAME_MODEL>.class,WDModelScopeType.TASK_SCOPE);

See this Thread

//Do the binding

// Do the execute

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mukesh,

Thanks for your response.

Where can I implement this code.

For connect the JCO at runtime in the Dynpro Application running in portal

Thanks

Lohi

Former Member
0 Kudos

Hi

Do this code before you execute the BAPI.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mani,

Thanks for your response.

And one more problem we are facing.

Now our application needs to be deployed on different systems with different JCo connection names, for this we have passed a parameter Sap-wd-arfc-useSys in the URL defining the new Jco Connection name .

for example we have created the application on Jco connection name ABC_DEST and we have passed the parameter value ans ABC_DESTLHP in the URL.

This ABC_DESTLHP JCO Connection is defined on the that particular system where we have deployed the application.

It was working fine When we were using one application and one component But it is not working with case of two applications and two components.

We are using inter applciation navigation to pass the parameters from first application to second application.

The parameters being passed are captured from the URL and that is creating the problem as the URL is being changed dynamically when capturing the parameters.

So Please let us know is there any way we could define the Jco Connection name in the program itself.

Or else if you could provide me your number that would be great help (If you are in US or India) .

Thanks in advance

Lohi

Former Member
0 Kudos

Hi

Try this

From the Predefind JCO you can also make the connection

IWDJCOClientConnection clientCon = WDSystemLandscape.getJCOClientConnection("<WD_RFC_METADATA_DEST>");

JCO.Client client= clientCon.getClient();

client.connect();

NOTE:

This will work under same R/3 and Different clients.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mukesh ,

We have differnt R/3 and different clients. the application what we developped is on development server different R/3 and we are deploying different R/3 quality server.

We are passing parameters through URL Then developmet server displaying the error like Jco destination is not found.

Advise me

Thanks in advance

Lohi

Former Member
0 Kudos

Hi

Can you confirm that One Quality system connect with only one R/3 System or different R/3 Systems.

If onle Quality system maitain with one R/3 means there is no problem with this code.(ie) (RFC_METADATA_DEST and RFC_MODELDATA_DEST point to the same R/3)

Kind Regards

Mukesh

Former Member
0 Kudos

Hi,

One Quality system connect with different R/3 Systems.

Please suggest me how to do this.

Thanks,

Lohi

Former Member
0 Kudos

Hi Lohi,

Now i am getting Same Requirement. Please let you know how to do this codeing.

I can use JCOu2019s from Diff Systems.here my doubt is how to write codeing in init(). By using user Group.

For Exaple.

XYZ User Belongs to India. XYZ User longin into the Portal he will connect to India ECC System. So that we can write Some doing in init().

ABC User Belongs to North America.ABC User longin into the Portal Depending upon user group. He will connect the ECC NA System.

Here what I am thinkg is.

If(user is avaliable in INDIA user group)

{

Here we will Pass to the INDIA ECC System Details. Means we are able to Connect the ECC System. I think here we can pass Client and MODEL Date and META Data Details

}

else if (user is avaliable in USA user group))

{

Here we will Pass to the USA ECC System Details. Means we are able to Connect the ECC System. I think here we can pass Client and MODEL Date and META Data Details .

}

I am thing like this. Is it Possible to develop the codeing in Init()

Regards

Vijay K

Former Member
0 Kudos

Hi,

Have a look at this thread

Regards

Saravanan K