Skip to Content
0
Former Member
Jun 17, 2008 at 10:24 AM

poor performance due to select query

13 Views

Hey ppl,

I am facing a problem in one of the select query on BSEG.

The query is as given

TYPES :BEGIN OF wa1_bseg,
        bukrs    TYPE bseg-bukrs,
        belnr     TYPE bseg-belnr,	
        gjahr	    TYPE bseg-gjahr,
        buzei    TYPE bseg-buzei,
        fwbas    TYPE bseg-fwbas ,	
        pswbt    TYPE bseg-pswbt,
        hkont    TYPE bseg-hkont,
        wrbtr     TYPE bseg-wrbtr,
        ktosl     TYPE bseg-ktosl,
        koart     TYPE bseg-koart,
        shkzg    TYPE bseg-shkzg,
        mwskz   TYPE bseg-mwskz,
        qsskz    TYPE bsis-qsskz,
        dmbtr     TYPE bseg-dmbtr,
        flag        TYPE C,
        END OF wa1_bseg.

DATA: it_bsegv TYPE TABLE OF wa1_bseg WITH HEADER LINE.

SELECT bukrs belnr gjahr buzei fwbas pswbt hkont wrbtr  ktosl shkzg koart mwskz
FROM bseg INTO TABLE it_bsegv
FOR ALL ENTRIES IN it_ekko
   WHERE bukrs = 'MU51'     AND
                gjahr IN s_fiscal    AND
                valut IN s_budat1  AND
                ebeln = it_ekko-ebeln.

Even if there are only around 5 records in it_ekko it takes very long time in executing. Sumtimes it even shows 'time out' in

foreground. Kindly help me out with it