Skip to Content
0
Former Member
May 02, 2008 at 05:39 AM

wait and locking of database table

106 Views

hi all,

can you please tell me what the following code does?

*************************************************

DO.

IF sy-index GT 10.

EXIT.

ENDIF.

WAIT UP TO 5 SECONDS.

CALL FUNCTION 'ENQUEUE_E_DGP_LKEY'

EXPORTING

matnr = fmatnr

rvlid = gv_rvlid

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3.

IF sy-subrc = 1.

ELSEIF sy-subrc = 0.

CALL FUNCTION 'DEQUEUE_E_DGP_LKEY'

EXPORTING

matnr = fmatnr

rvlid = gv_rvlid.

EXIT.

ELSE.

EXIT.

ENDIF.

ENDDO.

******************************************

the report containing this code has come for the performance tuning.

is it ok if i remove "wati upto 5 seconds" clause?

is this related to locking of a table?

is it ok if i make "wait upto 1 seconds" and make sy-index limit to 50?

please help.