cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Sales Order with Reference

adrian_baloaica
Explorer
0 Kudos
482

Hello everyone,

I am trying to copy a sales document and create another with the type 'RE2' but with a number that I choose.

For now what I am doing is using the bapi 'BAPISDORDER_GETDETAILEDLIST' to get the header details, items and partners of the referenced document, then I just map the columns and call 'BAPI_CUSTOMERRETURN_CREATE' in order to create the new sales document. I wonder if there is another way that I can just replicate the copy with reference action from VA01 but from code.

Please let me know if you have a better method to create a return order.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor

That are SAP suggestions of 370988 - BAPIs in SD: Create with reference: (there is a sample attached to the note)

adrian_baloaica
Explorer
0 Kudos

Thank you very much, using the attached code I could find out why I was getting the error "Price condition .. cannot be processed manually". The answer was using the parameter logic_switch of the function module. After doing the assignment lv_logic_switch-pricing = 'G' I don't get the error anymore.

Answers (0)