‎2010 Mar 08 9:37 PM
Hello Gurus,
I have a requirement to create a sales order with reference to multiple orders. I have used BAPI_SALESDOCUMENT_COPY to create the first order with reference to the original order, saved this order and then modify this order with the data from the remaining orders (by reading the data from the order using BAPI_SALESORDER_GETDETAILBOS). This is turning out to be very complicated as we are using BOM and I have to change the item number and the higher line item number of subsequent order data that I am including in the merged order.
Is there a better way of doing this? Is there a BAPI/Function Module available to create a sales order with reference to multiple orders?
Any help or pointers to achieve this requirement will be helpful to me.
Thanks in advance.
Thanks,
Sandeep
‎2010 Mar 08 9:48 PM
Why not use BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2. Also see note 93091.
Rob
‎2010 Mar 08 9:55 PM
Thanks Rob. We have the copy controls set so we will need the data to be transferred from the original document to the copied document.
In Createfromdat1 or createfromdat2, where do I specify multiple referenced orders?
As an example if I have the following orders in my system:
Order 1000 line 10
Line 20
Line 30
Order 2000 Line 10
Line 20
Now I need an order which has the line items from both these orders:
Order expected: Line 10
Line 20
Line 30
Line 40 which is Line 10 of order 2000
Line 50 which is Line 20 of order 2000
‎2010 Mar 08 10:01 PM
I don't think you do in this case. You are creating, not copying orders. If you must copy, then I guess you have to stick with what you've got. But I don't think the functionality is there to copy from multiple orders.
Rob