Implementierung in AMDP
CLASS zcl_amdp_table_function DEFINITION
PUBLIC FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_amdp_marker_hdb.
CLASS-METHODS CountryText FOR TABLE FUNCTION zi_table_function.
ENDCLASS.
CLASS zcl_amdp_table_function IMPLEMENTATION.
METHOD countrytext BY DATABASE FUNCTION FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY
USING t005t.
TMP = select distinct mandt,
land1 as Country,
landx as CountryText
from t005t
where mandt = session_context( 'CLIENT' );
return select mandt,
Country,
string_agg( CountryText, '/' ) as CountryText
from :TMP
group by Country, mandt;
ENDMETHOD.
ENDCLASS.