Code: Alles auswählen.
DATA: l_sorttext(1000) TYPE c.
LOOP AT lt_sort INTO ls_sort.
IF ls_sort-up = 'X'.
* aufsteigend
CONCATENATE l_sorttext
ls_sort-fieldname
'ASCENDING'
INTO l_sorttext SEPARATED BY space.
ELSE.
* absteigend
CONCATENATE l_sorttext
ls_sort-fieldname
'DESCENDING'
INTO l_sorttext SEPARATED BY space.
ENDIF.
ENDLOOP.
CONDENSE l_sorttext.
Code: Alles auswählen.
SORT gt_data_arbl_alv BY (l_sorttext).