SPTA Parallel Processing Framework in ABAP

SPTA Parallel Processing Framework in ABAP

Parallel Processing Technique in SAP ABAP using SPTA Framework: SPTA Parallel Processing Framework in ABAP

With the approach of HANA and In-Memory handling, this point could look mis-planned. Yet, there are numerous associations, which actually have no arrangement to move to HANA inside couples of years. As is commonly said, the show should continue and that spurred us to distribute this long forthcoming article here for those ABAPers, who actually need to bargain a great many lines in cluster occupations and who feel the “Evenings are getting excessively more limited to execute those bunch occupations in SAP” (propelled from a companions blog). Let’s go deep into the SPTA Parallel Processing Framework in ABAP.

Why parallel processing required?

Parallel processing is required mainly to improve the performance of any ABAP program. Using parallel processing framework we can significantly improve the processing time of any program, particularly where data volume is very high. The basic concept behind the parallel processing framework is to divide the large volume of data into several small work packets and process different work packets into different tasks. So each work process will be processed at the same time in parallels and it will significantly reduce time. Nowadays every distribution-related projects have a large volume of data so invoking parallel processing framework is very useful to reduce time.

Conventional Parallel Processing

We can use parallel processing framework by calling any RFC enabled function module in NEW TASK. In this way, after determining the number of work packets we can create different tasks for each work packets and process them in parallel.

Why SPTA structure required?

SPTA structure is the most modern and gotten system for equal handling given by SAP. If we have any desire to deal with numerous records and need to refresh/check different data set tables in equal, all things considered, utilizing traditional method for conjuring equal handling is troublesome and there can be some ABAP memory issue. In any case, in SPTA system there are work in security for all the ABAP memory related issues so it is exceptionally secure. Additionally, SPTA system is extremely simple to carry out and everything the equal handling work is dealt with by SAP we don’t have to annoy how to deal with it. Along these lines, it is likewise an extremely refined structure.

SPTA Equal Handling Structure

To conjure SPTA structure we really want to call capability module SPTA_PARA_PROCESS_START_2. This is a standard SAP gave capability module. In this capability module, we need to utilize three subroutines to construct our own handling rationale.

SPTA_PARA_PROCESS_START_2
  • BEFORE_RFC_CALLBACK_FORM: This routine is called by the capability module prior to calling the RFC capability module. Here we need to fabricate different work bundles which we need to process in the RFC capability module.
  • IN_RFC_CALLBACK_FORM: This routine is called by the capability module after work bundles are made. In this daily practice, we can utilize our own RFC empowered capability module or custom code to deal with each work parcels.
  • AFTER_RFC_CALLBACK_FORM: This routine is called toward the end by the capability module. In the wake of handling of practically everything parcels, we need to gather every one of the handled information.

We have referenced server bunch likewise while calling the capability module. The server gathering can be kept up with in the RZ12 exchange. However, this is Premise action.

In the evolving boundary, we need to pass our complete inner table which contains every one of the information. From this inward table, we will make different little work bundles (for example Interior tables) for equal handling.

In the get back to program name, we need to pass the calling program name.

Trust you are not mistaking Equal Handling for Equal Cursor Strategy. If it’s not too much trouble, read this Graphical and Measurable Examination of Equal Cursor Procedure in Circles.

Presently we will talk about the really three subroutines and how to call them in subtleties.

  • BEFORE_RFC_CALLBACK_FORM: In this daily schedule, we need to make little inner tables which we are alluding as work parcels for equal handling in the IN RFC schedule. If it’s not too much trouble, allude the beneath screen capture.
BEFORE_RFC_CALLBACK_FORM

Every one of the boundaries which are passed in this subroutine are compulsory. Here first we need to make little work parcels. In the above code, it is characterized like one work bundle will contain 10 records. In the wake of making one work parcel I have ENCODE the information for additional downstream handling. Additionally, we need to illuminate task chief that one RFC can be begun by passing ‘X’ in the START_RFC field.

  • IN_RFC_CALLBACK_FORM: In this daily schedule, we need to compose own handling rationale to deal with every one of the information. We can call a RFC empowered capability module from this everyday practice or we can compose our own rationale inside this routine moreover. For each work bundles, various errands will be made and each undertaking will call this everyday practice for handling of information. Kindly allude beneath screen capture.
IN_RFC_CALLBACK_FORM

In the above code, I have first decoded the encoded information which is coming from BEFORE_RFC_CALLBACK_FORM routine for each work bundles. Then, at that point, compose your own rationale or call RFC empowered capability module for handling. In the above model, I just arranged the arbitrary information. On the other hand I have encoded information for the downstream handling in AFTER_RFC_CALLBACK_FORM schedule.

  • AFTER_RFC_CALLBACK_FORM: In this routine after processing of all the data we have to collect data. In this routine basically, we have to prepare final internal table after all the data processing. Please refer the attached screenshot.
AFTER_RFC_CALLBACK_FORM

In the above model I have decoded the information once more and afterward showed all the record. Here in the event that any unit fizzles during handling in IN_RFC_CALLBACK_FORM no information will be accessible to gather since, supposing that any unit bombs we should not get ready last table with less number of legitimate records. We can get the bombed unit by utilizing IF_RFCSUBRC and IF_RFCMSG.

So by utilizing this capability module, we can conjure equal handling system in a complex and secure way.

If it’s not too much trouble, download the code utilized in the above showing from Here.

Kindly note: We can plan our own equal handling strategy without utilizing SPTA System. The idea continues as before in the hand craft too for example Records get handled into various errands and that runs equal. So the handling time is diminished complex.

 

YOU MAY LIKE THIS

Why SAP jobs are highly paid?

How Managed Services Can Supercharge Your SAP ROI

What salary should you expect in SAP industry?

WhatsApp WhatsApp us