ERPClimb logoERPClimb
CDS Views
Architect / Cross-trackintermediate 7 min read

CDS Views Part 4: CDS View Entity vs Classic (DDIC-Based) CDS View

Preview · a free account unlocks the full lesson

Key takeaway

Compare the classic DDIC-based CDS view (define view with @AbapCatalog. sqlViewName) with the modern CDS view entity (define view entity), understand the technical differences, why view entities are the standard for new work, and how to handle existing classic views.

In this lessonShow sections

Visual overview

CDS Views Part 4: CDS View Entity vs Classic (DDIC-Based) CDS View — learning sheetFlow: Open a classic CDS view in your system and note its sqlViewName → Create the same logic as a view entity — remove the sqlViewName and header catalog annotations, add currency references → Activate both and compare in ADT and SE11 → In a classic report, select from the CDS names; confirm the results match. Key ideas: CLASSIC DDIC-BASED CDS VIEW; CDS VIEW ENTITY; WHY VIEW ENTITIES; WORKING WITH EXISTING CLASSIC VIEWS. Watch out: Existing projects contain many classic views; you must read both styles and know that the SQL view name must never be used by new code.ERPClimb.com / ARCH / LESSON 4/10 / LEARNING SHEETCDS Views Part 4: CDS View Entity vs Classic (DDIC-Based)CDS View1 · HOW IT FLOWS1Open a classicCDS view in yoursystem and note…2Create the samelogic as a viewentity — remove…3Activate bothand compare inADT and SE114In a classicreport, selectfrom the CDS…2 · KEY IDEAS EXPLAINEDClassic Ddic-Based CDS ViewSyntax: define view ZI_X as select from …Mandatory @AbapCatalog.sqlViewName: 'ZIXSQL' (max16 characters) — creates a DDIC SQL view.CDS View EntitySyntax: define view entity ZI_X as select from …No sqlViewName, no generated DDIC view — only theCDS entity exists.Why View EntitiesFaster activation and fewer transport objects.No duplicate names to confuse consumers.Working With Existing Classic ViewsYou can select from a classic view entity-wise(use the CDS name).A view entity can select from a classic CDS viewand vice versa.3 · REMEMBER · WATCH OUTRememberClassic CDS view (define view): needs @AbapCatalog.sqlViewName andgenerates an extra SQL view visible in SE11. Two objects, two names.CDS view entity (define view entity): no SQL view in the DDIC, onename, faster activation, stricter syntax checks.SAP treats DDIC-based CDS views as obsolete in current releases — allnew development uses view entities.!Watch outExisting projects contain manyclassic views; you must read bothstyles and know that the SQL viewname must never be used by new code.4 · IN A REAL PROJECTA client had 400 custom classic CDS views. Several reports read the SE11 SQL view names directly, so when DCLwas added to the CDS views those reports still showed data from all sales organizations — an audit finding.The team changed all consumers to CDS names, enforced "view entities only" for new development…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Parts 1 through 3 used view entities throughout, but many existing systems still contain classic CDS views, so it's worth knowing how the two styles differ.

A classic DDIC-based CDS view is written as define view ZI_X as select from ..., and it requires @AbapCatalog.sqlViewName: 'ZIXSQL' (max 16 characters), which generates an extra SQL view visible in SE11 — meaning you end up with two objects and two names for the same thing.

Annotations like @AbapCatalog.compiler.compareFilter and @ClientHandling control generation details, and because ABAP can read either the CDS name or the generated SQL view name, reading the SQL view directly bypasses CDS features such as DCL.

A CDS view entity, by contrast, is written as define view entity ZI_X as select from ..., has no sqlViewName and generates no DDIC view at all — only the CDS entity itself exists. Client handling is implicit and automatic, the syntax checks are stricter (currency/unit references become mandatory, type rules for CASE and literals are cleaner, and there are no $parameters shortcut-syntax issues), and view entities support newer features such as session variables in more places and better extension support.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.