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_QualityDefectUnion) and exposes 20 fields with key fields DefectInternalID, NotificationItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_QualityDefectUnion | I_QualityDefectUnion | 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 | #S | view | |
| ObjectModel.usageType.serviceQuality | #B | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectInternalID | I_QualityDefectUnion | Notification | |
| KEY | NotificationItem | I_QualityDefectUnion | NotificationItem | |
| Defect | ||||
| DefectCodeGroup | I_QualityDefectUnion | DefectCodeGroup | ||
| DefectCode | I_QualityDefectUnion | DefectCode | ||
| NumberOfDefects | I_QualityDefectUnion | NumberOfDefects | ||
| InspPlanOperationInternalID | I_QualityDefectUnion | InspPlanOperationInternalID | ||
| InspectionCharacteristic | I_QualityDefectUnion | InspectionCharacteristic | ||
| InspectionLot | I_QualityDefectUnion | InspectionLot | ||
| Plant | I_QualityDefectUnion | Plant | ||
| InspectionLotSum | ||||
| DefectCategory | I_QualityDefectUnion | DefectCategory | ||
| WorkCenterTypeCode | I_QualityDefectUnion | WorkCenterTypeCode | ||
| MainWorkCenterInternalID | I_QualityDefectUnion | MainWorkCenterInternalID | ||
| MainWorkCenter | I_QualityDefectUnion | MainWorkCenter | ||
| MainWorkCenterPlant | I_QualityDefectUnion | MainWorkCenterPlant | ||
| DefectCodeCatalog | I_QualityDefectUnion | DefectCodeCatalog | ||
| _InspectionLot | I_QualityDefectUnion | _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: #S,
serviceQuality: #B }
define view C_Defect as select from I_QualityDefectUnion
{
@UI.hidden: true
@ObjectModel.readOnly:true
key I_QualityDefectUnion.Notification as DefectInternalID,
@ObjectModel.readOnly:true
key I_QualityDefectUnion.NotificationItem,
@ObjectModel.readOnly: true
cast( substring(I_QualityDefectUnion.Notification,2,11) as qdefectid preserving type ) as Defect,
//--[ GENERATED:011:GlBfhyFV7jY4gqQmcmHUzm
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_DefectCodeGroupStdVH',
element: 'DefectCodeGroup' }
}]
// ]--GENERATED
@ObjectModel: { readOnly: true, foreignKey.association: '_DefectCodeGroup' }
I_QualityDefectUnion.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_QualityDefectUnion.DefectCode,
@ObjectModel.readOnly: true
I_QualityDefectUnion.NumberOfDefects,
@ObjectModel.readOnly: true
I_QualityDefectUnion.InspPlanOperationInternalID,
@ObjectModel.readOnly: true
I_QualityDefectUnion.InspectionCharacteristic,
@ObjectModel.readOnly: true
I_QualityDefectUnion.InspectionLot,
@UI.hidden: true
@ObjectModel.readOnly: true
I_QualityDefectUnion.Plant,
//Getting count for defects
@UI.hidden: true
cast (1 as abap.int8) as InspectionLotSum,
// Fields for authorization checks
@Consumption.hidden: true
I_QualityDefectUnion.DefectCategory,
@Consumption.hidden: true
I_QualityDefectUnion.WorkCenterTypeCode,
@Consumption.hidden: true
I_QualityDefectUnion.MainWorkCenterInternalID,
@Consumption.hidden: true
I_QualityDefectUnion.MainWorkCenter,
@Consumption.hidden: true
I_QualityDefectUnion.MainWorkCenterPlant,
//@JIRA-KEY S4PRC23FPS3QM-26
@Consumption.hidden: true
I_QualityDefectUnion.DefectCodeCatalog,
/* Associations */
I_QualityDefectUnion._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