A_Defect2

DDL: A_DEFECT2 Type: view_entity CONSUMPTION Package: ODATA_QM_DEFECT_API

Defect

A_Defect2 is a Consumption CDS View that provides data about "Defect" in SAP S/4HANA. It reads from 1 data source (R_DefectTP) and exposes 55 fields with key field DefectInternalID. It has 1 association to related views. It is exposed through 1 OData service (API_DEFECT). Part of development package ODATA_QM_DEFECT_API.

Data Sources (1)

SourceAliasJoin Type
R_DefectTP R_DefectTP projection

Associations (1)

CardinalityTargetAliasCondition
[1..1] E_NotificationItem _Extension $projection.DefectInternalID = _Extension.Notification and _Extension.NotificationItem = '0000'

Annotations (11)

NameValueLevelField
EndUserText.label Defect view
AccessControl.authorizationCheck #MANDATORY view
VDM.viewType #CONSUMPTION view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.representativeKey DefectInternalID view
OData.entitySet.name Defect view
OData.entityType.name Defect_Type view
Metadata.ignorePropagatedAnnotations true view

OData Services (1)

ServiceBindingVersionContractRelease
API_DEFECT API_DEFECT V4 C2 C1

Fields (55)

KeyFieldSource TableSource FieldDescription
KEY DefectInternalID _Defect DefectInternalID
Defect _Defect Defect
DefectCategory _Defect DefectCategory
CreatedByUser _Defect CreatedByUser
CreationDate _Defect CreationDate
CreationTime _Defect CreationTime
LastChangedByUser _Defect LastChangedByUser
LastChangeDate _Defect LastChangeDate
LastChangeTime _Defect LastChangeTime
DefectText _Defect DefectText
DefectCodeCatalog _Defect DefectCodeCatalog
DefectCodeGroup _Defect DefectCodeGroup
DefectCode _Defect DefectCode
DefectCodeVersion _Defect DefectCodeVersion
DefectObjectCodeCatalog _Defect DefectLocationCatalog
DefectObjectCodeGroup _Defect DefectLocationCodeGroup
DefectObjectCode _Defect DefectLocationCode
DefectObjectCodeVersion _Defect DefectLocationCodeVersion
DefectiveQuantity _Defect DefectiveQuantity
DefectiveQuantityUnit _Defect DefectiveQuantityUnit
ManufacturingOrder _Defect ProductionOrder
OrderInternalID _Defect OrderInternalID
ManufacturingOrderOperation
ManufacturingOrderSequence _Defect ProductionOrderSequence
DefectClass _Defect DefectClass
NumberOfDefects _Defect NumberOfDefects
InspPlanOperationInternalID _Defect InspPlanOperationInternalID
InspectionCharacteristic _Defect InspectionCharacteristic
InspectionSubsetInternalID _Defect InspectionSubsetInternalID
MaterialSample _Defect MaterialSample
WorkCenterTypeCode _Defect WorkCenterTypeCode
MainWorkCenterInternalID _Defect MainWorkCenterInternalID
MainWorkCenterPlant _Defect MainWorkCenterPlant
MainWorkCenter _Defect MainWorkCenter
IsDeleted _Defect IsDeleted
DefectOrigin _Defect DefectOrigin
Material _Defect Material
Batch _Defect Batch
Plant _Defect Plant
StorageLocation _Defect StorageLocation
InspectionLot _Defect InspectionLot
ChangedDateTime _Defect ChangedDateTime
DefectLifecycleStatus _Defect DefectLifecycleStatus
ProblemAnalysisStatus _Defect ProblemAnalysisStatus
QualityIssueReference _Defect QualityIssueReference
MasterLanguage _Defect MasterLanguage
DefectUUID _Defect DefectUUID
ProductionSupplyArea _Defect ProductionSupplyArea
EWMWarehouse _Defect EWMWarehouse
SourceStorageType _Defect SourceStorageType
SourceStorageBin _Defect SourceStorageBin
WarehouseLogicalSystem _Defect WarehouseLogicalSystem
DefectCausedBy _Defect DefectCausedBy
CostCenter _Defect CostCenter
_InspectionLot _Defect _InspectionLot
@EndUserText.label: 'Defect'
@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #CONSUMPTION
@VDM.lifecycle.contract.type: #PUBLIC_REMOTE_API
@VDM.usage.type: [ #TRANSACTIONAL_PROCESSING_SERVICE ]
@ObjectModel: {
  usageType: {
    dataClass: #TRANSACTIONAL,
    sizeCategory: #L,
    serviceQuality: #B
  },
  representativeKey: 'DefectInternalID',
  semanticKey: ['Defect']
}
@OData: {
  entitySet:  { name: 'Defect' },
  entityType: { name: 'Defect_Type' }
}
@Metadata.ignorePropagatedAnnotations: true

define root view entity A_Defect2 
  provider contract transactional_query
  as projection on R_DefectTP as _Defect

  association [1..1] to E_NotificationItem as _Extension on  $projection.DefectInternalID = _Extension.Notification
                                                         and _Extension.NotificationItem = '0000'
{
  key _Defect.DefectInternalID,
  
      _Defect.Defect,
      _Defect.DefectCategory,
      _Defect.CreatedByUser,
      _Defect.CreationDate,
      @Semantics.time: true
      _Defect.CreationTime, 
      _Defect.LastChangedByUser,
      _Defect.LastChangeDate,
      @Semantics.time: true
      _Defect.LastChangeTime, 
      _Defect.DefectText,
      _Defect.DefectCodeCatalog,
      _Defect.DefectCodeGroup,
      _Defect.DefectCode,
      @Consumption.hidden: true      
      _Defect.DefectCodeVersion, // Do we need this field? Value is fix '0001' for each case 

      _Defect.DefectLocationCatalog   as DefectObjectCodeCatalog,
      _Defect.DefectLocationCodeGroup as DefectObjectCodeGroup,
      _Defect.DefectLocationCode      as DefectObjectCode,
      @Consumption.hidden: true
      _Defect.DefectLocationCodeVersion as DefectObjectCodeVersion, // Do we need this field? Value is fix '0001' for each case

      
      @Semantics.quantity.unitOfMeasure: 'DefectiveQuantityUnit'
      _Defect.DefectiveQuantity,
      @Semantics.unitOfMeasure: true
      _Defect.DefectiveQuantityUnit,
      
      _Defect.ProductionOrder as ManufacturingOrder,
      _Defect.OrderInternalID,
      cast( _Defect.ProductionOrderOperation as vdm_vornr preserving type ) as ManufacturingOrderOperation,
      _Defect.ProductionOrderSequence as ManufacturingOrderSequence,
      
      _Defect.DefectClass,
      _Defect.NumberOfDefects,
      _Defect.InspPlanOperationInternalID,
      _Defect.InspectionCharacteristic,
      _Defect.InspectionSubsetInternalID,
      _Defect.MaterialSample,
      
//     Work center data

      _Defect.WorkCenterTypeCode,  
      _Defect.MainWorkCenterInternalID,  
      _Defect.MainWorkCenterPlant,
      _Defect.MainWorkCenter,
      
//      _Defect.Equipment, 

//      _Defect.FunctionalLocation,

       
      @Semantics.booleanIndicator: true
      _Defect.IsDeleted,
      _Defect.DefectOrigin,
      _Defect.Material, 
      _Defect.Batch,
      _Defect.Plant,
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.StorageLocation,
      @ObjectModel.sapObjectNodeTypeReference: 'InspectionLot'
      _Defect.InspectionLot,
//      _Defect.CatalogProfile,

      
      _Defect.ChangedDateTime,
      _Defect.DefectLifecycleStatus,
      _Defect.ProblemAnalysisStatus,
      
      _Defect.QualityIssueReference,
      _Defect.MasterLanguage,
      _Defect.DefectUUID,
      
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.ProductionSupplyArea,
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.EWMWarehouse,
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.SourceStorageType,
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.SourceStorageBin,
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.WarehouseLogicalSystem,
      
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.DefectCausedBy,
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _Defect.CostCenter,
      
      /* Association */
      @Feature: 'QM_CE_DEFECT_WAREHOUSE_DEF'
      _DefectAffectedObject : redirected to composition child A_DefectAffectedObject,
      _DefectLongText       as _DefectDetailedDescription : redirected to composition child A_DefectDetailedDescriptionT,
      
      @Consumption.hidden: true
      _Defect._InspectionLot as _InspectionLot 
}