‎2006 Feb 11 11:58 AM
Hi, all.
Now i try to use BAPI to create order,following is part of my codes:
function=this.createFunction("BAPI_SALESORDER_CREATEFROMDAT2 ");
JCO.ParameterList input = function.getImportParameterList();
JCO.ParameterList table = function.getTableParameterList();
JCO.Structure ORDER_HEADER_IN = input.getStructure("ORDER_HEADER_IN");
ORDER_HEADER_IN.setValue("TA","DOC_TYPE");
ORDER_HEADER_IN.setValue("3000","SALES_ORG");
ORDER_HEADER_IN.setValue("10","DISTR_CHAN");
ORDER_HEADER_IN.setValue("00","DIVISION");
JCO.Table ORDER_PARTNERS = table.getTable("ORDER_PARTNERS");
ORDER_PARTNERS.setValue("SP","PARTN_ROLE");
ORDER_PARTNERS.setValue("3250","PARTN_NUMB");
JCO.Table ORDER_ITEMS_IN = table.getTable("ORDER_ITEMS_IN");
ORDER_ITEMS_IN.setValue("P104","MATERIAL");
ORDER_ITEMS_IN.setValue("10","ITM_NUMBER");
I ha already setup "ORDER_HEADER_IN"`s parameters.
But i still can`t create an order successfully.
And i got two message:
1.Plz enter sold-to party or ship-to party
2.Sales documents was not changed.
Can anyone help me solve this situation?
‎2006 Feb 11 12:33 PM
hi Louis,
Checkout the link..,
http://www.henrikfrank.dk/abapexamples/Java/sapjava_createsalesorder.htm
hope it helps..,
regards,
Vinoth
‎2006 Feb 11 12:33 PM
hi Louis,
Checkout the link..,
http://www.henrikfrank.dk/abapexamples/Java/sapjava_createsalesorder.htm
hope it helps..,
regards,
Vinoth
‎2006 Feb 11 1:03 PM
‎2006 Feb 11 2:04 PM
HI,
Have you made entries in the ORDER_HEADER_INX, ORDER_ITEMS_INX for each eantries in the ORDER_HEADER_IN, ORDER_ITEMS_IN.....
Check out the documentatoin of the FM in transaction SE37 to use how to use the FM.
Thanks,
Renjith
‎2006 Feb 11 4:24 PM
Hi,Renjith.
Can you tell what is ORDER_HEADER_INX`s functionality?
I already try to use ORDER_HEADER_INX and not to use.
There is no defference between them.
I still can create an order successfully.
Thx~~~ ^^
by Louis