I_DefectKeyFigCube
Key Figure view for Defect Analytics
I_DefectKeyFigCube is a Composite CDS View (Cube) that provides data about "Key Figure view for Defect Analytics" in SAP S/4HANA. It reads from 3 data sources (I_DefectUnion, I_InspectionLot, I_InspectionOperation) and exposes 44 fields with key field DefectInternalID. It has 3 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_DefectUnion | I_DefectUnion | from |
| I_InspectionLot | I_InspectionLot | left_outer |
| I_InspectionOperation | I_InspectionOperation | left_outer |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_StartDate | mm_a_delivery_date | |
| P_EndDate | mm_a_delivery_date |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_InspectionCharacteristic | _InspectionCharacteristic | $projection.InspectionLot = _InspectionCharacteristic.InspectionLot and $projection.InspPlanOperationInternalID = _InspectionCharacteristic.InspPlanOperationInternalID and $projection.InspectionCharacteristic = _InspectionCharacteristic.InspectionCharacteristic |
| [0..1] | I_WorkCenterBySemanticKey | _WorkCenterBySemanticKey | $projection.MainWorkCenterInternalID = _WorkCenterBySemanticKey.WorkCenterInternalID and $projection.MainWorkCenterPlant = _WorkCenterBySemanticKey.Plant |
| [1..*] | I_InspSpecificationVersionText | _InspSpecificationVersionText | $projection.inspectionspecificationplant = _InspSpecificationVersionText.InspectionSpecificationPlant and $projection.inspectionspecification = _InspSpecificationVersionText.InspectionSpecification and $projection.inspectionspecificationversion = _InspSpecificationVersionText.InspectionSpecificationVersion |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.buffering.status | #NOT_ALLOWED | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.sqlViewName | IDEFECTKEYFIG | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| Analytics.dataCategory | #CUBE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Key Figure view for Defect Analytics | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Metadata.allowExtensions | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.representativeKey | DefectInternalID | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view |
Fields (44)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectInternalID | DefectInternalID | Internal Defect ID | |
| InspectionLot | I_DefectUnion | InspectionLot | Inspection Lot | |
| InspPlanOperationInternalID | I_DefectUnion | InspPlanOperationInternalID | Node Number | |
| InspectionCharacteristic | InspectionCharacteristic | |||
| DefectCategory | DefectCategory | |||
| CreationDate | CreationDate | Time Stamp | ||
| CreationTime | CreationTime | Time of Change | ||
| DefectCode | DefectCode | Damage Code | ||
| DefectCodeGroup | DefectCodeGroup | Code Group | ||
| WorkCenterTypeCode | WorkCenterTypeCode | Object Type | ||
| MainWorkCenterInternalID | MainWorkCenterInternalID | Work Center | ||
| MainWorkCenterPlant | MainWorkCenterPlant | Plnt WorkCenter | ||
| InspectionSpecificationText | _InspectionCharacteristic | InspectionSpecificationText | ||
| WorkCenter | _WorkCenterBySemanticKey | WorkCenter | Work Center | |
| WorkCenterText | ||||
| InspectionSpecificationPlant | _InspectionCharacteristic | InspectionSpecificationPlant | ||
| InspectionSpecification | _InspectionCharacteristic | InspectionSpecification | Master IC | |
| InspectionSpecificationVersion | _InspectionCharacteristic | InspectionSpecificationVersion | ||
| BillOfOperationsType | I_InspectionLot | BillOfOperationsType | Task List Type | |
| BillOfOperationsGroup | I_InspectionLot | BillOfOperationsGroup | Group | |
| BOOOperationInternalID | I_InspectionOperation | BOOOperationInternalID | Task list node | |
| Plant | I_DefectUnion | Plant | Valuation Area | |
| Supplier | ||||
| Material | I_DefectUnion | Material | Vehicle Model | |
| Customer | ||||
| DefectLifecycleStatus | I_DefectUnion | DefectLifecycleStatus | ||
| InspResultHistoryCharc | ||||
| MasterInspCharcsKey | ||||
| NumberOfDefects | ||||
| InspectionLotOrigin | InspectionLotOrigin | |||
| InspectionLotType | InspectionLotType | Inspection Type | ||
| Notification | Notification | Notification | ||
| NotificationItem | NotificationItem | |||
| MatlQualityAuthorizationGroup | MatlQualityAuthorizationGroup | QM Matl Auth. | ||
| IsBusinessPurposeCompleted | IsBusinessPurposeCompleted | Purpose Completed | ||
| MainWorkCenter | MainWorkCenter | Work Center | ||
| _InspectionCharacteristic | _InspectionCharacteristic | |||
| _WorkCenterBySemanticKey | _WorkCenterBySemanticKey | |||
| _DefectCode | _DefectCode | |||
| _DefectCodeGroup | _DefectCodeGroup | |||
| _DefectCategory | _DefectCategory | |||
| _Notification | _Notification | |||
| _InspSpecificationVersionText | _InspSpecificationVersionText | |||
| _InspectionLot | I_DefectUnion | _InspectionLot |
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_DefectKeyFigCube.
-- 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.
-- Parameters: P_StartDate : mm_a_delivery_date, P_EndDate : mm_a_delivery_date
CREATE VIEW I_DefectKeyFigCube AS
SELECT
DefectInternalID,
I_DefectUnion.InspectionLot AS InspectionLot,
I_DefectUnion.InspPlanOperationInternalID AS InspPlanOperationInternalID,
InspectionCharacteristic,
DefectCategory,
CreationDate,
CreationTime,
DefectCode,
DefectCodeGroup,
WorkCenterTypeCode,
MainWorkCenterInternalID,
MainWorkCenterPlant,
_InspectionCharacteristic.InspectionSpecificationText AS InspectionSpecificationText,
_WorkCenterBySemanticKey.WorkCenter AS WorkCenter,
_WorkCenterBySemanticKey._WorkCenterTextBySemanticKey[1:Language=$session.system_language].WorkCenterText AS WorkCenterText,
_InspectionCharacteristic.InspectionSpecificationPlant AS InspectionSpecificationPlant,
_InspectionCharacteristic.InspectionSpecification AS InspectionSpecification,
_InspectionCharacteristic.InspectionSpecificationVersion AS InspectionSpecificationVersion,
I_InspectionLot.BillOfOperationsType AS BillOfOperationsType,
I_InspectionLot.BillOfOperationsGroup AS BillOfOperationsGroup,
I_InspectionOperation.BOOOperationInternalID AS BOOOperationInternalID,
I_DefectUnion.Plant AS Plant,
I_DefectUnion._InspectionLot.Supplier AS Supplier,
I_DefectUnion.Material AS Material,
I_DefectUnion._InspectionLot.Customer AS Customer,
I_DefectUnion.DefectLifecycleStatus AS DefectLifecycleStatus,
concat(concat(concat(concat(concat( concat ( concat (concat( I_InspectionOperation.BillOfOperationsType, '-'), ltrim( I_InspectionOperation.BillOfOperationsGroup , '0') ), '-'), I_InspectionOperation.BillOfOperationsVariant), '-'), I_InspectionOperation.InspectionOperation), '-'), I_DefectUnion.InspectionCharacteristic) AS InspResultHistoryCharc,
concat( concat ( concat (concat( _InspectionCharacteristic.InspectionSpecification, '-'), _InspectionCharacteristic.InspectionSpecificationPlant), '-'), ltrim(_InspectionCharacteristic.InspectionSpecificationVersion, '0') ) AS MasterInspCharcsKey,
cast( 1 as vdm_numberofdefects ) AS NumberOfDefects,
InspectionLotOrigin,
InspectionLotType,
Notification,
NotificationItem,
MatlQualityAuthorizationGroup,
IsBusinessPurposeCompleted,
MainWorkCenter,
I_DefectUnion._InspectionLot AS _InspectionLot
FROM I_DefectUnion
LEFT OUTER JOIN I_InspectionLot ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_InspectionOperation ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_InspectionCharacteristic AS _InspectionCharacteristic ON InspectionLot = _InspectionCharacteristic.InspectionLot AND InspPlanOperationInternalID = _InspectionCharacteristic.InspPlanOperationInternalID AND InspectionCharacteristic = _InspectionCharacteristic.InspectionCharacteristic -- association [0..1]
LEFT OUTER JOIN I_WorkCenterBySemanticKey AS _WorkCenterBySemanticKey ON MainWorkCenterInternalID = _WorkCenterBySemanticKey.WorkCenterInternalID AND MainWorkCenterPlant = _WorkCenterBySemanticKey.Plant -- association [0..1]
LEFT OUTER JOIN I_InspSpecificationVersionText AS _InspSpecificationVersionText ON inspectionspecificationplant = _InspSpecificationVersionText.InspectionSpecificationPlant AND inspectionspecification = _InspSpecificationVersionText.InspectionSpecification AND inspectionspecificationversion = _InspSpecificationVersionText.InspectionSpecificationVersion -- association [1..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- 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