首页 > 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
本站为个人博客网站,全由我个人维护,我从事SAP开发13年,其它ERP开发7年,基本都是零售行业。本站记录工作学习的过程, 有SAP相关询问专、兼职工作可随时联系我。 有网站相关的问题可直接在文章下方留言,或者联系我。 邮件:yan252@163.com给我。 QQ:415402519

留下一个回复

你的email不会被公开。