‎2006 Jul 11 4:00 PM
I would like to create a sales order with reference to an existing SO but should not have any reference to the existing order. for ex. if I create a new sales order XYZ with reference to SO# ABC, I could see "ABC" is referenced in document flow of "XYZ".
Is there any simple way I could copy sales order without reference. Basically, I need to write a BDC program for which the input is reference SO numbers.
Your ealier response is much appreciated.
Regards
Kasi
‎2006 Jul 11 4:09 PM
You can try using
BAPISDORDER_GETDETAILEDLIST to get all the information from Sales Order ABC, and then use BAPI_SALESORDER_CREATEFROMDAT1
Note:- If you do not populate ORDER_HEADER_IN-REF_DOC (Document number of the reference document), i think it will not update document flow.
Inadvertently typed BAPI_SALESORDER_SIMULATE instead of BAPISDORDER_GETDETAILEDLIST.
Message was edited by: Naresh Ganesan
‎2006 Jul 11 4:09 PM
You can try using
BAPISDORDER_GETDETAILEDLIST to get all the information from Sales Order ABC, and then use BAPI_SALESORDER_CREATEFROMDAT1
Note:- If you do not populate ORDER_HEADER_IN-REF_DOC (Document number of the reference document), i think it will not update document flow.
Inadvertently typed BAPI_SALESORDER_SIMULATE instead of BAPISDORDER_GETDETAILEDLIST.
Message was edited by: Naresh Ganesan
‎2006 Jul 11 5:34 PM
I am not able to use BAPI_SALESORDER_SIMULATE to get data from original sales order. It is expecting all information to be entered into internal tables. please let me know how to get all information by just entering existing sales order number.
‎2006 Jul 11 5:55 PM
I think you don´t need to use BAPI_SALESORDER_SIMULATE.
You could only use BAPI_SALESORDER_CREATEFROMDAT1 to create de new SO and populate ORDER_HEADER_IN-REF_DOC with your existing sales order number.
Regards.
‎2006 Jul 11 5:59 PM
The "_SIMULATE" BAPI will not do anything to meet your needs.
I would suggest getting the existing order's details using BAPISDORDER_GETDETAILEDLIST. You must enter the sales order number of the existing sales order into int table SALES_DOCUMENTS.
Then pass this info into BAPI_SALESORDER_CREATEFROMDAT1 to create new SO and populate ORDER_HEADER_IN-REF_DOC accordingly.
‎2006 Jul 11 6:01 PM
I did the same but the new order has reference to the old order. I dont want to do that. I want to create the new order which should look similar to the old one but should not have any reference to the old one.
‎2006 Jul 11 6:06 PM
Do not place a value into ORDER_HEADER_IN-REF_DOC. Leave it empty.