首页 > SAP > HANA > How to use String Functions in ABAP CDS Views
2019
08-27

How to use String Functions in ABAP CDS Views

CONCAT(arg1, agr2) string function can be used to concatenate two character strings.

1.2CONCAT_WITH_SPACE(arg1, arg2, spaces)

This string function is used to concatenate two character strings with space. The number of blanks between the arguments arg1 and arg2 is specified in spaces.

2.3SUBSTRING(arg, pos, len)

To get sub string of arg from the position pos in the lenght len.

3.4LENGTH(arg)

It returns the no of characters in the string which is passed as a argument arg. It ignores trailing blanks.

4.5LEFT(arg, len) & RIGHT(arg, len)

LEFT(arg, len) – It returns the left-side part of the string which is passed as argument arg of length len.

RIGHT(arg, len) – It returns the right-side part of the string which is passed as argument arg of length len.

Note: Trailing blanks are ignored

5.6LTRIM(arg, char) & RTRIM(arg, char)

LTRIM(arg, char) – It removes the trailing blanks and leading character which matches the parameter char.

RTRIM(arg, char) – It removes the trailing blanks and trailing character which matches the parameter char.

Congrats! You have successfully learned String Functions in ABAP CDS Views.Please stay tuned for ABAP on HANA tutorials. Leave a comment in the below comment section and let us know your feedback.