@AbapCatalog.sqlViewName : 'CDEFECTSBYCODE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label : 'Defects by Defect Code'
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {
dataClass: #TRANSACTIONAL,
sizeCategory: #L,
serviceQuality: #C
}
-- DEPRECATED - This view is deprecated and is no longer used.
define view C_DefectsByCode
as select from I_DefectUnion
association [1..1] to I_WorkCenterBySemanticKey as _WorkCenter on $projection.MainWorkCenterInternalID = _WorkCenter.WorkCenterInternalID
and $projection.MainWorkCenterPlant = _WorkCenter.Plant
//Week & Year format
association [1..1] to I_CalendarDate as _DefectsWeek on $projection.CreationDate = _DefectsWeek.CalendarDate
association [0..1] to I_Notification as _Notification on $projection.Notification = _Notification.Notification
{
@DefaultAggregation: #NONE
@ObjectModel.readOnly: true
key I_DefectUnion.DefectInternalID,
I_DefectUnion.Notification,
I_DefectUnion.NotificationItem,
@DefaultAggregation: #NONE
@ObjectModel.readOnly: true
I_DefectUnion.Defect,
@ObjectModel.readOnly: true
I_DefectUnion._DefectCode._Text[1:Language=$session.system_language].DefectCodeText,
@ObjectModel: { readOnly: true , text.element: [ 'DefectCodeText' ], foreignKey.association : '_DefectCode' }
@EndUserText.label : 'Defect Code'
I_DefectUnion.DefectCode,
@ObjectModel.readOnly: true
I_DefectUnion._DefectCodeGroup._Text[1:Language=$session.system_language].DefectCodeGroupText,
@ObjectModel: { readOnly: true , text.element: [ 'DefectCodeGroupText' ], foreignKey.association : '_DefectCodeGroup' }
I_DefectUnion.DefectCodeGroup,
@ObjectModel: {
readOnly: true ,
// sort: { enabled: true , transformedBy: 'ABAP:CL_QM_DEFECT_MANAGE_EXIT' } , -- probably not needed
// filter : { enabled: true , transformedBy: 'ABAP:CL_QM_DEFECT_MANAGE_EXIT' }, -- probably not needed
text.element: ['DefectCodeText']
}
cast ( concat_with_space(I_DefectUnion.DefectCodeGroup, I_DefectUnion.DefectCode, 1) as qdefect_code_group_and_code preserving type ) as DefectCodeGroupAndCode,
@DefaultAggregation: #SUM
@ObjectModel.readOnly: true
@EndUserText.label : 'Defects'
I_DefectUnion.NumberOfDefects,
//Fields for filter
@UI.hidden: true
I_DefectUnion.Material,
@UI.hidden: true
I_DefectUnion.Plant,
@UI.hidden: true
I_DefectUnion._InspectionLot.InspectionLotOrigin,
@UI.hidden: true
I_DefectUnion.CreationDate,
@UI.hidden: true
I_DefectUnion._InspectionLot.Supplier,
@UI.hidden: true
I_DefectUnion._InspectionLot.Customer,
@UI.hidden: true
I_DefectUnion.DefectCategory,
@UI.hidden: true
I_DefectUnion.DefectClass,
@UI.hidden: true
I_DefectUnion.MainWorkCenterInternalID,
@UI.hidden: true
I_DefectUnion.MainWorkCenterPlant,
@UI.hidden: true
_WorkCenter.WorkCenter,
@UI.hidden: true
I_DefectUnion._InspectionLot.InspectionLotType,
@UI.hidden: true
I_DefectUnion._InspectionLot.Batch,
@UI.hidden: true
I_DefectUnion._InspectionLot.BatchStorageLocation,
@UI.hidden: true
_DefectsWeek.CalendarWeek,
@UI.hidden: true
_DefectsWeek.CalendarYear,
@UI.hidden: true
I_DefectUnion._InspectionLot.Manufacturer,
@UI.hidden: true
I_DefectUnion._InspectionLot.ManufacturerPartNmbr,
@UI.hidden: true
I_DefectUnion._InspectionLot.PurchasingOrganization,
@UI.hidden: true
I_DefectUnion._InspectionLot.PurchasingDocument,
@UI.hidden: true
I_DefectUnion._InspectionLot.ManufacturingOrder,
@UI.hidden: true
I_DefectUnion._InspectionLot.SalesOrder,
@UI.hidden: true
I_DefectUnion._InspectionLot.DeliveryDocument,
@UI.hidden: true
I_DefectUnion._InspectionLot.SalesOrganization,
@UI.hidden: true
I_DefectUnion._InspectionLot.MaterialByCustomer,
@UI.hidden: true
cast ( I_DefectUnion._InspectionLot.InspectionLotHasUsageDecision as xfeld) as InspectionLotHasUsageDecision,
@Consumption.hidden: true
InspectionLot,
@Consumption.hidden: true
_InspectionLot.IsBusinessPurposeCompleted,
// Authorization check related fields
@Consumption.hidden: true
I_DefectUnion.WorkCenterTypeCode,
@Consumption.hidden: true
I_DefectUnion.MainWorkCenter,
//Associations
@Consumption.filter .hidden: true
_WorkCenter,
@Consumption.filter .hidden: true
_DefectsWeek,
@Consumption.filter .hidden: true
_Notification, //do not publish this association via the OData service, it is just needed for auth. check!
@Consumption.filter .hidden: true
@Consumption.hidden: true
_InspectionLot,
@Consumption.filter .hidden: true
_DefectCode,
@Consumption.filter .hidden: true
_DefectCodeGroup
} where I_DefectUnion.DefectCode <> '' and I_DefectUnion.DefectCode is not null
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_CALENDARDATE",
"I_DEFECTCODE",
"I_DEFECTCODEGROUP",
"I_DEFECTCODEGROUPTEXT",
"I_DEFECTCODETEXT",
"I_DEFECTUNION",
"I_INSPECTIONLOT",
"I_WORKCENTERBYSEMANTICKEY"
],
"ASSOCIATED":
[
"I_CALENDARDATE",
"I_DEFECTCODE",
"I_DEFECTCODEGROUP",
"I_INSPECTIONLOT",
"I_NOTIFICATION",
"I_WORKCENTERBYSEMANTICKEY"
],
"BASE":
[
"I_DEFECTUNION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload