Skip to Content
Technical Articles
Author's profile photo Shruthi Sampath

Parallel Processing On OABAP – Using Classes and Methods


Parallel processing is implemented in ABAP reports and programs, not in the background processing system itself. That means that jobs are only processed in parallel if the report that runs in a job step is programmed for parallel processing. Such reports can also process in parallel if they are started interactively.

Parallel processing in OAbap is using class and methods in report level program.

Parallel Processing is implemented with a special variant of Asynchronous RFC. It’s important that you use only the correct variant for you own parallel processing applications. The “CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP” keywords.

when a huge number of records needs to be processed and it takes a lot of time to produce the output, this parallel processing technique can be applied to achieve run time improvement. So, this Parallel processing is an asynchronous call to the Function Module in parallel sessions/ different session/ multiple sessions.


RZ12 – To Check the Server Group.

SM66 – To Check all the Work Processers.

SM51 – To Check the Application Server.

SM21 – System log in case of any failures.


“”””” parallel processing “”””””””


ret11 TYPE TABLE Of bapisdstat,
ret22 TYPE TABLE OF bapisdstat,
ret TYPE bapisdstat.




CALL IMPORTING sdoc1 TYPE bapivbelnvbeln
sdoc2 TYPE bapivbelnvbeln,
handle1 IMPORTING p_task TYPE clike,                     “must have a importing para-of type clike
handle2 IMPORTING p_task TYPE clike.                     “must have a importing para-of type clike

ENDCLASS.                                                “LCL_DEMO DEFINITION





METHOD call.

salesdocument sdoc1.

salesdocument sdoc2.

WAIT UNTIL chk1 abap_true AND chk2 abap_true.


ENDMETHOD.           “call method

METHOD handle1.

DATAret1 TYPE TABLE OF bapisdstat.
statusinfo    ret1.
ret11 ret1.
chk1 abap_true.

ENDMETHOD.                “HANDLE1

METHOD handle2.
DATAret2 TYPE TABLE OF bapisdstat.
statusinfo  ret2.
ret22 ret2.
chk1 abap_true.

ENDMETHOD.            “HANDLE2



PARAMETERSp_sdoc1 TYPE bapivbelnvbeln,
p_sdoc2 TYPE bapivbelnvbeln.

CALL METHOD lcl_demo=>call
sdoc1 p_sdoc1
sdoc2 p_sdoc2.

LOOP AT ret11 INTO ret.

write/ retdoc_number retmaterialretcreation_date.


CLEAR ret.

LOOP AT ret22 INTO ret.
write:/ retdoc_number,retmaterialretcreation_date.




Image 1

Defining a Class : When you define a class, you define a blueprint for a data type. This doesn’t actually define any data, but it does define what the class name means, what an object of the class will consist of, and what operations can be performed on such an object.

That is, it defines the abstract characteristics of an object, such as attributes, fields, and properties.

Implementation : Implementation of a class contains the implementation of all its methods. In ABAP Objects, the structure of a class contains components such as attributes, methods, events, types, and constants.

Image 2

  • ABAP keyword CALL FUNCTION <function> STARTING NEW TASK <taskname> with the DESTINATION IN GROUP argument.

  • Use this keyword to have the SAP system execute the function module call in parallel. Typically, you’ll place this keyword in a loop in which you divide up the data that is to be processed into work packets. You can pass the data that is to be processed in the form of an internal table (EXPORT, TABLE arguments). The keyword implements parallel processing by dispatching asynchronous RFC calls to the servers that are available in the RFC server group specified for the processing.

Waiting for job completion:  As Line No 37 : indicates wait until with abap boolean .

As part of your task management, your job must wait until all of the parallel processing tasks have been completed.

To do this, the program uses the WAIT UNTIL keyword to wait until the number of completed parallel processing tasks is equal to the number of tasks that were created.

Image 3

Methods : The definition of a method is declared in the class declaration and implemented in the implementation part of a class.

The METHOD and ENDMETHOD statements are used to define the implementation part of a method.

ABAP keyword RECEIVE:  Required if you wish to receive the results of the processing of an asynchronous RFC.

RECEIVE retrieves IMPORT and TABLE parameters as well as messages and return codes.

Image 4

Image 4 : as its business implemented , declaring the parameter .CALL the method with respective parameter

Use LOOP and ENDLOOP  executes the statement block between LOOP and ENDLOOP once for each read row. The output response result determines how and to where the row contents are read. The table key with which the loop is executed can be determined in cond.



Parallel processing is a method in computing of running two or more processors (CPUs) to handle separate parts of an overall task. Breaking up different parts of a task among multiple processors will help reduce the amount of time to run a program using class and methods, which helps in performance.

Time consumption in OAbap is less compared to normal Abap reports.


I hope Abapers will understand Parallel Processing with Classes and Methods.

Please provide your feedback and your thoughts into comment section below.

Do you have any Q&A please reach to and post your


follow the ABAP Development environment Topic page

and for reading further blog post visit 




Shruthi S.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Dominik Tylczynski
      Dominik Tylczynski

      That is a nice article. Two comments though:

      aesthetics and readability - use the following button to format source code:

      OO - these are really function calls wrapped up as methods

      Author's profile photo Shruthi Sampath
      Shruthi Sampath
      Blog Post Author

      Thanks Dominik 🙂 , will review your comments

      Author's profile photo Matthew Billingham
      Matthew Billingham

      This blog demonstrate a true OO way of parallel processing.

      Author's profile photo Shailesh Kumar
      Shailesh Kumar

      Parallel processing is a pain.

      Author's profile photo Christian Crusan
      Christian Crusan

      OO? This Blog is misleading! You only wrapped Function Module calls in background task in a in a ABAP OO Class.

      If you wanna see real ABAP OO parallel processing look at this post:

      (german blog)

      Or check out ABAP class CL_ABAP_PARALLEL