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

How to use String Functions in ABAP CDS Views-验证成功

在CDS中常用的字符串函数说明。

1.一、CONCAT(arg1, agr2)

string function can be used to concatenate two character strings.

数据浏览如图

How to use String Functions in ABAP CDS Views-验证成功 - 第1张  | 优通SAP

2.二、CONCAT_WITH_SPACE

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.

数据浏览如图

How to use String Functions in ABAP CDS Views-验证成功 - 第2张  | 优通SAP

3.三、 SUBSTRING(arg, pos, len)

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

浏览数据如图

How to use String Functions in ABAP CDS Views-验证成功 - 第3张  | 优通SAP

4.其它函数

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

EFT(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

LTRIM(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.

最后编辑:
作者:yangsen
有需要可在文章留言或者邮件yan252@163.com给我。

留下一个回复

你的email不会被公开。

19 − 6 =