|
Documentación -
Trucos y consejos
|
|
Lunes, 16 de Febrero de 2004 09:02 |
REPORT zsubhas_enqueue.
* testing the locking of tables...
DATA :
varkey LIKE rstable-varkey.
varkey = sy-mandt.
* locking the tables............................
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
* MODE_RSTABLE = 'E'
tabname = 'MARA'
varkey = varkey
* X_TABNAME = ' '
* X_VARKEY = ' '
* _SCOPE = '2'
* _WAIT = ' '
* _COLLECT = 'X'
EXCEPTIONS
foreign_lock = 1
system_failure = 2
others = 3
.
CASE SY-SUBRC.
WHEN 1.
message i184(bctrain) WITH 'Foreignlock'.
WHEN 2.
message i184(bctrain) WITH 'system failure'.
WHEN 0.
message i184(bctrain) WITH 'success'.
WHEN others.
message i184(bctrain) WITH 'others'.
ENDCASE.
* unlocking the table...............
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
* MODE_RSTABLE = 'E'
tabname = 'MARA'
varkey = varkey
* X_TABNAME = ' '
* X_VARKEY = ' '
* _SCOPE = '3'
* _SYNCHRON = ' '
* _COLLECT = ' '
.
|