表:ZPST007
创建锁
产生的锁函数
程序中使用:
锁定数据
CALL FUNCTION 'ENQUEUE_EZPS_LOCK_001'
EXPORTING
mode_zpst007 = 'E'
mandt = sy-mandt
zbjdxh = ls_out-zbjdxh
zbjdmxxh = ls_out-zbjdmxxh
zsjbh = ls_out-zsjbh
zsjbhzdd = ls_out-zsjbhzdd
vbukr = ls_out-vbukr
prctr = ls_out-prctr
* X_ZBJDXH = ' '
* X_ZBJDMXXH = ' '
* X_ZSJBH = ' '
* X_ZSJBHZDD = ' '
* X_VBUKR = ' '
* X_PRCTR = ' '
* _SCOPE = '2'
* _WAIT = ' '
* _COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
"锁定当前数据失败:记录用户ID
DATA(lv_userid) = sy-msgv1.
ENDIF.
解锁数据
CALL FUNCTION 'DEQUEUE_EZPS_LOCK_001'
EXPORTING
mode_zpst007 = 'E'
mandt = sy-mandt
zbjdxh = ls_out-zbjdxh
zbjdmxxh = ls_out-zbjdmxxh
zsjbh = ls_out-zsjbh
zsjbhzdd = ls_out-zsjbhzdd
vbukr = ls_out-vbukr
prctr = ls_out-prctr
* X_ZBJDXH = ' '
* X_ZBJDMXXH = ' '
* X_ZSJBH = ' '
* X_ZSJBHZDD = ' '
* X_VBUKR = ' '
* X_PRCTR = ' '
* _SCOPE = '3'
* _SYNCHRON = ' '
* _COLLECT = ' '
.
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/17904.html