START-OF-SELECTION.
CALL FUNCTION 'ENQUEUE_ESRDIRE'
EXPORTING
name = sy-repid
_scope = '1' "该参数式加锁模式,1 COMMIT WORK不会解锁,其他遇到COMMIT WORK是会解锁的
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE 1.
ENDIF.
阅读(841) | 评论(0) | 转发(0) |