DATA lt_enq TYPE STANDARD TABLE OF seqg3.
DATA: BEGIN OF ls_time,
start TYPE timestampl,
now TYPE timestampl,
elapsed TYPE tzntstmpl, " in seconds
limit TYPE tzntstmpl VALUE 3, " in seconds
END OF ls_time.
GET TIME STAMP FIELD ls_time-start.
WHILE ls_time-elapsed < ls_time-limit.
CALL FUNCTION 'ENQUEUE_READ'
EXPORTING
gname = TABLE_NAME
garg = TABLE_KEY
TABLES
enq = lt_enq
EXCEPTIONS
communication_failure = 1
system_failure = 2
OTHERS = 3.
IF lt_enq[] IS INITIAL.
EXIT. " object is not locked
ENDIF.
GET TIME STAMP FIELD ls_time-now.
ls_time-elapsed = cl_abap_tstmp=>subtract(
tstmp1 = ls_time-now
tstmp2 = ls_time-start
).
ENDWHILE. " elapsed time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |