The in-built function CONCAT_LINES_OF( ) concatenates the table data into a string. The table must have field/fields of character type like C,D,N,T or STRING.
The below example – the table contains a set of field names and we need to prepare a order by clause with input fields.
The first select statement uses static ORDER BY clause with few field names. Consider we receive few field names based on which we want to apply the dynamic order by clause. Then we can use the built in function- CONCAT_LINES_OF( ) to concatenate the fields. Certainly we don’t have to LOOP over the table and make use of CONCAT( ) or CONCATENATION.
The selection screen with few field names-
The built in function gives a string output by operating on a table.