4 Replies Latest reply: Jun 21, 2012 11:36 AM by chinmay kulkarni RSS

Performance issue: table used twice for select statements

Mummy Daddy
Currently Being Moderated

This anlage table used two time how can use only one time can you guys assist me plz. 

 

 

 

SELECT anlage sparte vstelle anlart
           FROM eanl
           INTO TABLE gt_eanl
            FOR ALL ENTRIES IN gt_ever
            WHERE anlage = gt_ever-anlage.
    SORT gt_eanl BY anlage.

    IF gt_eanl[] IS NOT INITIAL.

 

 

   SELECT a~anlage a~sparte  b~operand b~betrag b~bis FROM
             eanl AS a INNER JOIN ettifn AS b
             ON a~anlage = b~anlage
             INTO  TABLE gt_ettifn
             FOR ALL ENTRIES IN gt_eanl
             WHERE a~anlage = gt_eanl-anlage
             AND b~operand EQ 'YVMAKVAL'
             AND a~sparte EQ '07'.