Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

<p>As of Release 3.0E the ABAP language contains an asynchronous remote function call (aRFC) sometimes referred to as parallel RFC (pRFC) with the statement “CALL FUNCTION … STARTING NEW TASK … DESTINATION IN GROUP <server_group> PROCESSING <form_name> ON END OF TASK”.<br />When executing this statement the ABAP processor starts the execution of the specified function module in a separate dialog  work process (the child process) as a new LUW. The execution of the current process (the parent process) continues immediately afterwards without waiting for the results of the function module. When the parent process executes the ABAP statement “WAIT UNTIL <condition>”, it will provide a synchronization point for the child process(es) to return their results</p><p>Since each parallel process uses a dialog work process as long as it is active, the number of child processes is limited by the number of available dialog processes. The configuration of the server group as well as the current utilization of dialog processes through other transactions determines the number of available dialog processes.</p><p>The child processes execute in a separate dialog process and thus in a separate memory area This means that the contents of any global variables, e.g. function pool memory, is not available in the child task. Therefore you’ll need to structure your program in a way that all parameter necessary for parallel processing are transferred via the remote function call. And the same applies to returning results to the parent task: All results that the parent task needs have to be transferred back via the aRFC interface. <br />(If your child process writes data to the database and the parent process does not need that data or it could read it from the database, you don’t have to send that data back via the aRFC of course).</p><p>It works in this way-</p><p>When calling the Task Manager the application specifies 3 form routines which are called dynamically from SPTA framework.<br />1. BEFORE_RFC_CALLBACK_FORM<br />2. IN_RFC_CALLBACK_FORM<br />3. AFTER_RFC_CALLBACK_FORM<br />Every time the Task Manager intends to launch a new parallel task, it calls the application’s BEFORE_RFC callback form. Within this form the application determines, if it wants to start a new task at this time and if so, which parameters it needs to supply to the child task. <br />If requested, the Task Manager starts a new child task. This child task calls the form IN_RFC callback form and passes the specified parameters to it. Once the application has completed its processing, it may pass back some parameters from this routine to the Task Manager.<br />Once the IN_RFC callback form is completed, the Task Manager will call the AFTER_RFC callback form and pass back the parameters from the IN_RFC callback form.</p><p> </p>

3 Comments