on 12-20-2007 5:11 PM
Im just trying to insert some data to the JCO.table ,
// Get table parameters
JCO.ParameterList parameters = function.getTableParameterList();
// Post Event Header info to SAP
JCO.Table docTable = parameters.getTable("DOCTABLE");
int k = getMultipleDocsForm.getDocs().size();
System.out.println("k Size -
>" + k);
// TODO Refractor hard codings.
for(int i=1;i<=k;i++){
//docTable.appendRow()
//docTable.setRow( docTable.getRow() + 1);
//docTable.insertRow(i);
docTable.setValue("","MANDT");
docTable.setValue("1231232","DOKAR");
docTable.setValue("A","DOKNR");
docTable.setValue("0","DOKVR");
docTable.setValue("000","DOKTL");
docTable.insertRow(i);
}
// Call the remote system
System.out.println("Before Executing the SAP");
client.execute(function);
System.out.println("After Executing the SAP");
But it is not getting inserted .
Im new to JCO , can any one help me in this ?
Function func = getDefaultJCoConnection().getJCoFunction(FUNCTION MODULE NAME);
func.getImportParameterList().getField(IMPORTPARAMETER).setValue(VALUE);
Table table = func.getTableParameterList().getTable(TABLENAME);
productTable.appendRow();
productTable.setValue(VALUE1,FIELDNAME1);
productTable.setValue(VALUE2,FIELDNAME2);
getDefaultJCoConnection().execute(func);
Follow this code and send parameters through table to an RFC
Regards,
Sateesh Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.