Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

parallel cursor

Former Member
0 Likes
421

im trying to access mara table 4 times by writing 4 different select conditions and moving them in to four different internal tables. can i use parallel cursor for this.

Thanks for your help.

2 REPLIES 2
Read only

Former Member
0 Likes
386

Hi,

You have to select from the table only once, that is the best coding practice.

While populating internal table u can use parallel cursor that is only on internal tables.

*reward if helpful*

Read only

Former Member
0 Likes
386

To restrict the database access, you can select the records from mara for the common conditions and the read/ loop according to the specific conditions.

Ex:

suppose :

select * from mara into lt1_mara where matnr in s_matnr. 
loop lt1_mara.
  .....
endloop. 
.......
.......
select * from mara where meins in s_meins.
loop lt2_mara.
  .....
endloop. 
......
select * from mara where matkl in s_matkl.
loop lt3_mara.
  .....
endloop.  
.......

instead of the above you can use:

select * from mara into lt_mara where   matnr in s_matnr
                                                     or meins in s_meins
                                                     or matkl in s_matkl. 

loop at lt_mara where  matnr in s_matnr.
......
endloop. 

.....
.....
loop at lt_mara where  meins in s_meins.
......
endloop. 

.....
.....
loop at lt_mara where  matkl in s_matkl.
......
endloop. 
...............
....................

<b>the above will misimise your database access.</b>