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: 

SD Simulate with BAPI_SALESDOCUMENT_COPY

Former Member
0 Kudos

Hello,

I’m using the function module <b>BAPI_SALESDOCUMENT_COPY</b> to create a sales order with reference to a prior sales order.

This function module can be used in simulation mode (flag <b>testrun</b>) to simulate before create the order.

After simulation the function module has no interface to return the results.

Are the data stored in an internal buffer? Is it possible to get the simulated results from the buffer by using other SD function module?

Thank you for your info in advance.

Best regards,

Kurt.

1 REPLY 1

nishanthbhandar
Contributor
0 Kudos

BAPI_SALESDOCUMENT_COPY calls SD_SALES_DOCUMENT_COPY to create the sales order with reference.If this is the data that you are looking for then simply call this FM to know the simulated results.The data simulated through SD_SALES_DOCUMENT_COPY will not get saved unless the FM SD_SALES_DOCUMENT_SAVE is called.This is the logic that is being followed in the BAPI_SALESDOCUMENT_COPY.

For a testrun you would not be able to fetch the data.

<i>Reward helpful answers</i>

Cheers

Nishanth