DATA:
W_IT_FIELD TYPE ABAP_SORTORDER_TAB, "引用sorttab参数
W_STR_FIELD TYPE ABAP_SORTORDER.
W_STR_FIELD-NAME = ‘SLEVEL’. "定义排序字段
W_STR_FIELD-DESCENDING = ‘’.
APPEND W_STR_FIELD TO W_IT_FIELD.
W_STR_FIELD-NAME = ‘ZCOLOR’.
W_STR_FIELD-DESCENDING = ‘’.
APPEND W_STR_FIELD TO W_IT_FIELD.
W_STR_FIELD-NAME = ‘SORTF’.
W_STR_FIELD-DESCENDING = ‘’.
APPEND W_STR_FIELD TO W_IT_FIELD.
”SORT ITAB BY (W_IT_FIELD). ”内表排序示例
SORT BY (W_IT_FIELD). “动态内表排序