Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPSORT_ITAB_OBSOLETE - SORT ITAB OBSOLETE

ABAPSORT_ITAB_OBSOLETE - SORT ITAB OBSOLETE

Vendor Master (General Section)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

SORT itab BY field_symbol

SORT itab BY fs1> fs2> ...

Effect

In internal tables with header lines, field symbols can also be specified as a sort criterion for comp1 comp2 ... after SORT ... BY. If a component of the header line or the entire header line is assigned to the field symbol when the statement is executed, the table is sorted by the corresponding component or the entire line. If no data object is assigned to a field symbol, the specification is ignored. If a different data object is assigned to a field symbol, an uncatchable exception is raised.

Note

Instead of using field symbols for dynamic component specifications, it is best to specify parenthesized character-like data objects or an internal table, which contain the name of the components.

name = 'ITAB-COL1'.
ASSIGN (name) TO <fs>.

SORT itab BY <fs>.

name = 'COL1'.

SORT itab BY (name).






BAL Application Log Documentation   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 1373 Date: 20230206 Time: 093002     sap01-206 ( 46 ms )