Application Development and Automation 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: 
Read only

How check the Dialog Processor avaibility to execute a task while calling the Function Module

Former Member
0 Likes
1,437


Hi All,

I need to check the Dialog processor avaibility to execute my task while calling the Function Module.


If I do not check the Dialog processor avaibility before my Function Module execution, it will throw the dump in case of non-availability of Dialog processor.


Hence need your help to check/handle the Dialog Processor availability before calling the Function Module.


Please find below the my code:


CALL FUNCTION 'Z_MRSS_DPR_SEND_MAILS' STARTING NEW TASK 'FUNC1'
EXPORTING
is_indent_data = is_indent_data
it_resource_guid = lt_res_guid
iv_langu = lv_language
is_project_ext = ls_project_data_ext
is_part_ext = ls_part_data_ext
iv_event = iv_event
iv_lang = 'E'
iv_user = sy-uname
iv_commit = 'X'
EXCEPTIONS
system_failure MESSAGE lv_sys_fail_msg
communication_failure MESSAGE lv_com_fail_msg.
* resource_failure message lv_res_fail_msg
* others message lv_others_msg.

Thanks in Advance.

5 REPLIES 5
Read only

Former Member
0 Likes
1,084

hi Ravi,

Do you debug your FM to check when this function will raise error, the first time to call FM or the 6th time to call FM?

regards,

Archer

Read only

0 Likes
1,084

Hi Archer,

Thanks for your reply.

I need to check the Dialog Processor availability for calling my actual Task.

Please let me know how to check this.

Thanks in Advance.

Read only

0 Likes
1,084

Maybe you can handle 'resource_failure' exception, instead of  check the dialog processor is abailable.

there are a sample example, link is here http://help.sap.com/saphelp_nw70ehp2/helpdata/en/fa/096e92543b11d1898e0000e8322d00/content.htm?frame...

if it raise 'resource_failure' exception, 'WAIT UNTIL RCV_JOBS >= SND_JOBS.' to wait other task finished.

Read only

0 Likes
1,084

Hi Ravi,

Just a suggestion.

Can you check if SPBT_INITIALIZE will help you or not.

This FM gives you the no. of. free work processes.

Regards,

Santanu.

Read only

ceedee666
SAP Champion
SAP Champion
0 Likes
1,084

Hi Ravi,

I assume the requirement you are trying to solve is to make sure not to overload the system with your parallel program. Instead of reading the number of free work processes and perform an action based on this number you could also use RFC groups together with a "CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP."

The following link provides details on how to define RFC groups and how to use them to implement parallel processing:

Defining RFC Groups for Parallel-Processed Jobs - Background Processing - SAP Library

Christian