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_DefectUnion) and exposes 20 fields with key fields DefectInternalID, NotificationItem. Part of development package ODATA_QM_INSPLOT.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DefectUnion | I_DefectUnion | 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 | #L | view | |
| ObjectModel.usageType.serviceQuality | #C | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectInternalID | I_DefectUnion | DefectInternalID | |
| KEY | NotificationItem | I_DefectUnion | NotificationItem | |
| Defect | I_DefectUnion | Defect | ||
| DefectCodeGroup | I_DefectUnion | DefectCodeGroup | ||
| DefectCode | I_DefectUnion | DefectCode | ||
| NumberOfDefects | I_DefectUnion | NumberOfDefects | ||
| InspPlanOperationInternalID | I_Defect | InspPlanOperationInternalID | ||
| InspectionCharacteristic | I_Defect | InspectionCharacteristic | ||
| InspectionLot | I_Defect | InspectionLot | ||
| Plant | I_DefectUnion | Plant | ||
| InspectionLotSum | ||||
| DefectCategory | I_Defect | DefectCategory | ||
| WorkCenterTypeCode | I_Defect | WorkCenterTypeCode | ||
| MainWorkCenterInternalID | I_Defect | MainWorkCenterInternalID | ||
| MainWorkCenter | I_Defect | MainWorkCenter | ||
| MainWorkCenterPlant | I_Defect | MainWorkCenterPlant | ||
| DefectCodeCatalog | I_DefectUnion | DefectCodeCatalog | ||
| _InspectionLot | I_Defect | _InspectionLot | ||
| _DefectCode | _DefectCode | |||
| _DefectCodeGroup | _DefectCodeGroup |
@AbapCatalog.sqlViewName: 'CDEFECT'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Defect Consumption View'
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType:
{
dataClass: #TRANSACTIONAL,
sizeCategory: #L,
serviceQuality: #C }
define view C_Defect
as select from I_DefectUnion
association [1..1] to I_Defect on $projection.DefectInternalID = I_Defect.DefectInternalID
and $projection.Defect = I_Defect.Defect
{
@UI.hidden: true
@ObjectModel.readOnly:true
key I_DefectUnion.DefectInternalID,
@ObjectModel.readOnly:true
key I_DefectUnion.NotificationItem,
@ObjectModel.readOnly: true
I_DefectUnion.Defect,
//--[ GENERATED:011:GlBfhyFV7jY4gqQmcmHUzm
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_DefectCodeGroupStdVH',
element: 'DefectCodeGroup' }
}]
// ]--GENERATED
@ObjectModel: { readOnly: true, foreignKey.association: '_DefectCodeGroup' }
I_DefectUnion.DefectCodeGroup,
//--[ GENERATED:011:GlBfhyFV7jY4gqQmcmHUzm
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_DefectCodeStdVH',
element: 'DefectCode' },
additionalBinding: [{ localElement: 'DefectCodeGroup',
element: 'DefectCodeGroup' }]
}]
// ]--GENERATED
@ObjectModel: { readOnly: true, foreignKey.association: '_DefectCode' }
I_DefectUnion.DefectCode,
@ObjectModel.readOnly: true
I_DefectUnion.NumberOfDefects,
@ObjectModel.readOnly: true
I_Defect.InspPlanOperationInternalID,
@ObjectModel.readOnly: true
I_Defect.InspectionCharacteristic,
@ObjectModel.readOnly: true
I_Defect.InspectionLot,
@UI.hidden: true
@ObjectModel.readOnly: true
I_DefectUnion.Plant,
//Getting count for defects
@UI.hidden: true
cast (1 as abap.int8) as InspectionLotSum,
// Fields for authorization checks
@Consumption.hidden: true
I_Defect.DefectCategory,
@Consumption.hidden: true
I_Defect.WorkCenterTypeCode,
@Consumption.hidden: true
I_Defect.MainWorkCenterInternalID,
@Consumption.hidden: true
I_Defect.MainWorkCenter,
@Consumption.hidden: true
I_Defect.MainWorkCenterPlant,
@Consumption.hidden: true
I_DefectUnion.DefectCodeCatalog,
/* Associations */
I_Defect._InspectionLot,
_DefectCode,
_DefectCodeGroup
}
where
IsDeleted <> 'X'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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