2006 Mar 20 4:29 PM
Hi Experts,
I am trying to loop through an internal table in my program and this program has 240k records. The program gives a short dump when I run it. Is there a better way of looping through the table. I understand that using key and index are options, but there is no key as such on this table and I am not sure what indexing exactly means.
Can anyone please help me with this.
Your help is greatly appreciated.
Thank you
Hi Experts,
I am trying to loop through an internal table in my program and this program has 240k records. The program gives a short dump when I run it. Is there a better way of looping through the table. I understand that using key and index are options, but there is no key as such on this table and I am not sure what indexing exactly means.
Can anyone please help me with this.
Your help is greatly appreciated.
Thank you
2006 Mar 20 4:34 PM
An <b>Index</b> is a set of key fields used for better access to the tables, you can create them on Tx. <b>SE11</b>.
Also you can give some delimeter parameters to your loop...Maybe you don't need to access all the 240k records...
Greetings,
Blag.
2006 Mar 20 4:36 PM
2006 Mar 20 4:36 PM
Hi
Which dump?
The way of looping depends on how you need to loop it.
If you're using WHERE CONDITION should be better to use SORTED table, otherwise you can use STANDARD table.
See the SAP Help: here it's explain the differents of the sevaral kinds of internal table.
Max
2006 Mar 20 4:37 PM
Deepthi,
You can also look at the option of using FIELD GROUPS.
Regards,
Ravi
2006 Mar 20 4:44 PM
2006 Mar 20 4:56 PM
Deepthi,
Indexing in the context of internal tables is the reading of a particular row by the row identifier. An internal table with 240,000 rows will have rows with identifiers (index values) between 1 and 240,000. When you append rows to an internal table using the APPEND statement, field sy-index gives you the row identifier of the last row added. Similarly, when you want to read a particulr row, you can reference it by the row identifier. For the indexing to work as desired, you would need to sort the table into the correct key sequence.
Can you paste the coding into the message and explain what the structure of the internal table and which
row(s) you are trying to process ?
Regards,
Gary