‎2008 Sep 24 2:58 PM
Hi all,
I have a problem with BAPI_GOODSMVT_CREATE, FM
I have using this to post goods movement type 309 & 321 and I am calling this in LOOP as there are more number of goods movement.
In each iteration i have to post the goods movement and after that i have to create the delivery using bdc MBRL Tcode.
The problem is the BAPI is locking the Material document number even after posting the goods movement for a while. Because of this the delivery creation is failing.
After BAPI i'm using BAPI commit work FM
I have used FM deque_all, but its not working. wait up to 2 secs.
Even the combination of deque_all & wait up to 2 secs is not working.
Is there anyother way to release locks?
Thanks
‎2008 Sep 24 3:02 PM
Hi,
Try this way ......
SET UPDATE TASK LOCAL.
if sy-subrc eq 0.
call function BAPI_GOODS_MVMT_CREATE
......
endif.
if return is initial with no errors then
SET UPDATE TASK LOCAL.
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = return.
endif.
‎2008 Sep 24 3:02 PM
Hi,
Try this way ......
SET UPDATE TASK LOCAL.
if sy-subrc eq 0.
call function BAPI_GOODS_MVMT_CREATE
......
endif.
if return is initial with no errors then
SET UPDATE TASK LOCAL.
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = return.
endif.