In this tutorial, we will learn how to sort a column in ALV report using CL_SALV_TABLE.
To sort a column in ALV,
- Get the Sorting Object of the ALV using the method GET_SORTS().
- Apply SORT to the column name by using the method ADD_SORT().
Class used : CL_SALV_TABLE and CL_SALV_SORTS.
Create a program in SE38 and copy the below code.
Output with SORTing applied on Airline field:
SAPLearners.com is now on Telegram. Click here to join our channel and stay updated with the latest tutorials and updates.