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: 

SD_SALESDOCUMENT_CREATE

Former Member
0 Kudos

The function module SD_SALESDOCUMENT_CREATE is used to create a sales order.Now in order to to create the sales order I am using the statement COMMIT WORK to create the sales order but this is throwing a Runtime Error: COMMIT_IN_POSTING.How do I create a sales order and update it in the database without using the COMMIT WORK statement.Please suggest some other method

1 ACCEPTED SOLUTION

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Use BAPI BAPI_SALESORDER_CREATEFROMDATA for this.

Any BAPI will not do commit work on its own.

Call FM BAPI_TRANSACTION_COMMIT to update the data base after checking return table for errors(If u don't have any)

Thanks,

Vinod.

Edited by: Vinod Reddy Vemuru on Jul 14, 2008 7:57 PM

3 REPLIES 3

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Use BAPI BAPI_SALESORDER_CREATEFROMDATA for this.

Any BAPI will not do commit work on its own.

Call FM BAPI_TRANSACTION_COMMIT to update the data base after checking return table for errors(If u don't have any)

Thanks,

Vinod.

Edited by: Vinod Reddy Vemuru on Jul 14, 2008 7:57 PM

Former Member
0 Kudos

Hi

It's not possible, u need to COMMIT WORK: why don't u use the BAPI BAPI_SALESORDER_CREATEFROMDAT2 (it calls the fm SD_SALESDOCUMENT_CREATE)? o try to check how that BAPI calls fm SD_SALESDOCUMENT_CREATE).

Max

Former Member
0 Kudos

Hi Kunal.

I would like to suggest,

BAPI_SALESORDER_CREATEFROMDAT2 .

You can then use, Instead of commit_work.

BAPI_TRANSACTION_COMMIT.

Also, I suggest you to go throught these references:

[SDN - Reference for Creating a sales order by BAPI|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Edited by: Harsh Dave on Jul 14, 2008 8:07 PM