2022 Jan 17 3:58 PM
Hi all,
I have to manually remove some lock users: is there a FM to be called via abap that perform the same actions of SM12?
thanks,
Andrea
2022 Jan 17 4:20 PM
Use FM ENQUEUE_READ to get queue info and use ENQUE_DELETE to delete it. Sample code below. It works for me.
DATA: LT_ENQ TYPE STANDARD TABLE OF SEQG3.
CALL FUNCTION 'ENQUEUE_READ'
EXPORTING
GNAME = 'EKKO' "Table in SM12
GARG = '10000000999' "Lock argument in SM12
TABLES
ENQ = LT_ENQ.
CALL FUNCTION 'ENQUE_DELETE'
EXPORTING
CHECK_UPD_REQUESTS = 0
SUPPRESS_SYSLOG_ENTRY = 'X'
TABLES
ENQ = LT_ENQ.
Use FM ENQUEUE_READ to get queue info and use ENQUE_DELETE to delete it. Sample code below. It works for me.
DATA: LT_ENQ TYPE STANDARD TABLE OF SEQG3.
CALL FUNCTION 'ENQUEUE_READ'
EXPORTING
GNAME = 'EKKO' "Table in SM12
GARG = '10000000999' "Lock argument in SM12
TABLES
ENQ = LT_ENQ.
CALL FUNCTION 'ENQUE_DELETE'
EXPORTING
CHECK_UPD_REQUESTS = 0
SUPPRESS_SYSLOG_ENTRY = 'X'
TABLES
ENQ = LT_ENQ.
2022 Jan 17 4:20 PM
Use FM ENQUEUE_READ to get queue info and use ENQUE_DELETE to delete it. Sample code below. It works for me.
DATA: LT_ENQ TYPE STANDARD TABLE OF SEQG3.
CALL FUNCTION 'ENQUEUE_READ'
EXPORTING
GNAME = 'EKKO' "Table in SM12
GARG = '10000000999' "Lock argument in SM12
TABLES
ENQ = LT_ENQ.
CALL FUNCTION 'ENQUE_DELETE'
EXPORTING
CHECK_UPD_REQUESTS = 0
SUPPRESS_SYSLOG_ENTRY = 'X'
TABLES
ENQ = LT_ENQ.
2022 Jan 17 4:24 PM
Hello,
you might have a look on function modules ENQUE_READ to get a list of lock entries back in table ENQ and use that table for ENQUE_DELETE. Both not released and of course to be handled with care.
To be honest, I would hesitate to implement a program that somehow automatically deletes lock entries. This should be still a manual task. If there are lock entries that permanently disturb or remain as zombies, I recommend to invest some time in the process / programs behind them.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |