Posts

Showing posts with the label parallel cursor code in abap

Parallel Cursor Looping - SAP ABAP - Performance Tuning

Nested Loops is one of the fear factors for all the ABAP developers as this consumes lot of program execution time. If the number of entries in the internal tables is huge, then the situation would be too worse. The solution for this is to use parallel cursor method whenever there is a need for Nested Loop. Advantages Over Conventional Nested Loop Method: When nested loop becomes necessary than parallel cursor is really helpful in improving the performance. It will help us to avoid complete looping of the internal table. If there are two-three internal tables inside the loop it will be more efficient way of coding.  PROGRAM LINES: Conventional Method Using Nested Loops: loop at lt_vbpa into wa_vbpa.   loop at lt_kna1 into wa_kna1 where kunnr = wa_vbpa-kunnr. ****** Your Actual logic within inner loop ******   endloop. endloop. The below code is the replacement for above code with Parallel Cursor logic which is most preferred method. Paralle...