A_DefectCode

DDL: A_DEFECTCODE SQL: ADEFECTCODE Type: view BASIC

Defect Codes

A_DefectCode is a Basic CDS View that provides data about "Defect Codes" in SAP S/4HANA. It reads from 1 data source (I_DefectCode) and exposes 7 fields with key fields DefectCodeGroup, DefectCode. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_DefectCode _DefectCode from

Associations (2)

CardinalityTargetAliasCondition
[1..1] A_DefectCodeGroup _DefectCodeGroup $projection.DefectCodeGroup = _DefectCodeGroup.DefectCodeGroup
[0..*] A_DefectCodeText _Text $projection.DefectCodeGroup = _Text.DefectCodeGroup and $projection.DefectCode = _Text.DefectCode

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName ADEFECTCODE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
EndUserText.label Defect Codes view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.representativeKey DefectCode view
Metadata.ignorePropagatedAnnotations true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY DefectCodeGroup I_DefectCode DefectCodeGroup Code Group
KEY DefectCode I_DefectCode DefectCode Damage Code
CodeIsInactive
CodeGroupStatus _DefectCodeGroup CodeGroupStatus
CodeGroupIsUsable _DefectCodeGroup CodeGroupIsUsable
_DefectCodeGroup _DefectCodeGroup
_Text _Text

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 A_DefectCode.
-- 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: ADEFECTCODE

CREATE VIEW A_DefectCode AS
SELECT
  _DefectCode.DefectCodeGroup AS DefectCodeGroup,
  _DefectCode.DefectCode AS DefectCode,
  cast( _DefectCode.CodeIsInactive as qinak preserving type ) AS CodeIsInactive,
  _DefectCodeGroup.CodeGroupStatus AS CodeGroupStatus,
  _DefectCodeGroup.CodeGroupIsUsable AS CodeGroupIsUsable
FROM I_DefectCode AS _DefectCode
LEFT OUTER JOIN A_DefectCodeGroup AS _DefectCodeGroup ON DefectCodeGroup = _DefectCodeGroup.DefectCodeGroup  -- association [1..1]
LEFT OUTER JOIN A_DefectCodeText AS _Text ON DefectCodeGroup = _Text.DefectCodeGroup AND DefectCode = _Text.DefectCode  -- association [0..*]
;