首页 > SAP > ABAP > Sorting in ALV using CL_SALV_TABLE
2019
08-29

Sorting in ALV using CL_SALV_TABLE

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-ABAP编辑器 and copy the below code.

https://gist.github.com/prakash13t/3f6ab732050bd29c7d23#file-sort_salv-abap

Output with SORTing applied on Airline field:

[adsenseyu1]

最后编辑:
作者:yangsen
有需要可在文章留言或者邮件yan252@163.com给我。