C_DefectCalcFld

DDL: C_DEFECTCALCFLD SQL: CDEFECTCF Type: view CONSUMPTION

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)

SourceAliasJoin Type
I_DefectUnion _Defect_TP from

Associations (2)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;