Application Development and Automation 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: 
Read only

Simulate Sales Order

Former Member
0 Likes
2,795

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
Read only

Former Member
0 Likes
1,499

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
Read only

Former Member
0 Likes
1,499

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

Regards

Prabhu

Read only

Former Member
0 Likes
1,500

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

Read only

0 Likes
1,499

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

Read only

Former Member
0 Likes
1,499

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

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,499

Hi

Ur used BAPI won't create order numbers.

Regards,

Sreeram