SAP Tutorials Blog


 


Using SORT in SAP ABAP

SORT is used to sort Internal table data in ascending order or descending order, by default it will sort the data in ascending order. In addition to this, we can able to sort data based on specified fields.


Syntax1: SORT <ITAB . "Default sorts data in ascending order


Syntax2 : SORT <ITAB> DESCENDING . " Sort in descending order


Syntax3 : SORT <ITAB> BY <FIELD1> <FIELD2...ASCENDING/DESCENDING ."It sorts data by specified fields <FIELD1>, <FIELD2>..


Serkan AKKAVAK

Computer Engineer BSc

Head of SAP & Software Department

Contact : serkurumsal@yandex.com