02-09-2007 1:32 PM
Hi
I am trying to add records to the sorted table in the LOOP. But run time it is getting dump.
I tried with APPEND and INSERT statments. In both cases getting dump.
Please advise to resolve this.
Thanks in advance.
Rama.
02-09-2007 1:35 PM
Hi Rama krishna,
You may have tried to insert a duplicate entry(With the same key), or you may not have filled all the primary key fields in the sorted internal table.
Regards,
Ravi
02-09-2007 1:57 PM
You have to READ TABLE before INSERT to give the index position of the insertion.
Example
READ TABLE t_bkpf WITH TABLE KEY bukrs = bkpf-bukrs
belnr = bkpf-belnr gjahr = bkpf-gjahr
TRANSPORTING NO FIELDS.
CHECK sy-subrc <> 0. " Already in internal table (remove if non-unique key)
INSERT bkpf INTO TABLE t_bkpf.
Regards
02-09-2007 1:39 PM
hi can you just send that piece of code that is going for dump.
Regards,
srinivas
02-09-2007 1:47 PM
Hi Rama,
I hope you are not trying to add records to "the" internal table within a loop on "the" same internal table.
I dont know about a dump, but the program will effectively run forever, and if your timeout limit in parameters is really short, it could be the reason for the dump.
Please give us the Short dump ID from ST22.
Tak,
Aditya
02-09-2007 1:49 PM
HI,
This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Make sure that you are not inturupting the sort sequence of the table, Use the INSERT statmetn with all the keys
Regards
Sudheer