on 08-20-2004 12:26 AM
Hi - I am trying to pass a table to an RFC. No error on the RFC call - but no data is being passed in the table either...any recomendation on what I am missing - here is my code:
public String submitOrder(JCO.Table iTab, String iType) {
String errMsg = "";
JCO.Function function = null;
try {
functionRepository = new JCO.Repository("custCSM", sapConnection);
function = this.createFunction("Z_RFC_POST_IDOC_1");
function.getImportParameterList().setValue(iType, "BUILD_SHIP");
function.getTableParameterList().setValue(iTab, "ZIDOC_POST");
sapConnection.execute(function);
} catch (Exception e) {errMsg = "Submission had errors. Order not Submitted.";
e.printStackTrace();}
return errMsg;
}
many thanks - Janet
Hi Janet
I can give you a pointer here.
just plug in either of these calls just before the execute
function.writeXML("C:/call.xml");
(This will print out data you are trying to send in an XML file )
or
sapConnection.setAbapDebug(true);
(This will open a SAP gui with the Function Module in debug mode , you can then double click the table params to see if it is populated)
Regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janet
This is typically the way you populate table data , have you done it this way?
JCO.ParameterList jcoParamTab = jcoFunc.getTableParameterList();
JCO.Table jcoTab = jcoParamTab.getTable("<TABLEPARAM>");
jcoTab.appendRow();
jcoTab.setValue("<VALUE1>","<FIELD1>");
jcoTab.setValue("<VALUE2>","<FIELD2>");
Regards
Pran
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.