Skip to Content

Performance of a report

In my report I've written this select query

  if not itab1[] is initial.
    select objnr
              kstar
              ebeln
              wtgbtr
              wogbtr
              from covp
              into  table itab2
              for all entries in itab1
              where perio in s_period
              and objnr = itab1-objnr
              and   gjahr = p_fyear .
  endif.

In the selection screen if s_period(select-options) is left blank or only low value is entered then the report is

running properly. however if both high and low values are entered, it is taking lot of time to execute and running

into dump....Error is cited to this select logic.

Please can someone help how to fix this one and provide me any tips for proceeding in this.

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 20, 2007 at 11:26 PM

    Hi,

    1, selecting a database view without proper key?

    2. All the fields selecting are available in table COEP then why selecting from DB view COVP?

    May try with the followin

      if not itab1[] is initial.
        select objnr
                  kstar
                  ebeln
                  wtgbtr
                  wogbtr
                  from covp
                  into  table itab2
                  for all entries in itab1
                  where objnr = itab1-objnr
                  and   gjahr = p_fyear .
      endif.
      delete itab2 where NOT perio in s_period.
    

    But i will not suggest for this code

    aRs

    Add comment
    10|10000 characters needed characters exceeded