Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Wait parameter in Enqueue FM

former_member632991
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

1 REPLY 1

Former Member
0 Kudos

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.