Skip to Content

Problem in Select Query

Hi All ,

Can anybody tell me what is wrong in below query ?

Im getting performance issue in the below Query ....

When im trying to execute the code program is going to dump

>>>>> Select PARTNER

356 RLTYP

357 FROM BUT100 INTO TABLE IT_BUT100

358 for all entries in t_but020

359 WHERE partner eq t_but020-partner

360 and RLTYP = ''

361 OR RLTYP = 'BUP001' .

Error in Dump : You attempted to extend an internal table, but the required space was not available.

Thanks in advance

Smitha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    Posted on Dec 30, 2013 at 05:39 AM

    Hi Sumitha,

    Please use like below.

    Select PARTNER

    356 RLTYP

    357 FROM BUT100 INTO TABLE IT_BUT100

    358 for all entries in t_but020

    359 WHERE partner eq t_but020-partner

    360 and RLTYP IN ('', 'BUP001' ).

    Arivazhagan S

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 07:57 AM

    Your program reached the maximal memory allowed in your system. Try to remove unnecessary fields in the internal table, or contact system administrators. (20527 - Runtime error TSV_TNEW_PAGE_ALLOC_FAILED and similar notes for more information)

    Also, never forget to check that t_but020[] is not initial, as if the internal table used in FOR ALL ENTRIES condition is empty, the whole WHERE clause is ignored, so you try to load the whole database table in memory.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 05:43 AM

    Hello Smitha KB.

    You have to put the OR condition within brackets.

    Like,

    and ( RLTYP = ' ' OR RLTYP = 'BUP001' ).


    Your current code will fetch all data which satisfies

    EITHER

    partner = t_but020-partner and RLTYP = ' '

    OR

    RLTYP = 'BUP001'.

    This is the reason for error.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2013 at 06:09 AM

    Check your internal table declaration..

    create a structure with required fields (PARTNER, RLTYP) & after that create an internal table of that structure type.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2013 at 06:12 AM

    Can you tell me how many records you are getting for this condition? Seems that no of records are too much..

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 06:35 AM

    Hi Smitha,

    Can you please check how you declared your internal table IT_BUT100.


    Regards,

    Rajesh.B

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi-

      check the NOT t_but020[] IS INITIAL

      Please check the below code, it should not give you dump.

      DATA: BEGIN OF t_but020 OCCURS 0,

      partner LIKE but100-partner,

      END OF t_but020.

      DATA: BEGIN OF it_but100 OCCURS 0,

      partner LIKE but100-partner,

      rltyp LIKE but100-rltyp,

      END OF it_but100.

      IF NOT t_but020[] IS INITIAL.

      SELECT partner
      rltyp

      FROM but100 INTO TABLE it_but100

      FOR ALL ENTRIES IN t_but020

      WHERE partner EQ t_but020-partner

      AND ( rltyp = ' ' OR rltyp = 'BUP001' ).

      IF sy-subrc = 0.

      ENDIF.

      ENDIF.

      Let us know, in case it helps.

      Regards,

      Atul Mohanty

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2013 at 08:14 AM

    Hi smitha,

    Are you checking the table entries before using for all entries.

    i.e, if t_but020[] is not initial .

    Select PARTNER

    356 RLTYP

    357 FROM BUT100 INTO TABLE IT_BUT100

    358 for all entries in t_but020

    359 WHERE partner eq t_but020-partner

    360 and RLTYP = ''

    361 OR RLTYP = 'BUP001' .

    endif.

    Regards,

    Mahesh Somanath.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.