2007 May 21 2:30 PM
Respective to one sales order we need to block its delivery.
We have used the function module 'BAPI_SALESORDER_CHANGE'
In this we are sending the following in its exporting parameters:---
1.) SALESDOCUMENT----
salesdocument Number
2.) ORDER_HEADER_IN------workarea of type BAPISDH1 and in its "dlv_block" field, the value of delivery block is passed.
3.) ORDER_HEADER_INX-----workarea of type BAPISDH1X and in its "updateflag" field the value 'U' is passed and in its "dlv_block" field the value 'X' is passed.
Though the function module executes successfully (i.e. sy-subrc = 0) but on checking the sales document it is found that its <u>delivery has not been blocked</u>.
Also the function module returns the following messages in its "return parameter"
1.) ORDER_HEADER_IN has been processed successfully
2.) Purchase order number in document number: 351 already exists
3.) Standard Order 351 has been saved
Where 351 is our salesdocument Number.
where did we go wrong.Please help.
2007 May 21 2:39 PM
Hi
From the FM documentation
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
2007 May 22 5:31 AM
We have already used the bapi 'BAPI_TRANSACTION_COMMIT' for commit purpose but still the delivery doenot get blocked.
Please suggest.