C_DefectCalcFld
Defects Calculation Fields View
C_DefectCalcFld is a Consumption CDS View that provides data about "Defects Calculation Fields View" in SAP S/4HANA. It reads from 1 data source (I_DefectUnion) and exposes 35 fields with key field Defect. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DefectUnion | _Defect_TP | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Material | _Material | $projection.Material = _Material.Material |
| [1..1] | I_DefectCode | _DefectCode | $projection.DefectCode = _DefectCode.DefectCode and $projection.DefectCodeGroup = _DefectCode.DefectCodeGroup |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CDEFECTCF | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Defects Calculation Fields View | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (35)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Defect | Defect | ||
| CalculationDate | Time Stamp | |||
| CreationDate | CreationDate | Time Stamp | ||
| InspectionLot | InspectionLot | Inspection Lot | ||
| DefectCode | DefectCode | Damage Code | ||
| DefectCodeGroup | DefectCodeGroup | Code Group | ||
| Material | Material | Vehicle Model | ||
| DefectCodeText | ||||
| MaterialName | ||||
| NumberOfDefects | ||||
| Plant | Plant | Valuation Area | ||
| DefectCategory | DefectCategory | |||
| Customer | ||||
| InspectionLotOrigin | _InspectionLot | InspectionLotOrigin | ||
| InspectionLotType | _InspectionLot | InspectionLotType | Inspection Type | |
| InspectionLotHasQuantity | _InspectionLot | InspectionLotHasQuantity | ||
| BatchStorageLocation | _InspectionLot | BatchStorageLocation | ||
| Manufacturer | _InspectionLot | Manufacturer | Manufacturer | |
| ManufacturerPartNmbr | _InspectionLot | ManufacturerPartNmbr | Mfr Part Number | |
| MatlQualityAuthorizationGroup | _InspectionLot | MatlQualityAuthorizationGroup | QM Matl Auth. | |
| PurchasingOrganization | _InspectionLot | PurchasingOrganization | Purchasing Organization | |
| SalesOrganization | _InspectionLot | SalesOrganization | Sales Organization | |
| SoldToParty | _InspectionLot | SoldToParty | Sold-to Party | |
| Supplier | _InspectionLot | Supplier | Supplier | |
| IsBusinessPurposeCompleted | _InspectionLot | IsBusinessPurposeCompleted | Purpose Completed | |
| WorkCenterTypeCode | WorkCenterTypeCode | Object Type | ||
| MainWorkCenterInternalID | MainWorkCenterInternalID | Work Center | ||
| MainWorkCenter | MainWorkCenter | Work Center | ||
| MainWorkCenterPlant | MainWorkCenterPlant | Plnt WorkCenter | ||
| Notification | Notification | Notification | ||
| _DefectCode | _DefectCode | |||
| _Material | _Material | |||
| _DefectCodeGroup | _DefectCodeGroup | |||
| _InspectionLot | _InspectionLot | |||
| _Notification | _Notification |
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_DefectCalcFld.
-- 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: CDEFECTCF
CREATE VIEW C_DefectCalcFld AS
SELECT
Defect,
dats_days_between(cast(left(cast(CreationDate as abap.char(23)), 8) as abap.dats), cast(left( cast(tstmp_current_utctimestamp() as abap.char(23)), 8 ) as abap.dats)) AS CalculationDate,
CreationDate,
InspectionLot,
DefectCode,
DefectCodeGroup,
Material,
_DefectCode._Text[1:Language=$session.system_language].DefectCodeText AS DefectCodeText,
_Material._Text[1:Language=$session.system_language].MaterialName AS MaterialName,
cast( 1 as vdm_numberofdefects ) AS NumberOfDefects,
Plant,
DefectCategory,
_Defect_TP._InspectionLot.Customer AS Customer,
_InspectionLot.InspectionLotOrigin AS InspectionLotOrigin,
_InspectionLot.InspectionLotType AS InspectionLotType,
_InspectionLot.InspectionLotHasQuantity AS InspectionLotHasQuantity,
_InspectionLot.BatchStorageLocation AS BatchStorageLocation,
_InspectionLot.Manufacturer AS Manufacturer,
_InspectionLot.ManufacturerPartNmbr AS ManufacturerPartNmbr,
_InspectionLot.MatlQualityAuthorizationGroup AS MatlQualityAuthorizationGroup,
_InspectionLot.PurchasingOrganization AS PurchasingOrganization,
_InspectionLot.SalesOrganization AS SalesOrganization,
_InspectionLot.SoldToParty AS SoldToParty,
_InspectionLot.Supplier AS Supplier,
_InspectionLot.IsBusinessPurposeCompleted AS IsBusinessPurposeCompleted,
WorkCenterTypeCode,
MainWorkCenterInternalID,
MainWorkCenter,
MainWorkCenterPlant,
Notification
FROM I_DefectUnion AS _Defect_TP
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material -- association [1..1]
LEFT OUTER JOIN I_DefectCode AS _DefectCode ON DefectCode = _DefectCode.DefectCode AND DefectCodeGroup = _DefectCode.DefectCodeGroup -- association [1..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