‎2008 Jul 14 3:21 PM
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
‎2008 Jul 14 3:24 PM
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
‎2008 Jul 14 3:24 PM
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
‎2008 Jul 14 3:24 PM
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
‎2008 Jul 14 3:36 PM
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