Skip to Content
0

JCo server called from SAP GUI

Dec 07, 2017 at 01:08 PM

60

avatar image

I need to implement a java program which acts as a RFC server, which resides on a client PC. When the user uses an application through SAP GUI, the program on their PC will be executed and will receive RFC requests.

My program gets executed from SAP GUI, but fails to receive RFC requests and the RFC call from SAP ends on a timeout.

This is how I create the JCo server in java:

Properties properties = loadConfigPropertiesFromFile();

Environment.registerDestinationDataProvider(new RfcDestinationDataProvider(properties));
Environment.registerServerDataProvider(new RfcServerDataProvider(properties));

JCoServer jcoServer = JCoServerFactory.getServer(properties.getProperty(ServerDataProvider.JCO_PROGID));

// register function handler factory to server (omitted for brevity)

jcoServer.start();

This is the content of properties:

# Server
jco.server.connection_count=2
jco.server.gwhost=/H/gd9.company.com
jco.server.progid=Z_TEST_PROGRAM
jco.server.gwserv=sapgw02
jco.server.repository_destination=LOCAL_EXEC_POS_HCTERM5

# "Client"
jco.client.lang=en
jco.destination.peak_limit=10
jco.client.client=001
jco.client.sysnr=02
jco.destination.pool_capacity=3
jco.client.ashost=/H/gd9.company.com
jco.client.user=USER
jco.client.passwd=password
jco.client.dest=LOCAL_EXEC_POS_HCTERM5

I also noticed, that my program gets called with the following command line arguments:

/H/gd9.company.com sapgw02 87945336 IDX=4

The first two are obviously the gateway destination and port. But what are the other two? Should I use them to configure the RFC server in some way?

Is this even a correct way to start / configure the JCo server or do I have to do it differently? Thanks.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers