How to Find the Right CDS View for an SAP Table
A practical step-by-step guide to finding the correct CDS View for any SAP table — using CDSee search, VDM naming conventions, release states, and real-world examples with VBAK, EKKO, and BKPF.
The Problem: 100K+ Views, One Table
You know the SAP table — VBAK, EKKO, BKPF — but you need the right CDS View to use in your Fiori app, OData service, or ABAP program. With over 100,000 CDS Views in a typical S/4HANA system, many of them reading from the same underlying tables, finding the correct one is non-trivial. A single popular table like VBAK can have hundreds of views built on top of it, each serving a different purpose.
This guide walks you through four practical strategies to narrow down the right CDS View quickly.
Strategy 1: Use CDSee's Table-to-View Search
The fastest approach is to use CDSee's built-in table-to-view mapping. Every CDS View in the index is linked to its underlying data sources, so you can trace from any table to all views that read from it.
Option A: Start from the Table Detail Page
Navigate to the detail page of any table, for example VBAK (Sales Document Header). The page lists all CDS Views that use this table as a data source, along with their VDM type and release state — giving you an immediate overview of your options.
Option B: Use Table Search Mode
Use the dedicated table search to find views by their source table: search for table VBAK. This returns the table itself and lets you navigate to its dependent views.
Option C: Use Field Lineage
If you need a specific field, not just the table, use field lineage search. For example, VBAK.VBELN field lineage shows every CDS View field that traces back to the sales document number in VBAK — the most precise way to find a view for a particular column.
Strategy 2: Understand VDM Naming Conventions
SAP follows strict naming conventions within the Virtual Data Model (VDM). The prefix of a CDS View name tells you its purpose:
| Prefix | Type | Purpose | Use When |
|---|---|---|---|
I_ | Interface / Basic | Stable, reusable data abstraction | Building custom views or services on top |
C_ | Consumption | App-specific, UI-ready | Binding to a Fiori app or analytical query |
P_ | Private | Internal implementation detail | Avoid — not intended for external consumption |
R_ | RAP / Transactional | Create, update, delete operations | Building transactional apps with RAP |
A_ | Remote API / Analytical | External API entities | Integrating via OData from outside S/4HANA |
When browsing a list of views for a table, focus on I_ and C_ prefixed views first — they are the ones SAP designed for reuse. Avoid P_ views, which are internal building blocks. For details on each type, see the guide on CDS View Types.
Strategy 3: Filter by Release State
Not all CDS Views are equally stable. SAP assigns release contracts to views it considers part of the public API. A view with a C1 (Released) contract is guaranteed to remain backward-compatible across S/4HANA releases — making it the safest choice for custom development.
Always prefer a Released view when one exists for your use case. On CDSee, you can filter directly: browse all Released CDS Views. For a deeper explanation, see the Released APIs guide.
Strategy 4: Match the VDM Layer to Your Use Case
Different VDM layers serve different purposes. Matching the layer to your scenario avoids picking a view that is either too low-level or too app-specific:
| Scenario | Recommended Layer | Browse |
|---|---|---|
| Read-only reporting or analytics | Consumption Views (C_) | Consumption Views |
| Reusable data model / custom view on top | Basic Views (I_) | Basic Views |
| CRUD operations (create/update/delete) | Transactional Views (R_) | Transactional Views |
| Stable, future-proof API | Any layer, filtered by Released (C1) | Released Views |
For example, if you need to display sales order data in a custom Fiori list report, a Consumption View is ideal. If you are building a new composite view that joins sales orders with deliveries, start with a Basic View like I_SalesOrder.
Practical Examples
Let's walk through three of the most common SAP table-to-view lookups:
Example 1: Sales Order Data (VBAK)
Table VBAK stores sales document headers. The primary Basic View is I_SalesOrder, which provides a clean, association-rich abstraction over VBAK and its related tables. For item-level data, look at I_SalesOrderItem (built on VBAP). If you need a UI-ready consumption model, search for C_SalesOrder* views.
Example 2: Accounting Documents (BKPF)
Table BKPF holds accounting document headers. In S/4HANA, the recommended CDS View is I_JournalEntry, which abstracts the Universal Journal (ACDOCA) rather than the legacy BKPF/BSEG structure. This is a key architectural shift — always prefer the Journal Entry views for new development in S/4HANA.
Example 3: Purchase Orders (EKKO)
Table EKKO contains purchasing document headers. The standard Basic View is I_PurchaseOrder. For procurement analytics, look at the corresponding Consumption Views prefixed with C_PurchaseOrder.
Decision Flowchart
Use this quick-reference to select the right type of CDS View:
| Question | Answer | Recommendation |
|---|---|---|
| Do you need read-only reporting? | Yes | Use a Consumption View (C_*) |
| Are you building a reusable custom view? | Yes | Use a Basic View (I_*) |
| Do you need create/update/delete? | Yes | Use a Transactional View (R_*) |
| Must it be upgrade-safe? | Yes | Filter by Released (C1) |
| No released view exists? | — | Use a I_* Basic View and monitor future releases |