ABAP Insights: Demystifying Internal Table Operations - Sorting Tricks, Smart Data Summation, and Table Types Unveiled
Welcome back everyone, So basically we were discussing about internal table operations in our last blog. So let’s continue it. Internal Table Operations - SORT :- It is to sort the internal table. If we are not specifying anything, then by default it sorts in the ascending order. If we want to sort in descending order, then we need to specify the keyword descending. Practical implementation :- ************************************************* *Start of Program SORT lt_header BY order_number. "here we have not specified "anything, then by default it " will sort in ascending order. *Printing data LOOP AT lt_header INTO ls_header. WRITE :/ ls_header-order_number, ls_header-payment_mode. ENDLOOP. *End or Program ******************************************************** Output :- Sorting in Descending Order :- ************************************************* *Start of Program SORT lt_header BY order_number DESCENDING. *Printing data LOOP AT lt_header INTO