cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone generated server proxy on XI box??

Former Member
0 Kudos

Has anyone generated server proxy on XI box?? Is it possible?

Karma

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi Karma,

<i>

Has anyone generated server proxy on XI box?? Is it possible?</i>

What is the purpose of doing this ? First of all proxy is used in the Application systems. not in the XI box.

For more about Proxy-

http://help.sap.com/saphelp_nw2004s/helpdata/en/91/de56456be146e791bf88188306aa57/frameset.htm

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Hey,

We have a z table created in the xi box, and we want to write some abap code to access this z table. Is it possible to create xi server proxy within the xi box to execute the abap code??

Thanks for you help.

Karma

moorthy
Active Contributor
0 Kudos

Hi,

I think, you can achieve this using JCO Call or RFC Lookup functions.

1) Create a RFC in the XI box, call this thru JCO call from the Mapping. Write the ABAP code in the RFC to access the Z table create in the XI.

http://help.sap.com/saphelp_nw2004s/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/frameset.htm

2) RFC lookup functions-

/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

/people/michal.krawczyk2/blog/2005/09/15/xi-rfc-mapping-lookups-from-bc-to-xi

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

The reason why we don't want to use JCO code in the mapping is that we don't want to hardcode the connection variables to the SAP system. We would have to hardcode all of the connection parameters to the different XI systems :-Dev,QA,Prd.

Is there a way to configure jco without hardcoding the connection parameters for all the three environments?

Thanks again.

Karma

moorthy
Active Contributor
0 Kudos

Hi Karma,

<i>Is there a way to configure jco without hardcoding the connection parameters for all the three environments?</i>

You can do this without Hardcoding in the JCO call. Because you are going to Connect to ABAP stack of XI box right? So you can get this info like IP address,System ID, etc from the Exchange Properties/file of the XI box. SO no need of Hard coding this info.

You need to write 2/3 lines of code to get this system info in the JCO call.

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

How do we do this? Is there a step by step guide for this?

Thanks again.

Karma

moorthy
Active Contributor
0 Kudos

Karma~

Here you go with SAP Help for the JCO Connection with example-

http://help.sap.com/saphelp_nw04/helpdata/en/35/42e13d82fcfb34e10000000a114084/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm

/people/tarun.telang2/blog/2005/10/03/debugging-a-rfc-call-using-jco-api-part-2

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Hi Krishna,

Your answers are helpful. We could create an a property file and load it into our jco code, and connect to SAP. This is the jco code:

import com.sap.mw.jco.*;

import java.io.*;

import java.util.Properties;

...

Properties sapProperties = new Properties();

sapProperties.load(new FileInputStream("c:/dev/workspace/busptr/sap.properties"));

JCO.Client connection = JCO.createClient(sapProperties);

...

connection.disconnect();

Since, Exchange Profile already contains all the connection parameters, can we just get these parameters from Exchange profile and connect to SAP, without having to create the property file. It seems like you said it is possible, and we just need 2-3 lines to do this in our jco code. What are the 2-3 lines? Is there an API for Exchange Profile??

Your help is greatly appreciated.

Thanks again.

Karma

moorthy
Active Contributor
0 Kudos

Hi Karma,

There are gethostname and getclientname methods in JCO calls. SO you can use this. So for this no need of storing in a properties file and read it.

Check these links to retrieve the dynamic values of the XI box- There are many methods on the same

http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.Client.html

http://help.sap.com/saphelp_nw04/helpdata/en/35/42e13d82fcfb34e10000000a114084/content.htm

Storing in a properties file and accessing the same is another way of doing the same.

http://searchsap.techtarget.com/general/0,295582,sid21_gci1108075,00.html

Regards,

Moorthy

Former Member
0 Kudos

Hi Krishna,

Thanks for your prompt repsonse. Aren't gethostname and getclientname methods used for JCO.Client instances? But, don't we need following info to instantiate a jco.client?

jco.client.client="100"

jco.client.user="userid"

jco.client.passwd="password"

jco.client.lang="en"

jco.client.sysnr="00"

jco.client.ashost="mysaphost"

jco.client.trace="1"

jco.client.idle_timeout=1

Only after instantiating a jco.client we can use these methods.

My question is: What is the best way of getting above info to instantiate a JCO.Client??

Correct me if I am not following right. Or, is there a global jco.client that has been instatiated??

Thanks for your help.

Karma

moorthy
Active Contributor
0 Kudos

Hi Karma,

As you are connecting to the XI ABAP box, and you are executing JCO connection from the Same XI box. So getSystemName method will give you the underlying system information. ie, reason I have provided the JCO APIs help.

Just try it once. Because I have done long back. If I get code , I will forward you.

Regards,

moorthy

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

yes

it is possible all you have to do is

to use another clinet on the XI box

that's the only way

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>