on 11-12-2014 7:48 PM
Hi friends,
I am using BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT to remove delivery block from an Order.
We are updating the below parameters and then calling the bapi.
st_header_change-dlv_block = ' '.
st_header_change_x-updateflag = 'U'.
st_header_change_x-dlv_block = 'X'.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = v_salesdocument
order_header_in = st_header_change
order_header_inx = st_header_change_x
TABLES
return = t_return.
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc <> 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
But it's still wrong...
The field keeps the same value.
Thanks in advance.
Willian.
Hi William,
Have you solved this issue ? I'm facing the same result.
Thank you,
Marius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marius!
Yes! I solved it...
The code below is correct, but in my case there was a wrong code in include MV45AFZZ... this code was changing the value of the field "dlv_block" again, after my update (BAPI_SALESORDER_CHANGE).
Please check if exist some code in any include (EXIT SD) that can change the value of this field after your update.
.................................................
clear: st_header_change,
st_header_change_x.
st_header_change-dlv_block = space.
st_header_change_x-updateflag = 'U'.
st_header_change_x-dlv_block = 'X'.
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = v_salesdocument
order_header_in = st_header_change
order_header_inx = st_header_change_x
tables
return = t_return.
read table t_return with key type = 'E'.
if sy-subrc <> 0.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
endif.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.