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

Sales Order Creation using BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
615

I am creating the SO through BAPI_SALESORDER_CREATEFROMDAT2 from SE37. After execution i am getting the Sales Order Number. Soon after that i am using BAPI_TRANSACTION_COMMIT. When i go to VA03 i am getting an error like " SD document <NUM> is not in the database or has been archived "

1 ACCEPTED SOLUTION
Read only

valter_oliveira
Active Contributor
0 Likes
441

Hello.

Like as have been said, you can create a program to do that.

However, you can do it in SE37 too. You cannot use BAPI_SALESORDER_CREATEFROMDAT2 and then BAPI_TRANSACTION_COMMIT separately. You must create a test sequece:

SE37->Function Module->Test->Test Sequencies (in menu area), inserting this two FM's.

Regards.

Valter Oliveira.

3 REPLIES 3
Read only

Former Member
0 Likes
441

do u using SE37 to create a SO with BAPI ?

a BAPI needs to be committed afterwards.

You have to use a report or something else to call the BAPI and afterwards the BAPI_TRANSACTION_COMMIT.

Read only

Former Member
0 Likes
441

I am creating the SO through BAPI_SALESORDER_CREATEFROMDAT2 from SE37. After execution i am getting the Sales Order Number. Soon after that i am using BAPI_TRANSACTION_COMMIT. When i go to VA03 i am getting an error like " SD document <NUM> is not in the database or has been archived "

if you are creating SO from se37 and calling BAPI_TRANSACTION_COMMIT also from se37 than it is totally isolated process each other.you must use a report program for that and call BAPI_TRANSACTION_COMMIT in report program.

Amit.

Read only

valter_oliveira
Active Contributor
0 Likes
442

Hello.

Like as have been said, you can create a program to do that.

However, you can do it in SE37 too. You cannot use BAPI_SALESORDER_CREATEFROMDAT2 and then BAPI_TRANSACTION_COMMIT separately. You must create a test sequece:

SE37->Function Module->Test->Test Sequencies (in menu area), inserting this two FM's.

Regards.

Valter Oliveira.