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

Parallel processing with STARTING NEW TASK on multiple application servers

vincent8
Explorer
0 Likes
2,383

I have a question on the STARTING NEW TASK keywords when calling a Function Module and I can't find the specific answer in the documentation.

We have a system with multiple (10) application servers. I have a program that calls an FM with STARTING NEW TASK to do parallel processing (20 threads in parallel). I want to make sure that all the threads run on the same application server (the one I'm currently logged on). I'm a bit confused about the following 2 options:

1. Specify "DESTINATION IN GROUP 'grp_appserver5'"

Where group "grp_appserver5" has been maintained to include only app server 5.

2. Not specify DESTINATION IN GROUP at all

Will the second option launch WPs on other app servers or will it only launch them on the current app server?

Thank you very much

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
1,953

Without DESTINATION ..., I think it runs on any application server.

Instead of running RFC on the same system via a server group, you may use:

DATA(current_app_server) = cl_abap_syst=>get_instance_name( ).
CALL FUNCTION '...'
  DESTINATION current_app_server
  ...

EDIT: even more simple, the special destination "NONE" starts in the same application server (Source: "The destination "NONE" specifies that the function module starts on the same AS instance as the calling program"):

CALL FUNCTION '...'
  DESTINATION 'NONE'
  ...
3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
1,954

Without DESTINATION ..., I think it runs on any application server.

Instead of running RFC on the same system via a server group, you may use:

DATA(current_app_server) = cl_abap_syst=>get_instance_name( ).
CALL FUNCTION '...'
  DESTINATION current_app_server
  ...

EDIT: even more simple, the special destination "NONE" starts in the same application server (Source: "The destination "NONE" specifies that the function module starts on the same AS instance as the calling program"):

CALL FUNCTION '...'
  DESTINATION 'NONE'
  ...
Read only

1,953

I think that's exactly what I needed! I thought DESTINATION could only be an RFC destination, I didn't know it could be a specific instance.

Thank you very much!

Read only

matt
Active Contributor
1,953

An RFC entry can refer to a specific application server or an instance. (As well as all the other destination types).