2009 Nov 17 10:06 AM
Hi all.
In a Z-program I'm calling at the begining to the FM ENQUEUE_E_TABLEE. At the end I'm calling DEQUEUE_E_TABLEE.
All this had been implemented in order to prevent from another user that enter the program dealing with a spesific Z-table.
How can I check if the table is locked now or not ?
I would like to check at the first command of the program if another user is executing the program or not (and I want to do it by checking if somewhere else the Z-table had been locked..).
Regards,
Rebeka
2009 Nov 17 10:32 AM
You can check this with the function ENQUEUE_READ: parameter GNAME = Z table name
Kind regards,
Lieselot
You can check this with the function ENQUEUE_READ: parameter GNAME = Z table name
Kind regards,
Lieselot
2009 Nov 17 10:29 AM
Hello,
If you want to check at the first command of the program if another user is executing use the FM:
AUTHORITY-CHECK OBJECT 'ZABAP' ID 'EXGRP' FIELD 'T1' .
CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
USER = SY-UNAME
object = 'ZABAP'
field1 = 'EXGRP'
VALUE1 = 'T1'
EXCEPTIONS
USER_DONT_EXIST = 1
USER_IS_AUTHORIZED = 2
USER_NOT_AUTHORIZED = 3
USER_IS_LOCKED = 4
OTHERS = 5
.
IF sy-subrc = 3.
raise exception.
ENDIF.
I think this will serve your purpose...
Anil.
Edited by: Anil Kumar Reddy on Nov 17, 2009 11:29 AM
2009 Nov 17 10:29 AM
2009 Nov 17 10:32 AM
You can check this with the function ENQUEUE_READ: parameter GNAME = Z table name
Kind regards,
Lieselot
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |