Skip to Content

<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>

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Tobias Trapp
    Hi Tamanna,

    there are several parallelization frameworks within SAP NetWeaver & SAP Business Suite. I think you are referring to package SPTA in SAP_BASIS component. I think you should refer to demo report SPTA_PARA_DEMO_1 as an example how to use ist.

    Perhaps it would be intersting to know which SAP allications use it and what the differences to other parallelization tool like BANK_PP_JOBCTRL are. In my opinion SPTA is more lightweight but not that powerful compared to BANK_PP_JOBCTRL. What are your experiences with SPTA?

    Best Regards
    Tobias

    (0) 
    1. Tamanna Sidhu Post author
      Hi Tobias,
      Yes,I am referring to SPTA in BASIS component.

      I have already mentioned how SPTA works which is the example from the demo report
      Again for your ref -how demo report SPTA_PARA_DEMO works-
      When calling the Task Manager the application specifies 3 form routines (BEFORE_RFC_CALLBACK_FORM, IN_RFC_CALLBACK_FORM, AFTER_RFC_CALLBACK_FORM) as well as the program they are stored in (CALLBACK_PROG). 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.
      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.
      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.

      Since the BEFORE_RFC callback form and the AFTER_RFC callback form are executed in the main task, there will be a strict sequence of execution there. Each of the IN_RFC callback forms are executed in a separate dialog process and thus are executed in parallel to each other and to anything that is processed in the main task.
      (The Task Manager consists mainly of the function module SPTA_PARA_PROCESS_START2 and some other function modules to support it.)

      Regarding experience with SPTA we have used it in one of our projects where we have to write or transfer some changes to the database(millions in no) very effectively and performance tuned and this framework helped us in the way that -When we use parallel processing, the execution of a report or transaction is much faster, because several tasks are processed at the same time rather than one after the other.

      I can’t compare this BANk_PP_JOBCTRL as I don’t have any idea about this tool.

      Hope this answers your question.

      (0) 

Leave a Reply