Posts

Showing posts with the label sap sorted internal table example

SAP ABAP - Sorted Internal Table (Index Table) With Example.

Submitted By: Shilpa Gunjan (L&T Infotech) - Sorted tables are always sorted by key i.e. records are always in sorted order. Hence sorted tables cannot be sorted again. If you still try to sort a sorted internal table you will get an error message '<Internal Table Name>' is a table of the kind SORTED. You cannot use the SORT command with this type of table.’ - Sorted tables are also referred as Index tables because the entries can be accessed via index. - Sorted tables can be accessed either by index or by key. For a key access the response time depends logarithmically on the number of tables entries because read access is carried out via binary search. - Reading entries from sorted table is efficient because the access is via binary search. - The key that is used to read sorted table are always either unique or non-unique . Sorted Internal tables cannot be declared without UNIQUE/NON-UNIQUE Keyword. - Sorted tables are mostly used when there i...