on 09-29-2008 10:57 AM
Hi Experts,
I have a little problem with my Java application. I want to transfer data from JAVA to ABAP. If I do that only with a String everything works fine. But now I want to fill a table in ABAP with table sets out of my JAVA application and here I don't know how to do that.
Do anybody of you know how to do that? A example would be very helpful. Thank you for your help in advance.
Some informations about the application:
I have an RFC connection between JAVA and ABAP. I am using the Java Connector to listen to that connection. In ABAP I have a RFC compatible function module.
Greetings, Alexander
Hi,
You can try the foll:
// Get a function template from the repository
IFunctionTemplate ftemplate = repository.getFunctionTemplate("ZGS_TEST_RFC");
// if the function definition was found in backend system
if(ftemplate != null)
{
// Create a function from the template
JCO.Function function = ftemplate.getFunction();
// Get a client from the pool
client = JCO.getClient(SID);
// Fill in input parameters
JCO.Table input = function.getTableParameterList().getTable("T_INPUT");
input.appendRow();
input.setRow(0);
input.setValue( "test1", "ZSTR1");
input.setValue( "test2", "ZSTR2" );
input.appendRow();
// Call the remote system
client.execute(function);
// Get output parameters
JCO.Table output = function.getTableParameterList().getTable("T_OUTPUT");
int num = output.getNumRows();
// Call the remote system
}
Let me know if you face any issues.
Regards,
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.