Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI to Create Sales Order Return with Reference

iqra_khan2
Explorer
0 Kudos
4,340

Dear Experts,

We have issue in creating a return order referencing an invoice using BAPI. The BAPI creates the return order but the prices/items(Copy control) is not copied from the reference document(Billing doc) . Could you please advise.

Thank You.

2 REPLIES 2

VeselinaPeykova
Active Contributor
0 Kudos
842

You did not mention which bapi you use to create the return order - is it bapi_salesdocument_copy or bapi_customerreturn_create? Or is it something else? And does the process work correctly from VA01?

If it does not work from VA01 - speak with the functional consultant and troubleshoot together - most probably it will be either configuration or custom code in exits/pricing routines.

If it works from VA01, but not via BAPI:

If you use bapi_salesdocument_copy and you get different results than via VA01, I would investigate custom code in exits and routines if I were you.

If you use bapi_customerreturn_create, almost the same was asked less than a month ago by two developers and I know the SAP note by heart - read 370988 - BAPIs in SD: Creation with reference and also look at the example attached in the note.

0 Kudos
842

Hi.

Do you get the answer?

I have the same need. I want to use the bapi to create return order.

I have tested the bapi "BAPI_SALESORDER_CREATEFROMDAT2".But failed.

If you success to create order,please reply me. Thanks.