I_VarianceReason
Variance Reason Code
I_VarianceReason (Basic)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.
Manufacturing
I_VarianceReason is a Basic CDS View (Dimension) that provides data about "Variance Reason Code" in SAP S/4HANA. It reads from 1 data source (trug) and exposes 4 fields with key fields Plant, VarianceReasonCode. It has 2 associations to related views. It is exposed through 1 OData service (UI_MAINTENANCEJOB_MANAGE). It is used in 1 Fiori application: Perform Maintenance Jobs. Part of development package VDM_PP_CNF.
SAP Help Documentation
| Category | CDS Views for Discrete and Process Manufacturing |
|---|---|
| Data Category | Dimension |
This CDS view provides the prerequisites for answering the following business questions: Which variance reason codes are maintained in a plant?
Prerequisites
Authorizations Users who want to use this CDS view don't need any special authorization.
Structure
Main input parameters This view does not have any input parameters. Measures and attributes The following attribute is provided: Plant Variance reason code
SAP API Hub
| Category | Basic |
|---|---|
| State | C1 |
| Line of Business | Manufacturing |
| Application Component | PP-VDM-2CL |
| Capabilities | Analytical Dimension,Association Target for Defining CDS Entities,Data Source in SQL Select,Data Source for Defining CDS Entities,Data Source for Search,Data Provider for Value Help |
| Extensible (Key User) | No |
| Extensible (Developer) | No |
| Release State (Key User) | Released |
| Release State (Developer) | Released |
| Package | Manufacturing for SAP S/4HANA Cloud Public Edition |
| Description | <p>This CDS view provides the prerequisites for answering the following business questions:</p> <ul> <li>Which variance reason codes are maintained in a plant?</li> </ul> |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Public Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Public Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Public Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Custom Communication Scenarios — Create custom communication scenarios to configure custom communication arrangement
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Public Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| trug | trug | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..*] | I_VarianceReasonText | _Text | $projection.Plant = _Text.Plant and $projection.VarianceReasonCode = _Text.VarianceReasonCode |
Annotations (23)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IVARCREASON | view | |
| AbapCatalog.buffering.status | #ACTIVE | view | |
| AbapCatalog.buffering.type | #GENERIC | view | |
| AbapCatalog.buffering.numberOfKeyFields | 001 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Analytics.internalName | #LOCAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Consumption.ranked | true | view | |
| Metadata.allowExtensions | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.dataCategory | #VALUE_HELP | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_DIMENSION | view | |
| ObjectModel.representativeKey | VarianceReasonCode | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| Search.searchable | true | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| VDM.viewType | #BASIC | view | |
| EndUserText.label | Variance Reason Code | view |
OData Services (1)
| Service | Binding | Version | Contract | Release |
|---|---|---|---|---|
| UI_MAINTENANCEJOB_MANAGE | UI_MAINTENANCEJOB_MANAGE | V2 | C1 | NOT_RELEASED |
Fiori Apps (1)
| App ID | App Name | Type | Description |
|---|---|---|---|
| F5104A | Perform Maintenance Jobs | Transactional | Perform Maintenance Jobs app will help Maintenance Technician to see the list with all work items assigned to the him/her or to his/her team, several features like Assignment of an operation, Time recording for the Operations, create partial or final confirmations and the ability to display and change the malfunction information are possible with the app. The maintenance technician can post and return the planned components and can also record the measurement document. |
Perform Maintenance Jobs
Business Role: Maintenance Technician
Technician records actual work, remaining work, confirmation text, and final confirmation for self as well as for team members working on the job.
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_VarianceReason.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IVARCREASON
CREATE VIEW I_VarianceReason AS
SELECT
trug.werks AS Plant,
cast(trug.grund as pph_agrnd preserving type) AS VarianceReasonCode
FROM trug
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [1..1]
LEFT OUTER JOIN I_VarianceReasonText AS _Text ON Plant = _Text.Plant AND VarianceReasonCode = _Text.VarianceReasonCode -- association [0..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- OData Services in SAP S/4HANA Explained
- Service Bindings and Service Definitions in SAP S/4HANA
- SAP Fiori Apps Architecture — How Fiori Apps Connect to Data
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA