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: 

Reg:BAPI_SALESORDER_CREATEFROMDAT2,BAPI_SALESORDER_SIMULATE

Former Member
0 Kudos

Hi,

I would like to create a Sales Order in test mode.That means i need to create the sales order in Simulation mode, here my question is if i use the BAPI_SALESORDER_CREATEFROMDAT2(in test mode) or BAPI_SALESORDER_SIMULATE, to simulate the slaes order how to read the pricing data? Because here its not creating any order number.

Is there any way to pick this pricing data from buffer. Even i tried function module RV_PRICE_PRINT_GET_BUFFER, but this also requires the order number.

Thanks In Advance,

Regards

1 REPLY 1

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

I would give BAPI_SALESORDER_SIMULATE a try: there is a table parameter ORDER_CONDITION_EX for condition output. Of course you won't find any order numbers - they are only created and saved, when you NOT use a test / simulation function.

If you don't get enough output of this FM, then use BAPI_SALESORDER_CREATEFROMDAT2. Fill also a user exit (e.g. trigger prepare save) - here you might have access to the filled VBAP-structure and you can read the material price. You can export / import or use a own function module with global variables to move the information to your calling program.

Regards,

Christian