C_Defect
Defect Consumption View
C_Defect is a Consumption CDS View that provides data about "Defect Consumption View" in SAP S/4HANA. It reads from 1 data source (I_QualityDefectUnion) and exposes 20 fields with key fields DefectInternalID, NotificationItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_QualityDefectUnion | I_QualityDefectUnion | from |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CDEFECT | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | Defect Consumption View | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.serviceQuality | #B | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectInternalID | I_QualityDefectUnion | Notification | Notification |
| KEY | NotificationItem | I_QualityDefectUnion | NotificationItem | |
| Defect | ||||
| DefectCodeGroup | I_QualityDefectUnion | DefectCodeGroup | Code Group | |
| DefectCode | I_QualityDefectUnion | DefectCode | Damage Code | |
| NumberOfDefects | I_QualityDefectUnion | NumberOfDefects | ||
| InspPlanOperationInternalID | I_QualityDefectUnion | InspPlanOperationInternalID | ||
| InspectionCharacteristic | I_QualityDefectUnion | InspectionCharacteristic | ||
| InspectionLot | I_QualityDefectUnion | InspectionLot | Inspection Lot | |
| Plant | I_QualityDefectUnion | Plant | Valuation Area | |
| InspectionLotSum | ||||
| DefectCategory | I_QualityDefectUnion | DefectCategory | ||
| WorkCenterTypeCode | I_QualityDefectUnion | WorkCenterTypeCode | Object Type | |
| MainWorkCenterInternalID | I_QualityDefectUnion | MainWorkCenterInternalID | Work Center | |
| MainWorkCenter | I_QualityDefectUnion | MainWorkCenter | Work Center | |
| MainWorkCenterPlant | I_QualityDefectUnion | MainWorkCenterPlant | Plnt WorkCenter | |
| DefectCodeCatalog | I_QualityDefectUnion | DefectCodeCatalog | ||
| _InspectionLot | I_QualityDefectUnion | _InspectionLot | ||
| _DefectCode | _DefectCode | |||
| _DefectCodeGroup | _DefectCodeGroup |
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 C_Defect.
-- 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: CDEFECT
CREATE VIEW C_Defect AS
SELECT
I_QualityDefectUnion.Notification AS DefectInternalID,
I_QualityDefectUnion.NotificationItem AS NotificationItem,
cast( substring(I_QualityDefectUnion.Notification,2,11) as qdefectid preserving type ) AS Defect,
I_QualityDefectUnion.DefectCodeGroup AS DefectCodeGroup,
I_QualityDefectUnion.DefectCode AS DefectCode,
I_QualityDefectUnion.NumberOfDefects AS NumberOfDefects,
I_QualityDefectUnion.InspPlanOperationInternalID AS InspPlanOperationInternalID,
I_QualityDefectUnion.InspectionCharacteristic AS InspectionCharacteristic,
I_QualityDefectUnion.InspectionLot AS InspectionLot,
I_QualityDefectUnion.Plant AS Plant,
cast (1 as abap.int8) AS InspectionLotSum,
I_QualityDefectUnion.DefectCategory AS DefectCategory,
I_QualityDefectUnion.WorkCenterTypeCode AS WorkCenterTypeCode,
I_QualityDefectUnion.MainWorkCenterInternalID AS MainWorkCenterInternalID,
I_QualityDefectUnion.MainWorkCenter AS MainWorkCenter,
I_QualityDefectUnion.MainWorkCenterPlant AS MainWorkCenterPlant,
I_QualityDefectUnion.DefectCodeCatalog AS DefectCodeCatalog,
I_QualityDefectUnion._InspectionLot AS _InspectionLot
FROM I_QualityDefectUnion
;
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