Back to Blog
ABAPCDS ViewsS/4HANAHANA

CDS Views in SAP ABAP: Building Data Models for S/4HANA

Learn how to create and use Core Data Services (CDS) views ÔÇö the backbone of data modeling in S/4HANA and the ABAP RESTful Programming Model.

A

Admin

Monday, 9 February 2026

What Are CDS Views?

Core Data Services (CDS) views are ABAP-managed database views that define the data model at the database level. They push computation to the database layer (code pushdown) for better performance and are the foundation of S/4HANA's Virtual Data Model (VDM).

Creating a Basic CDS View

@AbapCatalog.sqlViewName: 'ZV_SALES'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Sales Order CDS View'

define view Z_CDS_SALES_ORDER
  as select from vbak as header
  inner join vbap as item
    on header.vbeln = item.vbeln
{
  key header.vbeln   as SalesOrder,
  key item.posnr     as ItemNumber,
      header.erdat   as CreationDate,
      header.kunnr   as Customer,
      item.matnr     as Material,
      item.netwr     as NetValue,
      header.waerk   as Currency
}

CDS Annotations

Annotations control the behavior and metadata of CDS views:

  • @UI ÔÇö Define Fiori UI layout and field behavior
  • @Search ÔÇö Enable fuzzy search capabilities
  • @ObjectModel ÔÇö Define associations and compositions
  • @Analytics ÔÇö Mark views for analytical processing

CDS View Types in VDM

  1. Interface Views (I_) ÔÇö Stable reusable data models
  2. Consumption Views (C_) ÔÇö Tailored for specific UI consumption
  3. Basic Views ÔÇö Direct table abstractions
  4. Composite Views ÔÇö Combine multiple basic views

Performance Benefits

CDS views leverage SAP HANA's in-memory processing. Calculations, joins, and aggregations run at the database level, dramatically improving performance compared to traditional ABAP SELECT statements with application-level processing.