Hi,
i am looking for an issue that is related to same FM. but here i found that you have locking issue, destination 'NONE' is not correct for every time. not even usefull for new releases, you can do it on this way.
After your commit work or your FM. just put do enddo. till you are not able to lock OIGS table with your shipment number. once you got 'DEQUEUE_E_OIGS' with same shipment number and process next record from your loop.
Do .
CALL FUNCTION 'ENQUEUE_E_OIGS'
EXPORTING
mode_oigs = 'E'
client = sy-mandt
shnumber = lw_shnumber
x_shnumber = lc_x " 'X'
_scope = '2'
_wait = '5'
_collect = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
CALL FUNCTION 'DEQUEUE_E_OIGS'
EXPORTING
client = sy-mandt
shnumber = lw_shnumber
x_shnumber = lc_x "'X'
_scope = '3'.
EXIT.
ENDIF.
ENDDO.
Rgards
Amit