CALL FUNCTION 'ENQUEUE_E_TABLE' EXPORTING MODE_RSTABLE = 'E' TABNAME = lv_tabname EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2 OTHERS = 3. IF sy-subrc <> 0. CONCATENATE '用户' sy-uname '当前正在操作该表!' INTO lv_msg. MESSAGE lv_msg TYPE 'E'. ENDIF. # 解锁 DATA lv_tab...
DATAit_zspfliLIKE TABLE OFzspfliWITH HEADER LINE. CALL FUNCTION'ENQUEUE_EZ_ZSPFLI'"加锁 EXPORTING mode_zspfli='E' mandt=sy-mandt carrid='AA' connid='0011' * X_CARRID = ' '"是否使用初始值填充参数CARRID * X_CONNID = ' '"是否使用初始值填充参数CONNID * _SCOPE = '2' * _WAIT ...
DATA it_zspfli LIKE TABLE OF zspfli WITH HEADER LINE.CALL FUNCTION 'ENQUEUE_EZ_ZSPFLI'"加锁 EXPORTING mode_zspfli = 'E'mandt = sy-mandt carrid = 'AA'connid = '0011'* X_CARRID = ' '"是否使⽤初始值填充参数 CARRID * X_CONNID = ' '"是否使⽤初始值...
更新自定义表时,可以使用通用的锁对象,而不用再为每一个自定义表创建锁对象(尽管SAP支持这种做法),当然解锁也有通用的解锁对象。代码如下: * 给自定义表 ZCOL2001 加锁对象 CALL FUNCTION 'ENQUEUE_E_TABLE' EXPORTING mode_rstable = 'E' tabname = 'ZCOL2001' x_tabname = ' ' x_varkey = ' ' _sc...
CALL FUNCTION 'ENQUEUE_E_TABLE' EXPORTING* MODE_RSTABLE = 'E' tabname = 'SFLIGHT'* VARKEY =* X_TABNAME = ' '"标示参数tabname是否是十六进制的* X_VARKEY = ' '"标示参数VARKEy是否是十六进制的* _SCOPE = '2'* _WAIT = ' '* _COLLECT = ' ' EXCEPTIONS foreign_lock = 1 system_fail...
DATA it_zspfli LIKE TABLE OF zspfli WITH HEADER LINE. CALL FUNCTION 'ENQUEUE_EZ_ZSPFLI'"加锁 EXPORTING mode_zspfli = 'E' mandt = sy-mandt carrid = 'AA' connid = '0011' * X_CARRID = ' '"是否使用初始值填充参数 CARRID
ENQUEUE_E_TABLE表加锁 DEQUEUE_E_TABLE表解锁 ENQUEUE_ESFUNCTION函数加锁 DEQUEUE_ESFUNCTION函数解锁 程序锁:SAP提供了两个函数来解决程序运行时的同步锁定问题: ENQUEUE_ES_PROG 加锁 DEQUEUE_ES_PROG 解锁 LUW(Logical Unit of Work)逻辑工作单元
‘E’+表名 例程序 1.首先用'ENQUEUE_READ' 查询一下有没有谁在使用表’ZTABLE’ CALLFUNCTION'ENQUEUE_READ' EXPORTING GCLIENT = SY-MANDT GNAME ='ZTABLE' * GARG =' ' GUNAME ='' *LOCAL=' ' * FAST =' ' *IMPORTING *NUMBER= * SUBRC = ...
if lock_table_line( i_varkey = varkey ). modify sflight from standard_line->*. unlock_table_line( exporting i_varkey = varkey ). endif. endloop. endmethod. method lock_table_line. call function 'ENQUEUE_E_TABLEE' exporting mode_rstable = lock_types-exclusive " Lock mode for table ...
CALL FUNCTION 'ENQUEUE_EZZSOPR0032' EXPORTING mode_trdir = 'E' "锁类型 name = 'ZSOPR0032' "锁对象名称 x_name = ' ' _scope = '2' _wait = ' ' _collect = ' ' EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3. ...