‎2007 Oct 22 9:29 AM
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.
‎2007 Oct 22 9:32 AM
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*
‎2007 Oct 22 9:36 AM
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>