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: 

Simulate Sales Order

Former Member
0 Kudos

Hi,

I am trying to simulate a sales order creation using the function 'BAPI_SALESORDER_CREATEFROMDAT2' with TESTRUN = 'X'.

But i have a problem... i don't have a sales order number, because this is a simulation, but is that normal? How can i see the results of this simulation?

Please help.

Thanks

BR

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Yes it's ok, because the BAPI set the number only if u run it in effective way.

U have to check the result seeing the messages stored in RETURN parameter

Max

5 REPLIES 5

Former Member
0 Kudos

it dont generate Sales Order Number when u are running on simulation Mode.

Regards

Prabhu

Former Member
0 Kudos

Hi

Yes it's ok, because the BAPI set the number only if u run it in effective way.

U have to check the result seeing the messages stored in RETURN parameter

Max

0 Kudos

So... this function in TestRun only provide me information regarding the Return table right????

Also, if i use the BAPI_SALESORDER_SIMULATE, should i get any number or anything more??

My problem is that i need to simulate the VA01 transaction in a Z** transaction more easily to the users to use. So For example if you are creating a sales order by VA01 you can go to document flow, conditions tab, etc, before save the order, i mean before you have a sales order number.

How can i resolve this situation?

Thanks

BR

Former Member
0 Kudos

Hi Pati,

Check return parameter of BAPI.

return type BAPIRET2

It is having field <b>type</b> which will give

Message type: S Success, E Error, W Warning, I Info, A Abort

Rewad points if helpful.

Regards,

Hemant

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Ur used BAPI won't create order numbers.

Regards,

Sreeram