cancel
Showing results for 
Search instead for 
Did you mean: 

Calling JCO RFC Server program from JCO RFC client

Former Member
0 Kudos

Hi,

I have an RFC registered server program which implements JCO.Server. It seems to be working fine, when called from SAP.

For testing purposes, I was trying to write a JCO client program which would take the place of the SAP client.

This program opens a connection to the RFC server and executes a function e.g.

JCO.Client client = JCO.createClient("xx.yy.com", "sapgw35", "MYPROGID");

client.connect();

client.execute(function);

The RFC server program receives the call fine, when I test with a simple function which has no table parameters. However when I tried a more complex function with table parameters, I get an serverExceptionOccurred from the RFC server program:

com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: connection closed without message (CM_NO_DATA_RECEIVED)

at com.sap.mw.jco.rfc.MiddlewareRFC$Server.nativeListen(Native Method)

at com.sap.mw.jco.rfc.MiddlewareRFC$Server.listen(MiddlewareRFC.java:1368)

at com.sap.mw.jco.JCO$Server.listen(JCO.java:6805)

I have tried to initialize the repositories in both server and client programs correctly, so that the function is in the cached function list and the table structures in the cached structures list before the function is invoked. But I am not sure if there is still something I am missing, so any ideas would be welcome.

Thanks,

Richard

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have the same problem.

I can setValue into the ParameterList, but when I excute the function , it throws an JCO.Exception : connection closed without message (CM_NO_DATA_RECEIVED)

The BAPI I run in the SAP Client is quite well,but why cann't run in my Java code?

I really need help,thx

Former Member
0 Kudos

JCO example 5 is a very good one for server side programming.

try the example,somethings you 'd better make clear.

1) JCO.server

2) repositories--data mapping

3) parameters: export import,table...

further topic:

1) JCO pool

2) tRFC,qRFC

After you have success in Client side programming,try example 5.

Regards

Former Member
0 Kudos

could you tell me more about it?

thank you very much

Former Member
0 Kudos

hi,

first download the JCO package from

https://service.sap.com/connectors

If you do not have logon user, ask your basis or your manager.

If you need personal help, mail me: ionwang@gmail.com

I

Regards