Virtual Data Model (VDM)
The virtual data model (VDM) is SAP's layered set of ABAP CDS views in SAP S/4HANA that turns database tables into business-oriented entities: basic and composite interface views for reuse, and consumption views for specific apps and queries. The virtual data model is the common data foundation for SAP Fiori apps, embedded analytics and APIs.
Quick facts
- Type
- Layered data model of ABAP CDS views
- Layer
- Business logic & data model
- View types
- Basic and composite interface views, consumption views, restricted reuse views
- Naming
- I_ (interface), C_ (consumption), R_ (restricted reuse), A_ (remote API)
- Explore with
- View Browser app (F2170), ABAP Development Tools
- Who works with it
- ABAP and analytics developers, key users, integration architects
- Applies to
- SAP S/4HANA (all deployment options)
Layer: Business logic & data modelWhere it sits ▾
Layer: Business logic & data model
Open the architecture map →How is the virtual data model structured?
The virtual data model stacks CDS views on top of the database tables, and each layer may only read from the layer below:
- Basic interface views sit directly on the tables and are the only VDM views that read them. They rename cryptic table fields into business terms and add annotations and associations. Annotation:
@VDM.viewType: #BASIC. - Composite interface views combine basic views or other composite views into new semantic entities, for example a cube for analytics. Annotation:
@VDM.viewType: #COMPOSITE. - Consumption views serve one purpose, such as a specific transactional or analytical app. They are the only VDM view type that can act as an analytical query. Annotation:
@VDM.viewType: #CONSUMPTION.
Basic and composite views form the reuse layer; a reuse view typically represents one business object node, such as I_SalesOrder. Restricted reuse views look similar but are meant for SAP's own reuse only. The virtual data model is therefore a contract between layers, not just a collection of views.
How do you recognize VDM views by name?
SAP's naming convention puts the view type in a prefix, followed by a semantic name and optional suffixes:
| Prefix | View type |
|---|---|
| I_ | Basic or composite interface view |
| C_ | Consumption view |
| R_ | Restricted reuse view |
| P_ | Private view |
| A_ | Remote API view |
| X_ / E_ | View extend / extension include view |
Suffixes refine the purpose: Query for analytical queries, Cube for cube views, TP for transactional processing views and Text for text views. A version number such as _2 marks a successor view.
One trap: in SAP's naming guide for custom RAP development, R_ marks the base view entity of a business object, while in the SAP S/4HANA virtual data model R_ marks restricted reuse views. The prefix of a VDM view tells you its intended role before you open it.
Which VDM views can customers build on?
Visibility is not permission. Only views that SAP has released under the C1 stability contract are safe to reuse, and SAP releases them only for certain view types:
- Can be released for customers: basic and composite interface views, consumption views of type analytical query, and derivation functions.
- Typically SAP-internal: restricted reuse views, remote API views, private views and abstract entities.
Release can be for key user extensibility, used in apps such as Custom CDS Views, or for cloud development in ABAP Cloud. Unreleased views can change in any upgrade. To check a view, open it in the View Browser app or look at its API state in ABAP Development Tools. In the virtual data model, release status, not existence, decides what a custom extension may depend on.
What is the virtual data model used for?
- SAP Fiori apps: transactional processing views form RAP business objects, and consumption views feed SAP Fiori elements apps through OData services.
- Embedded analytics: composite views shaped as cubes and dimensions, topped by analytical query consumption views, drive analytical apps without replicating data.
- APIs: remote API views form the basis for external APIs published on the SAP Business Accelerator Hub.
- Extensions: key users build custom CDS views on released interface views, for example a view of open purchase orders per supplier for Alder Manufacturing, instead of reading tables.
- Data extraction: the Analytics.dataExtraction.enabled annotation marks views as suitable for data replication, for example to SAP BW/4HANA.
The virtual data model gives apps, analytics and integrations one shared business vocabulary instead of separate table readers.
What are common mistakes with the virtual data model?
- Building on an unreleased view. It works until the next upgrade changes it. Check the release status first.
- Reusing consumption views as building blocks. Consumption views serve one app; build on interface views instead.
- Reading tables next to the VDM. Custom code that bypasses basic views loses business field names, associations and access controls.
- Reading R_ the wrong way. Restricted reuse views are not for customer reuse, whatever a custom naming convention says.
Most virtual data model problems come from ignoring the layer and release rules that keep the model stable.
Virtual data model vs. ABAP CDS views: what is the difference?
| ABAP CDS views | Virtual data model | |
|---|---|---|
| What it is | A modeling technology of the ABAP platform | SAP's organized set of CDS views for SAP S/4HANA |
| Who creates it | Anyone developing in ABAP | SAP, with customer views built on released parts |
| Structure | Any view, with any data source | Fixed layers: basic, composite, consumption |
| Rules | CDS language rules | Layering, naming prefixes and release contracts |
ABAP CDS views are the technology; the virtual data model is SAP's governed use of that technology for SAP S/4HANA.
FAQ
What do the I_ and C_ prefixes mean in SAP CDS views?
In the SAP S/4HANA virtual data model, I_ marks interface views, which are basic or composite reuse views, and C_ marks consumption views built for a specific app or analytical query. Other prefixes include R_ for restricted reuse views and A_ for remote API views.
Can I use any VDM view in my own development?
No. Only views released by SAP under the C1 stability contract are safe to build on, either for key user extensibility or for cloud development. Unreleased views are visible in the system but can change in any upgrade without notice.
Is the virtual data model available in SAP ECC?
No. The virtual data model is part of SAP S/4HANA and is documented for its cloud and on-premise editions, not for SAP ERP (ECC). Custom CDS views can be technically possible on ECC, but they do not give it SAP's VDM layers.
How do I find the right VDM view for a business object?
Search by the business object name in the View Browser app or in ABAP Development Tools, prefer released I_ views for reuse, and check the view's annotations and release status. Interface views usually follow business object names, such as I_SalesOrder.
Sources
- SAP Help Portal: VDM Layers and View Types (SAP S/4HANA)
- SAP Help Portal: Naming Conventions in the Virtual Data Model (SAP S/4HANA)
- SAP Help Portal: VDM.viewType annotation (ABAP CDS)
- SAP Help Portal: Naming Conventions for Development Objects (RAP)
- SAP Fiori Apps Reference Library: View Browser (F2170)
- Applies to
- SAP S/4HANA on-premise · SAP S/4HANA Cloud Private Edition · SAP S/4HANA Cloud Public Edition
- Last reviewed