05-21-2006 11:02 PM
Hello,
Im 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.
05-22-2006 8:13 AM
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