SAP DYNAMIC ORDER BY ABEXA



Get Example source ABAP code based on a different SAP table
  



SELECT, Dynamic ORDER BY Clause
This example demonstrates how sorting is specified dynamically for SELECT.

ABAP_SOURCE_CODE
DEMO CL_DEMO_SELECT_DYNAMIC_ORDR_BY

ABAP_DESCRIPTION
RTTI is used to create input fields for all columns of the table SPFLI except for the client column. The values X or A for ascending sorts and D for descending sorts can be entered in these columns. A dynamic ORDER BY clause is generated from the input as a character string and used in a SELECT statement.