Skip to Content
0
Former Member
Jul 31, 2007 at 02:31 AM

performance issue with BSAD table

287 Views

Hi Experts,

I have a performance issue with the table BSAD.

I have an excel which has nearly 1660 records with ZUONR - Assignment number only in that records

But on the report selection screen i have UMSKZ - Special G/L Indicator and in the select query where clause i use AUGDT - Clearing Date & BLDAT - Document date in document

With these fields i query on the BSAD table using for all entries of the excel internal table which has 1660 records.

But seems that this is taking long time.

Can any body increase the performance of this query.

More over i have been using Appending table for it_accnt

Is it likely that i should be giving in more KEY fields in the WHERE clause.

see my query below :

* Selecting Data from BSID and BSAD tables
  select bukrs kunnr umskz zuonr gjahr belnr bldat
         xblnr shkzg dmbtr wrbtr sgtxt zfbdt
         from bsid
         into table it_accnt
         for all entries in it_tab1 " IT_TAB1 HAS 1660 RECORDS
         where umskz in so_umskz
           and zuonr eq it_tab1-zuonr
           and bldat le p_date.
 
  select bukrs kunnr umskz zuonr gjahr belnr bldat
         xblnr shkzg dmbtr wrbtr sgtxt zfbdt
         from bsad
         appending table it_accnt
         for all entries in it_tab1 " IT_TAB1 HAS 1660 RECORDS
         where umskz in so_umskz
           and zuonr eq it_tab1-zuonr
           and bldat le p_date
           and augdt ge p_date.
 
  if not it_accnt[] is initial.
    sort it_accnt by bukrs kunnr zuonr.
  endif.

<b>Kindly suggest, its urgent</b>

Regards

Pratyusha