Guide

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:

PrefixTypePurposeUse When
I_Interface / BasicStable, reusable data abstractionBuilding custom views or services on top
C_ConsumptionApp-specific, UI-readyBinding to a Fiori app or analytical query
P_PrivateInternal implementation detailAvoid — not intended for external consumption
R_RAP / TransactionalCreate, update, delete operationsBuilding transactional apps with RAP
A_Remote API / AnalyticalExternal API entitiesIntegrating 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:

ScenarioRecommended LayerBrowse
Read-only reporting or analyticsConsumption Views (C_)Consumption Views
Reusable data model / custom view on topBasic Views (I_)Basic Views
CRUD operations (create/update/delete)Transactional Views (R_)Transactional Views
Stable, future-proof APIAny 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:

QuestionAnswerRecommendation
Do you need read-only reporting?YesUse a Consumption View (C_*)
Are you building a reusable custom view?YesUse a Basic View (I_*)
Do you need create/update/delete?YesUse a Transactional View (R_*)
Must it be upgrade-safe?YesFilter by Released (C1)
No released view exists?Use a I_* Basic View and monitor future releases

Explore on CDSee