当前位置:网站首页>ABAP CDS实现多行字段内容拼接
ABAP CDS实现多行字段内容拼接
2022-06-11 00:50:00 【DeveloperMrMeng】
需求如下,当同一个供应商维护了多个电话时,将其内容使用/进行拼接

实现效果如下:

实现步骤:
1.创建TABLE FUNCTION类型的CDS

2.在eclipse或者HANA studio中创建对应的类和方法,并实现接口IF_AMDP_MARKER_HDB,将ABAP类转化为AMDP类,并为上面步骤创建的TABLE FUNCTION创建实现方法

3.实现方法,使用string_agg方法进行内容拼接,不要忘记在最后一个SQL之前添加return参数

- BY DATABASE FUNCTION:此选项将方法标记为表函数。
- FOR HDB:将数据库类型定义为 HDB(HANA 数据库)。
- LANGUAGE SQLSCRIPT:HANA 数据库过程使用的语言。
- OPTIONS READ-ONLY:不允许在数据库过程中进行任何更改。
- USING:定义将在我们的表函数中使用的数据库表、视图或过程。
4.创建新的CDS进行调用
以上。
边栏推荐
- [matlab] image enhancement (power transformation, histogram specification processing method, smoothing and sharpening filtering)
- Sequence table exercises
- [matlab] image restoration
- Task03: building an offline material system
- Win11系统使用DISM命令备份驱动程序的方法
- Alibaba cloud Tianchi online programming training camp_ Task arrangement
- [Qt] Erreur: qapplication: No such file or directory Solution
- [leetcode] reverse linked list II
- Xpath注入
- Deep exploration of functions with indefinite parameters in C language
猜你喜欢
![[music] playing city of the sky based on MATLAB [including Matlab source code 1874]](/img/cf/63b04080867e93ab2e00e2e21b37df.jpg)
[music] playing city of the sky based on MATLAB [including Matlab source code 1874]

Linux Installation MySQL database details

MeterSphere教程:接口返回结果为空时如何进行断言

Understanding of pointers

Programming implementation: input any English month, and output its corresponding Chinese prompt after looking up the month table. Abbreviations can also be found.

【音乐】基于matlab演奏《过火》【含Matlab源码 1875期】

flutter_ Swiper carousel map plug-in

Contest2902 - following Tang Kelian's programming: sequence structure question d: area 201502 question f: persistence of supporting college students in Ludian earthquake
![[leetcode] delete duplicate Element II in the sorting linked list](/img/24/0f8e4a2d15732997c8eb8973669bf7.jpg)
[leetcode] delete duplicate Element II in the sorting linked list

Task07: double pointer
随机推荐
Leetcode 2171 removing minimum number of magic beans (prefix and recommendation)
Win11画图工具没了怎么重新安装
Coordonnées des capitales provinciales des provinces chinoises
[leetcode] path sum II (first glimpse recursion + backtracking)
Task03: building an offline material system
Contest2902 - following Tang Kelian's programming: sequence structure question d: area 201502 question f: persistence of supporting college students in Ludian earthquake
关于CS-3120舵机使用过程中感觉反应慢的问题
晚餐阿帮的手艺
Battery control of QT widget (qpainter)
2021-02-27image processing of MATLAB
中国各省份省会的坐标
Clip paper details
Matlab random function summary
(solved) latex -- cancel the superscript display of references in the text (gbt7714-2015 will lead to the default superscript reference) (tutorial on mixed use of superscript and flush)
Treatment of small fish
Task02: basic use of database (MySQL)
[leetcode] delete duplicate Element II in the sorting linked list
[leetcode] a group of K flipped linked lists
Dialog AlertDialog 、SimpleDialog、showModalBottomSheet、showToast Flutter 自定义 Dialog
爱思唯尔---Elseviewer---预印本在线发表通知