ABAP Function- CONCAT_LINES_OF( )

Advertisements

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-

Execute-

The built in function gives a string output by operating on a table.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s