on 11-14-2006 3:05 PM
Hi,
I need to insert data into SAP. I am using Java connector.
mConnection = JCO.createClient("", "", "", "", "", "");
JCO.Function function = mRepository.getFunctionTemplate("BAPI_TRIP_CREATE_FROM_DATA").getFunction();
JCO.ParameterList input = function.getImportParameterList();
input.setValue("00000002","EMPLOYEENUMBER");
JCO.Structure framedata = input.getStructure("FRAMEDATA");
framedata.setValue("2006-11-08","DEP_DATE");
framedata.setValue("2006-11-09","ARR_DATE");
...
mConnection.execute(function);
JCO.releaseClient(mConnection);
This code works fine but I need to insert information about the trip which are stored in table TEXT. I insert the data into this table using this code:
JCO.Table table = function.getTableParameterList().getTable("TEXT");
table.insertRow(0);
table.setValue("first row text", "TEXTLINE");
table.setValue("0", "TEXTID");
table.insertRow(1);
table.setValue("second row text", "TEXTLINE");
table.setValue("1", "TEXTID");
But this code doesnt work. There is no error message but the Information field in SAP is empty.
Can anyone help
Thanks for your help
Ivo
Hi Ivo,
Try using table.appendRow() instead of insertRow(0)..pls let me know if it works,
cheers,
Lm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.