Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ITAB_ILLEGAL_SORT_ORDER

Former Member
0 Likes
4,815

Hello Friends,

I am getting this exception ITAB_ILLEGAL_SORT_ORDER ,

but not come always, .... lets saay 2 times in 10

tries, ? any idea, ...

I am inserting into internal table with "insert" command....

Regards,

8 REPLIES 8
Read only

Former Member
0 Likes
2,328

HI,

Are you insetting the record into a sorted table? and is the record a duplicate ?

Thanks,

Renjith

Read only

Former Member
0 Likes
2,328

Hi!

Try using the APPEND command instead of insert and at the end of the processing give out a SORT command.

You are inserting the new records not into the correct place, that's why you got the error.

Regards

Tamá

Read only

Former Member
0 Likes
2,328

hi Shah,

If that table is sorted table then you cant sort sorted table .

if possible pl reply defination of ur internal table and the sort statement

Regards,

kapil Soni

Read only

0 Likes
2,328

Hi all, thanks for your reply,

I am not using the sorting table, dont know what's going on ... ( never came across this before )

So here it the table:

DATA:

lt_crmt_input_field_names TYPE crmt_input_field_names_tab,

ls_crmt_input_field_names TYPE crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'TIMESTAMP_TO'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'TIMESTAMP_FROM'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'rule_name'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'rule_guid'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'timezone_to'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'timezone_from'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'ref_kind'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

ls_crmt_input_field_names-fieldname = 'ref_guid'.

INSERT ls_crmt_input_field_names INTO TABLE lt_crmt_input_field_names.

Regards,

Read only

0 Likes
2,328

If you look in Se11, for data type 'crmt_input_field_names_tab' and see the "initialization and access" tab, you will see that this is a sorted table.....Although you did not mention it as sorted table...

where exactly are you getting the short dump ? could you please post that detail from ST22...

Thanks,

Renjith

Read only

0 Likes
2,328

hi shah,

if u see in abap dictionary that table is sorted table . so try to define one structure in ur program and by using that structure define internal table.

it will resolve ur problem

waiting for reward.

Kapil Soni

Read only

0 Likes
2,328

Points awared, but one questin, if I have a sorted table, and instead of using append, i use insert , then it should not be a problem or ?,

With command insert, the system, take care of placing the recoreds in sorted table ? or

Regards,

Message was edited by:

Shah H

Read only

0 Likes
2,328

HI Shah,

thanks for the points but when you use sorted table u should always use insert statement. Append is only useful in standred table.

bye

Regards,

kapil soni