‎2018 Oct 24 10:45 AM
Hi ABAP Experts,
I am facing an issue in parallel processing. I implemented parallel processing as explained below.
Inside DO loop, I am calling a custom function module (RFC enabled) with the addition STARTING NEW TASK DESTINATION DEFAULT.
If any exception comes while calling the FM, waiting for 1 second and continuing. So that in next iteration FM will be called for same set of data.
If no exception comes then increment some variables so that, in next loop iteration the FM will be called for next set of data.
and I implemented the code in such a way to restrict the utilization of Dialogue work processes to 50% of all application servers.
The issue I am facing is:
after opening ~1000 new tasks (all opened processes are finished), I am getting exception "RESOURCE_FAILURE" continuously (Always) even though Dialogue work processes are available. So that the program is stuck in the DO loop.
Could anybody please tell me the reason, why we are getting exception RESOURCE_FAILURE even though dialogue work processes are freely available in the system.
Thanks in advance.
Regards
Suresh
‎2018 Oct 24 12:48 PM
and I implemented the code in such a way to restrict the utilization of Dialogue work processes to 50% of all application servers.
How did you do that, exactly?
‎2018 Oct 24 1:25 PM
1. Called FM "STUM_WP_TOTAL_ACTIVITY" to count total number of dialogue work processes.
2. Divided it by 2 to get 50% and store it in variable ex: lv_max_proc.
4. Initialize variables lv_process_open = 0, and lv_process_close = 0.
5. Increment the variable lv_process_open by 1 after successfully calling the FM in new task.
6. Increment the variable lv_process_close in subroutine that is calling on end of task.
7. Insert below code in the Do loop where we are calling the FM with addition starting new task.
WAIT UNTIL lv_max_proc >= (lv_process_open - lv_porcess_close).