on 09-26-2007 5:54 PM
Hello all,
We're having the request to make a ABAP to Java call.
I did all the stuff to call the RFC Program:
sm59 jco destination with program id
a java program connecting to the sap system with program id
a rfc with two int4 importing parameters and a char10 parameter.
when running the java program and executing the function on the rfc destination the java program reacts obviously, telling me that it is invoked, but all parameters are empty. the ints are 0 and the text is empty string "".
Even when I print the function as html all parameters are empty, initial...
Anybody seen this before?
cheers
Stefan
Hello Stefan
some erros i can think of:
- restart Java application (to get new repository)
- Problems with client connection for repository
- RFM not activated (old version active)
could you please post some source code for further details
regards
Franz
reward points if useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for paying attention
Can you tell me what RFM is? never heard
Some source:
Here are my two classes involved:
First Example
is instantiating the connection and contains the main method. it creates three instances of a JCO.Server instance, all sap parameters are in properties fileRfcService
is the JCO.Server instance. it gets the call of the function, but as I mentioned parameters are empty...output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
output.setValue("This is a response from MyFirstServer","RESPTEXT");
}
}
public void serverExceptionOccurred(Server arg0, Exception e) {
e.printStackTrace();
}
public void serverErrorOccurred(Server arg0, Error e) {
e.printStackTrace();
}
}
properties:
jco.client.ashost=morgan
jco.client.client=400
jco.client.sysnr=00
jco.client.user=x000000054
jco.client.passwd=sbu
jco.client.lang=de
1. Daten der Inbound-Connection (ashost/gwhost und sysnr/gwserv korrespondieren ...)
jco.server.gwhost=morgan
jco.server.gwserv=sapgw00
jco.server.progid=MARES_AE
thats all,
thanks
Stefan
Hello
RFM means Remote Function Module (Remotefähiger Funktionsbaustein)
Java coding looks ok, maybe there is a problem with the client connectin for getting the function metadata
try something like this inside class FirstExample aufter you the line where you create the repository, to see if client connection is ok
IFunctionTemplate ftemplate = repository.getFunctionTemplate("RFC_SYSTEM_INFO");
JCO.Function function = ftemplate.getFunction();
JCO.Client client = JCO.getClient(POOLNAME);
client.execute(function);
function.writeHTML("c:jcoTest2.html");
regards franz
reward points if useful
Hi,
well What is the issue with RFM? is there anything I have to set to use the modern way?
I printed out the result of the RFC_SYSTEM_INFO as xml, probably you can see something bad, don't bother the different names, I tried on another server with the same result
<?xml version="1.0" encoding="UTF-8"?>
<RFC_SYSTEM_INFO>
<OUTPUT>
<CURRENT_RESOURCES>12</CURRENT_RESOURCES>
<MAXIMAL_RESOURCES>15</MAXIMAL_RESOURCES>
<RECOMMENDED_DELAY>0</RECOMMENDED_DELAY>
<RFCSI_EXPORT>
<RFCPROTO>011</RFCPROTO>
<RFCCHARTYP>4103</RFCCHARTYP>
<RFCINTTYP>LIT</RFCINTTYP>
<RFCFLOTYP>IE3</RFCFLOTYP>
<RFCDEST>muccocnetecs_ECS_04</RFCDEST>
<RFCHOST>muccocne</RFCHOST>
<RFCSYSID>ECS</RFCSYSID>
<RFCDATABS>ECS</RFCDATABS>
<RFCDBHOST>muccocnetecs</RFCDBHOST>
<RFCDBSYS>ORACLE</RFCDBSYS>
<RFCSAPRL>700</RFCSAPRL>
<RFCMACH> 390</RFCMACH>
<RFCOPSYS>Linux</RFCOPSYS>
<RFCTZONE> 3600</RFCTZONE>
<RFCDAYST>X</RFCDAYST>
<RFCIPADDR>10.40.192.74</RFCIPADDR>
<RFCKERNRL>700</RFCKERNRL>
<RFCHOST2>muccocnetecs</RFCHOST2>
<RFCSI_RESV></RFCSI_RESV>
<RFCIPV6ADDR>10.40.192.74</RFCIPV6ADDR>
</RFCSI_EXPORT>
</OUTPUT>
</RFC_SYSTEM_INFO>
Yesterday I configured the jco rfc service so that a ejb is called for inbound rfc request, and using that, all parameters were passed correctly
thanks so far
Stefan
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.