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

dump in ecc 6

Former Member
0 Likes
825

one of our old program having issue when it runs

I have an internal tabe called iI_ORDERS. then decleard like this.

DATA: I_ORDERS99 LIKE SORTED TABLE OF I_ORDERS

WITH NON-UNIQUE KEY VBELN.

and after one select statement, give like this

APPEND I_ORDERS TO I_ORDERS99.

but getting dump says

A line is to be inserted or changed at position 36 in the sorted

internal table (type SORTED_TABLE)

"\PROGRAM=ZRSD_ODERS_WITHOUT_DELV\DATA=I_ORDERS99".

In doing so, the sorting sequence - determined by the table key - was

destroyed.

any idea, who can I correct this.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
770

Hi

It means y're appending the records without to respect the sorting: try to replace APPEND statament with INSERT

*APPEND I_ORDERS TO I_ORDERS99.

INSERT I_ORDERS INTO TABLE I_ORDERS99.

Max

6 REPLIES 6
Read only

JozsefSzikszai
Active Contributor
0 Likes
770

hi Mat,

you cannot APPEND to a SORTED table, you have to use INSERT ... INTO TABLE ... instead.

hope this helps

ec

Read only

Former Member
0 Likes
770

Hi...

Can you please post u r code....

Hw is i_orders declared.....

Is I_orders a work area????

Thanks,

Chaitanya

Read only

0 Likes
770

it is an internal table.

DATA: BEGIN OF I_ORDERS,

VBELN LIKE VBAK-VBELN,

POSNR LIKE VBAP-POSNR,

ZZIHREZ_E LIKE VBKD-IHREZ_E,

KUNNR LIKE VBAK-KUNNR,

K_NAME(50),

CLIENT LIKE VBAK-KUNNR,

C_NAME(50),

MATNR LIKE VBAP-MATNR,

M_NAME(35),

ZZWERKS LIKE VBAP-WERKS,

ERDAT LIKE VBAK-ERDAT,

VDATU LIKE VBAK-VDATU,

ERNAM LIKE VBAK-ERNAM,

KWMENG LIKE VBAP-KWMENG,

PRODH LIKE VBAP-PRODH,

NETWR LIKE VBAP-NETWR,

REJ(15),

END OF I_ORDERS.

what is the use of declaring like sorted tables, instad of that, at end of all the selection and update, sort that internal table by vbeln is enough?

DATA: I_ORDERS99 LIKE SORTED TABLE OF I_ORDERS

WITH NON-UNIQUE KEY VBELN.

Read only

0 Likes
770

Hi

It's usually used to improve the performance if the internal table can have a very large number of hits.

If it uses a SORTED TABLE the record is inserted in the internal table in according to the sorting way, after inserting it the system creates an index to be used for reading, in your case a index for field VBELN.

U should also consider the SORT statament needs memory space and this space is defined by system variables and it couldn't be enough for very big table, in this case a dump occurs.

Max

Read only

Former Member
0 Likes
771

Hi

It means y're appending the records without to respect the sorting: try to replace APPEND statament with INSERT

*APPEND I_ORDERS TO I_ORDERS99.

INSERT I_ORDERS INTO TABLE I_ORDERS99.

Max

Read only

0 Likes
770

hi for the sorted tables no need to use the sort command .

sorted table means itself is sorted by definition