08-01-2008 8:34 AM
Hi,
I have a scenario where i want to lock the table before updating it.
In FM Enqueue, I want the program to retry it after some time, it if fails in first attempt.
Can i do it through Wait parameter and where do i need to give the parameter to retry it after some time.
Also if it fails to attempt for some number of time , then it should throw an error mesage.
call function 'ENQUEUE_EZVZVPDDELE'
exporting
mode_zvpddel = 'E'
mode_zvpddpr = 'E'
mandt = sy-mandt
zpddelcd = wa_podd_del_header-zpddelcd
x_zpddelcd = ' '
_scope = '3'
_wait = ' '
_collect = ' '
exceptions
foreign_lock = 1
system_failure = 2
error_message = 3
others = 4.
Please suggest.
Regards,
Sonika
08-01-2008 8:38 AM
If it is critical to update this table then u can put a do....enddo. loop and check the return code of the FM like:
Do.
call function 'ENQUEUE_EZVZVPDDELE'
exporting
mode_zvpddel = 'E'
mode_zvpddpr = 'E'
mandt = sy-mandt
zpddelcd = wa_podd_del_header-zpddelcd
x_zpddelcd = ' '
_scope = '3'
_wait = ' '
_collect = ' '
exceptions
foreign_lock = 1
system_failure = 2
error_message = 3
others = 4.
if sy-subrc = 0.
exit.
endif.
enddo.
But otherwise u can follow the procedure mentioned in ur post.
Regards,
Joy.
08-01-2008 8:38 AM
If it is critical to update this table then u can put a do....enddo. loop and check the return code of the FM like:
Do.
call function 'ENQUEUE_EZVZVPDDELE'
exporting
mode_zvpddel = 'E'
mode_zvpddpr = 'E'
mandt = sy-mandt
zpddelcd = wa_podd_del_header-zpddelcd
x_zpddelcd = ' '
_scope = '3'
_wait = ' '
_collect = ' '
exceptions
foreign_lock = 1
system_failure = 2
error_message = 3
others = 4.
if sy-subrc = 0.
exit.
endif.
enddo.
But otherwise u can follow the procedure mentioned in ur post.
Regards,
Joy.