Parallel cursor

Answer Posted / cg

Parallel cursor is a technique to overcome loop inside loop technique in abap.
When we have two internal tables , and we have a situation where the entries from first internal table are to be dependant on the second table.
For e.g
Select matnr ernam from mara into table lt_mat where matnr = p_matnr.
Select maktx from makt into table lt_mat1 where matnr = lt_mat.
so for getting maktx we need to wirte first loop for lt_mat and then nested loop for lt_mat1 .
If we write like this , It will take more time to run the program to avoid this we use parallel cursor technique .
E.G select matnr from mara into table lt_mat where matnr = p_matnr.
Select maktx from mara into table lt_mat1 for all entries in lt_mat where matnr = lt_mat
then write loop for 1st select query only and read the second query with read table statment
Loop at lt_mat into lw_mat.
read table lt_mat1 into lw_mat1 where matnr = lw_mat.
endloop.
This is called Parallel cursor technique.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In which particular scenario we use sorted table and which particular scenario we use standard table?

1026


What are Tickets in Realtime ?

1687


Explain what are the events used in interactive reports?

498


What is meant by hide area?

662


How can we upload a text file having delimiters in to legacy system?

603






Select up to 1 row and select single difference ?

652


What is buffering in abap?

645


How can you distinguish between different kinds of parameters?

559


How the Sy-Mandt value gets updated in the table and Is this having any foreign key relationship.

1716


Explain about workbench request and customization requests?

618


How do you Export a session ?

1600


What is a bsp application? : sap abap hr

645


Suppose there is a secondary index on 4 non-key fields A,B,C & D. There are 3 select queries :- a) one on basis of A, B, C , D b) Second on basis of A, B, C c) Third on basis of D, C,B, A In which all situations , the above secondary index will be used?

1077


In a loop of an internal table, what is the use of at first & at last statements?

1484


What happens if we use leave to list-processing without using suppress-dialog?

706