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: 

Function Module 'BAPI_SALESORDER_CHANGE' not working

Former Member
0 Kudos
242

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.

2 REPLIES 2

Former Member
0 Kudos
42

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.

Former Member
0 Kudos
42

We have already used the bapi 'BAPI_TRANSACTION_COMMIT' for commit purpose but still the delivery doenot get blocked.

Please suggest.