Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Core Data Services - Aggregation functions and general questions

Former Member
0 Kudos

Hi everybody,

i have three questions concerning Core Data Services for ABAP:

1. I tried to create a CDS-View, which sums up all values for the field luggweight from the flight data model table sbook.

Here is the code:

@AbapCatalog.sqlViewName: 'zsql_view_2'

define view Zexample2_Ddl as select

  sum(luggweight) as sumlweight

  from sbook

I also tried the syntax with the brackets, but the compiler says, that the group by clause is missing. But i dont want to group my summarization.

Has anybody an idea how to achieve my requirement ?

2. How are Core Data Services internally implemented ? Are they based on ABAP ?

3. Why is it necessary to implement core data services in Abap Development Tools instead of using transaction se80 ? Does anybody know the      technical reasons ?

Kind Regards

2 REPLIES 2

former_member235395
Contributor
0 Kudos

Hi Raschid,

About your questions,i can say:

1.- Count is a Function that requires a GROUP BY clause, check this link: ABAP CDS - SELECT, GROUP BY - ABAP Keyword Documentation

2.-Check this link: SAP HANA Developer Guide for SAP HANA Studio - SAP Library

3.- Because CDS is an infrastructure that can be used to define and consume semantically rich data models in SAP HANA. ABAP works on Application Layer and ABAP CDS works on BD Layer.

Regards,

CarineTchoutouo
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Raschid,

find below some additional information to the one already provided by David:

1- The use of aggregate expressions in the select list requires the specification of the GROUP BY clause. https://help.sap.com/abapdocu_750/en/abencds_f1_aggregate_functions.htm

2- Have a look at More Information:

3- ADT in Eclipse is the new desktop-based IDE for back-end ABAP developments. New features such as ABAP CDS and ABAP managed Database Procedures (AMDP) are only offered in ADT for strategic reasons. The ABAP Workbench is still supported, but do not expect major enhancements there. Embedded SAP GUI is used in ADT for Workbench editors that are not natively supported on the new platform.

Check out and

Kind regards, Carine