Hi,
I have a requirement where the database operation modify should take place, ONLY when there is no existing locks on the underlyining table...
I came with following
do
TRY.
Modify DBTAB
EXIT.
CATCH cx_root.
If sy-index > 10000
EXIT.
else.
wait up to 5 seconds.
Endif.
ENDTRY.
enddo.
Tries to Modify . If there is a exception(table is locked) it waits for 5 secs and reexecutes. Once execution is successful, the loop Exits....
Is this the best way to put something like this ina TRY CATCH Block