‎2021 May 04 6:10 PM
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
‎2021 May 04 7:15 PM
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'
...
‎2021 May 04 7:15 PM
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'
...
‎2021 May 04 7:54 PM
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!
‎2021 May 08 9:24 AM
An RFC entry can refer to a specific application server or an instance. (As well as all the other destination types).