Impedire accesso ad un ordine aufnr durante un elaborazione
*ENQUEUE ORDER
CALL FUNCTION 'ENQUEUE_ESORDER'
EXPORTING
aufnr = p_aufnr
_scope = 2
EXCEPTIONS
foreign_lock = 1
system_failure = 2.
IF sy-subrc IS INITIAL.
PERFORM data_view.
*ENQUEUE ORDER
CALL FUNCTION 'DEQUEUE_ESORDER'
EXPORTING
aufnr = p_aufnr
_scope = 2
EXCEPTIONS
foreign_lock = 1
system_failure = 2.
ELSE.
MESSAGE i899(mm) WITH 'Network bloccata, riprovare più tardi!'.
ENDIF.