Hi gurus,
Im new to this platform,as i want to upload purchase order from client programming ie from java to sap..but its creating 1 record.not multiple
header.add("COMP_CODE");
header.add("DOC_TYPE");
header.add("VENDOR");
header.add("PURCH_ORG");
header.add("PUR_GROUP");
//of this structure POHEADER.
JCoStructure headerx = function.getImportParameterList().getStructure("POHEADERX");
headerx.setValue("COMP_CODE","X");
headerx.setValue("DOC_TYPE","X");
headerx.setValue("VENDOR","X");
headerx.setValue("PURCH_ORG","X");
headerx.setValue("PUR_GROUP","X");
//of structure POHEADERX
and
poitemlist.add("PO_ITEM"); //of po_
poitemlist.add("MATERIAL");
poitemlist.add("PLANT");
// poitemlist.add("MATL_GROUP");
poitemlist.add("QUANTITY");
poitemlist.add("NET_PRICE");
co.setValue("PO_ITEM","10"); //of structure po_itemx
co.setValue("MATERIAL","X");
co.setValue("PLANT","X");
co.setValue("QUANTITY","X");
co.setValue("NET_PRICE","X");
in flat file they are iterating the input values using for loop
for (int i = 0; i < dataList.size(); i++) {
JCoStructure codes = function.getImportParameterList().getStructure("POHEADER");
/* JCoTable code2 = function.getTableParameterList().getTable("POITEM");
code2.appendRow();*/
ArrayList<String> listArray = dataList.get(i);
java.util.Iterator<String> iterator = listArray.iterator();
for (int j = 0; j < header.size(); j++) {
codes.setValue(header.get(j), iterator.next());
}
....but the problem is in 'X'.. for multiple record creation.
i hav to trigger the input values using the 'X' with multiple input values in coding which is poor performance...how can i use this in for loop.
please help.