您的当前位置:首页正文

【转载】ABAP CDS

2024-11-10 来源:个人技术集锦

ABAP CDS

CDS(Core Data Services) are domain specific languages(DSL) and services for defining and consuming semantically rich data models in SAP HANA. They are integral part of SAP HANA, and can be leveraged in the ABAP stack.

DDL: Data definition language

QL: Query language

DCL: Data Control language

Core Data Services are enhanced “view entities" in ABAP provides several advantages:

  • Pushes data intensive Calculations into database layer
  • Queries can be combined, ex: UNION, UNION ALL
  • Nested Views are supported
  • Association between view entities can be defined
  • Case expression supported
  • Arithmetic, String and cast expression supported
  • ABAP CDS supports INNER joins, OUTER joins, and RIGHT OUTER joins
  • Annotations can be used
  • Aggregations, Grouping, Filtering groups
  • Support for Any DB But no access to specific HANA features Supports about 90% of SQL features
  • Supports ABAP and SAP HANA deployment

Support for CDS in ABAP begins with ABAP 7.4 SP2.

Especially with SAP NetWeaver ABAP 7.40 SP5 additional capabilities like CDS Associations are supported. CDS Associations can be used to replace joins with simple path expression in queries.

Syntax for defining CDS view is similar to SQL.

The goal of ABAP CDS is to fully support the SQL-92 standard and beyond that to support additional features likes associations, entities, create, read, update, and delete (CRUD) and OData Services.

ABAP CDS和HANA CDS是同一种规范的不同平台实现而已。核心功能几乎相同,但不同平台实现不同功能需要不同的注解,所以两种的源代码并不能直接copy迁移。

显示全文