cancel
Showing results for 
Search instead for 
Did you mean: 

Return order w.r to billing doc. using BAPI_SALESDOCU_CREATEFROMDATA

Former Member
0 Kudos

Hi

Please any one help , when we use BAPI_SALESDOCU_CREATEFROMDATA to create Return order w.r to billing document it is not copying all the discount condtion values into Return orders. Ex. if some discount given for stock orders from that the customer returns some of the items it is not deducting stcok order discount from the return order because of this ending up paying more to the customer what he paid while purchasing.

We try to use BAPI_SALESORDER_CREATEFROMDAT2 insted of using BAPI_SALESDOCU_CREATEFROMDATA but still we are facing same issue.

thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

We used the BAPI 'BAPISDORDER_GETDETAILEDLIST' to get the data and and then pass it sales order creation BAPI-SD_SALESDOCUMENT_CREATE

this is Use new function SD_SALESDOCUMENT_CREATE according to OSS Note 370998

  • OSS Note 370998;

  • 1. Collect data (Pricing Condition types and values) using

  • BAPISDORDER_GETDETAILEDLIST.

  • 2. Prepare/Adjust data for Interface parameters/tables

  • 3. Create Sales Doc. using BAPI_SALESORDER_CREATEFROMDAT2.

  • 4. Do BAPI COMMIT.

Jelena
Active Contributor
0 Kudos

How did you manage to create a return (RE) with those BAPIs? There is a separate BAPI for the returns - BAPI_CUSTOMERRETURN_CREATE.

However, we had similar issues with the pricing conditions not copying from the referenced document. We handled this by copying the conditions in the program before starting BAPI.