Skip to Content
author's profile photo Former Member
Former Member

Reg dump ITAB_ILLEGAL_SORT_ORDER

Hi..

I have scheduled one job .The job has cancelled and its throws erro like

ITAB_ILLEGAL_SORT_ORDER.

1)In the dump analysis its shows the err at Appen statement in the following code.

IF sy-subrc = 0. "PBS

MOVE lw_tab2592-vbelv TO lw_ekpo-vbeln. "PBS

MOVE lw_tab2592-posnv TO lw_ekpo-posnr. "PBS

MOVE lw_tab2592-vbeln TO lw_ekpo-ebeln. "PBS

MOVE lw_tab2592-posnn TO lw_ekpo-ebelp. "PBS

APPEND lw_ekpo TO lt_ekpo . "PBS

CLEAR lw_ekpo. "PBS

ENDIF.

2)Here internal table is declares as sorted table like this...

tt_ekpo TYPE SORTED TABLE OF tw_ekpo

WITH NON-UNIQUE KEY vbeln posnr,

3)In the same program its have 3 more tables decalred sorted tables as above and also used append.

but its showing dump at one place at APPEND lw_ekpo TO lt_ekpo .

Please let me know wat is the reason for for this..

Thanks & Regards

Manne

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 02:02 PM

    you have the reason in your dump "ITAB_ILLEGAL_SORT_ORDER." it comes when you try to append a record in a sorted table which would make the entries out of sequence.

    Always use insert table instead of append when you have sorted tables., that will take care of automatic sorting in the internal table.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You are not getting dump here as the entries in the table are not inserted out of sequence. if you use an out of sequence entry you will get the dump. for example

      
      IT_VBELN-VBELN = '001'.
      IT_VBELN-POSNR = '001'.
      
      APPEND IT_VBELN.
      
      IT_VBELN-VBELN = '001'.
      IT_VBELN-POSNR = '001'.
      
      APPEND IT_VBELN.
      
      IT_VBELN-VBELN = '002'.
      IT_VBELN-POSNR = '001'.
      
      APPEND IT_VBELN.
      
      IT_VBELN-VBELN = '001'.   
      IT_VBELN-POSNR = '001'.
      
      APPEND IT_VBELN.  <---- it will dump here
      
      

      Thats why you need to use Insert statement, in that case SAP will automatically insert the row at the appropriate index to keep the sorted order

  • Posted on Dec 22, 2008 at 07:31 PM

    Read this thread completely =>

    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.