当前位置:网站首页>ABAP CDs realizes multi line field content splicing

ABAP CDs realizes multi line field content splicing

2022-06-11 02:06:00 DeveloperMrMeng

Requirements are as follows , When the same vendor maintains multiple phones , Use its content / Splicing

The effect is as follows :

Implementation steps :

1. establish TABLE FUNCTION Type of CDS

2. stay eclipse perhaps HANA studio Create corresponding classes and methods in , And implement the interface IF_AMDP_MARKER_HDB, take ABAP Class to AMDP class , And for the TABLE FUNCTION Create an implementation method

3. Implementation method , Use string_agg Method for content splicing , Don't forget the last SQL Before adding return Parameters

  • BY DATABASE FUNCTION: This option marks the method as a table function .
  • FOR HDB: Define the database type as HDB(HANA database ).
  • LANGUAGE SQLSCRIPT:HANA The language used by the database procedure .
  • OPTIONS READ-ONLY: No changes are allowed in the database process .
  • USING: Define the database tables that will be used in our table functions 、 View or process .

4. Create a new CDS To call

 

  above .

原网站

版权声明
本文为[DeveloperMrMeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110049534384.html