In normal processing, a modular process is usually called in a separate function module. When this FM is called, the processing in the current program goes on hold and FM is processed. When the processing in FM is completed, the control returns to the original program and it executes to end.
This mechanism works fine in a normal world but with bigger data sets and complex processes, this strategy is not effective. Architects advise to split the process and data in asynchronous threads and employ parallel processing taking maximum advantage of high processing capabilities of SAP.
With Asynchronous processing, an additional processing thread is created without stopping the current program.
First FM SPBT_INITIALIZE is called which provides the list of application servers currently available and the ones which are free. Based on this information, data is split into chunks.
Now the FM for processing the data is called in loop based on how many chunks of data has been created –
CALL FUNCTION <function module> STARTING NEW TASK <task_name> DESTINATION IN GROUP <application_server_group> .
These function calls are independent of each other and in SM50 one can notice multiple threads in progress.
It is worthy to note that Parallel Processing is not supposed to be used for data processing which has any dependency. If there is a dependency of sequence or logic, avoid parallel processing because results will be corrupt.