I_MAINTENANCEORDERCOMPONENT_2
Maintenance Order Component
I_MAINTENANCEORDERCOMPONENT_2 is a CDS View in S/4HANA. Maintenance Order Component. It contains 42 fields. 18 CDS views read from this table.
CDS Views using this table (18)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_MaintOrdMaterialAndService | view_entity | from | CONSUMPTION | Manage Components and Services |
| C_MRPMaintenanceOrderComponent | view | from | CONSUMPTION | MRP Maintenance Order Component |
| I_MaintOrderComponentDEX | view_entity | from | COMPOSITE | Maintenance Order Component Data |
| I_MaintOrderOperComp | view | from | COMPOSITE | Maintenance Order Operation Component |
| I_MaintOrdOpCompProcmtQuantity | view_entity | from | TRANSACTIONAL | Maint order op comp procured quantity |
| I_MaintOrdStkCompAvailyStatus | view_entity | from | COMPOSITE | Maint Ord Stock Comp Availability Status |
| I_MRPOrderComponent | view | union_all | COMPOSITE | Mfg Component and Maint Component |
| P_ClosedOrdCompInconsistency | view_entity | from | CONSUMPTION | Maint.order comp. closed stat Inconstcy |
| P_DeletedCompInconsistency | view_entity | from | CONSUMPTION | Maint.order comp. deletion Inconstcy |
| P_MaintBacklogNonStkCompUnion | view | from | CONSUMPTION | Maintenance Backlog Non Stock Component Union |
| P_MaintBacklogServiceUnion | view | from | CONSUMPTION | |
| P_MaintOrdCompInconsistency | view_entity | from | CONSUMPTION | Maint. order component Inconsistencies |
| P_MaintOrdDirectProcmtViaPO | view | from | COMPOSITE | |
| P_MaintOrdDirectProcmtViaPR | view | from | COMPOSITE | |
| P_MaintPlngBcktOrderComponent | view | from | CONSUMPTION | |
| R_MaintJobWorkItemComponentTP | view_entity | from | COMPOSITE | Maintenance Job Work Item Component TP |
| R_MaintJobWorkItemService | view_entity | from | BASIC | Planned service in work item |
| R_MaintOrderOpComponentTP_2 | view_entity | from | TRANSACTIONAL | Maintenance Order Operation Component TP |
Fields (42)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | MaintenanceOrder | MaintenanceOrder,ManufacturingOrder | 9 |
| KEY | MaintenanceOrderOperation | MaintenanceOrderOperation,ManufacturingOrderOperation | 6 |
| KEY | MaintenanceOrderSubOperation | MaintenanceOrderSubOperation | 4 |
| KEY | MaintOrderComponentInternalID | MaintOrderComponentInternalID,MaintOrdProcurementDocument | 8 |
| _Material | _Material | 1 | |
| _MaterialGroup | _MaterialGroup | 1 | |
| _MaterialText | _MaterialText | 1 | |
| _PurchaseRequisitionItem | _PurchaseRequisitionItem | 1 | |
| _StatusObject | _StatusObject | 1 | |
| _StatusObjectActiveStatus | _StatusObjectActiveStatus | 1 | |
| _Supplier | _Supplier | 1 | |
| _UnitOfMeasure | _UnitOfMeasure | 1 | |
| BaseUnit | BaseUnit | 5 | |
| ComponentDescription | ComponentDescription,MaterialName | 3 | |
| ConfirmedAvailableQuantity | ConfirmedAvailableQuantity | 1 | |
| ExpectedOverallLimitAmount | ExpectedOverallLimitAmount | 1 | |
| GoodsMovementType | GoodsMovementType | 3 | |
| MaintComponentItemCategory | MaintComponentItemCategory,MaintOrdOpCompItemCategory | 3 | |
| MaintenanceOrderComponent | MaintenanceOrderComponent | 2 | |
| MaintOrderOperationCounter | MaintOrderOperationCounter | 3 | |
| MaintOrderRoutingNumber | MaintOrderRoutingNumber | 2 | |
| Material | Material,Product | 5 | |
| MaterialGroup | MaterialGroup,ProductGroup | 3 | |
| OverallLimitAmount | OverallLimitAmount | 1 | |
| PerformancePeriodEndDate | PerformancePeriodEndDate | 1 | |
| PerformancePeriodStartDate | PerformancePeriodStartDate | 1 | |
| Plant | MRPPlant | 1 | |
| ProductTypeCode | ProductTypeCode | 3 | |
| PurchaseRequisition | PurchaseRequisition | 3 | |
| PurchaseRequisitionItem | PurchaseRequisitionItem | 3 | |
| QuantityWithdrawnInBaseUnit | WithdrawnQuantity | 1 | |
| RequirementDate | RequirementDate | 5 | |
| RequirementQuantityInBaseUnit | OrderedQuantity,RequirementQuantityInBaseUnit | 5 | |
| RequirementTime | RequirementTime | 1 | |
| Reservation | Reservation | 3 | |
| ReservationIsFinallyIssued | IsCompletelyDelivered | 2 | |
| ReservationItem | ReservationItem | 4 | |
| ReservationType | RecordType,ReservationType | 3 | |
| ServicePerformer | ServicePerformer | 1 | |
| SrvcSchedgIsAlignedWthOpWrkCtr | SrvcSchedgIsAlignedWthOpWrkCtr | 1 | |
| Supplier | PreferredSupplier,Supplier | 3 | |
| WithdrawnQuantity | WithdrawnQuantity | 2 |
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Maintenance Order Component'
@VDM.viewType: #BASIC
@Analytics.technicalName: 'IMAINTORDCOMP2'
@ObjectModel.representativeKey: 'MaintOrderComponentInternalID'
@ObjectModel.semanticKey: [ 'MaintenanceOrder', 'MaintenanceOrderOperation',
'MaintenanceOrderSubOperation', 'MaintOrderComponentInternalID' ]
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #XL
define view entity I_MaintenanceOrderComponent_2
as select from resb
left outer to one join aufk on resb.aufnr = aufk.aufnr
left outer to one join rsdb as rsdb_banfn on rsdb_banfn.rsnum = resb.rsnum
and rsdb_banfn.rspos = resb.rspos
and rsdb_banfn.rsart = resb.rsart
and rsdb_banfn.banfn <> ''
left outer to one join rsadd on resb.rsnum = rsadd.rsnum
and resb.rspos = rsadd.rspos
and resb.rsart = rsadd.rsart
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on _MaintenanceOrder.MaintenanceOrder = $projection.MaintenanceOrder
association [0..1] to I_MaintenanceOrderOperation as _MaintenanceOrderOperation on _MaintenanceOrderOperation.MaintenanceOrder = $projection.MaintenanceOrder
and _MaintenanceOrderOperation.MaintOrderRoutingNumber = $projection.MaintOrderRoutingNumber
and _MaintenanceOrderOperation.MaintOrderOperationCounter = $projection.MaintOrderOperationCounter
association [0..1] to I_Material as _Material on _Material.Material = $projection.Material
association [0..*] to I_MaterialText as _MaterialText on _MaterialText.Material = $projection.Material
association [0..1] to I_MaterialGroup as _MaterialGroup on _MaterialGroup.MaterialGroup = $projection.MaterialGroup
association [0..1] to I_StorageLocation as _StorageLocation on _StorageLocation.Plant = $projection.Plant
and _StorageLocation.StorageLocation = $projection.StorageLocation
association [0..1] to I_Supplier as _Supplier on _Supplier.Supplier = $projection.Supplier
association [0..1] to I_StatusObject as _StatusObject on _StatusObject.StatusObject = $projection.MaintOrderComponentInternalID
association [0..1] to I_Plant as _Plant on _Plant.Plant = $projection.Plant
association [0..1] to I_PMUnitOfMeasureVH as _UnitOfMeasure on _UnitOfMeasure.UnitOfMeasure = $projection.BaseUnit
association [0..1] to I_PMUnitOfMeasureVH as _UnitOfMeasureEntry on _UnitOfMeasureEntry.UnitOfMeasure = $projection.UnitOfEntry
association [0..1] to I_SafetyRelevance as _SafetyRelevance on _SafetyRelevance.SafetyRelevantObjectType = 'MA'
and _SafetyRelevance.SafetyRelevantObject = $projection.Material
association [0..*] to I_MaintCompItemCategoryTxt as _ItemCategoryText on _ItemCategoryText.MaintComponentItemCategory = $projection.MaintComponentItemCategory
association [0..1] to I_Purchaserequisitionitem as _PurchaseRequisitionItem on _PurchaseRequisitionItem.PurchaseRequisition = $projection.PurchaseRequisition
and _PurchaseRequisitionItem.PurchaseRequisitionItem = $projection.PurchaseRequisitionItem
association [0..1] to I_Indicator as _ReservationIsFinallyIssued on $projection.ReservationIsFinallyIssued = _ReservationIsFinallyIssued.IndicatorValue
association [0..1] to I_ProductTypeCode as _ProductTypeCode on _ProductTypeCode.ProductTypeCode = $projection.ProductTypeCode
association [0..1] to I_ReservationDocumentItem as _ReservationItem on _ReservationItem.Reservation = $projection.Reservation
and _ReservationItem.ReservationItem = $projection.ReservationItem
and _ReservationItem.RecordType = $projection.ReservationType
association [0..1] to I_PurReqnOrResvnGeneration as _PurReqnOrResvnGeneration on $projection.PurReqnOrResvnGeneration = _PurReqnOrResvnGeneration.PurReqnOrResvnGeneration
association [0..*] to I_StatusObjectActiveStatus as _StatusObjectActiveStatus on $projection.MaintOrderComponentInternalID = _StatusObjectActiveStatus.StatusObject
association [0..*] to I_MaintOrdCompDelivDateAdjmtT as _MaintOrdCompDelivDateAdjmtT on $projection.MaintOrdCompDeliveryDateAdjmt = _MaintOrdCompDelivDateAdjmtT.MaintOrdCompDeliveryDateAdjmt
// AC association [0..*] to I_PurchaseOrderItemAPI01 as _PurchaseOrder on $projection.PurchaseRequisition = _PurchaseOrder.PurchaseRequisition
// and $projection.PurchaseRequisitionItem = _PurchaseOrder.PurchaseRequisitionItem
// and _PurchaseOrder.PurchaseRequisition is not initial
association [0..1] to I_PurchasingGroup as _PurchasingGroup on $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
association [1..1] to I_PurchasingOrganization as _PurchasingOrganization on $projection.ResponsiblePurchaseOrg = _PurchasingOrganization.PurchasingOrganization
{
@ObjectModel.foreignKey.association: '_MaintenanceOrder'
key resb.aufnr as MaintenanceOrder,
key cast( resb.vornr as maintenanceorderoperation preserving type ) as MaintenanceOrderOperation,
key cast( resb.uvorn as maintenanceordersuboperation preserving type ) as MaintenanceOrderSubOperation,
key resb.objnr as MaintOrderComponentInternalID,
resb.rsnum as Reservation,
@ObjectModel.foreignKey.association: '_ReservationItem'
resb.rspos as ReservationItem,
resb.rsart as ReservationType,
cast( resb.posnr as maintenanceordercomponent preserving type ) as MaintenanceOrderComponent,
@ObjectModel.text.association: '_MaterialText'
resb.matnr as Material,
resb.potx1 as ComponentDescription,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
resb.bdmng as RequirementQuantityInBaseUnit,
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
resb.meins as BaseUnit,
@Semantics.quantity.unitOfMeasure: 'UnitOfEntry'
@DefaultAggregation: #SUM
resb.erfmg as QuantityInUnitOfEntry,
@ObjectModel.foreignKey.association: '_UnitOfMeasureEntry'
resb.erfme as UnitOfEntry,
resb.bdter as RequirementDate,
resb.bdztp as RequirementTime,
resb.lifnr as Supplier,
@ObjectModel.foreignKey.association: '_Plant'
resb.werks as Plant,
@ObjectModel.foreignKey.association: '_StorageLocation'
resb.lgort as StorageLocation,
resb.aufpl as MaintOrderRoutingNumber,
resb.aplzl as MaintOrderOperationCounter,
@ObjectModel.text.association: '_ItemCategoryText'
resb.postp as MaintComponentItemCategory,
@ObjectModel.foreignKey.association: '_MaterialGroup'
resb.matkl as MaterialGroup,
-- careful: XLOEK refers to the reservation! After confirmation of order, reservation is always "deleted"
-- --> see logic in composite view, where we check the system status
resb.xloek as IsDeleted,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
resb.enmng as QuantityWithdrawnInBaseUnit,
@ObjectModel.foreignKey.association: '_PurReqnOrResvnGeneration'
cast(
case
when resb.no_disp = '1' then '1'
when resb.no_disp = 'X' then '2'
when resb.no_disp = '' then '3'
when resb.no_disp = 'B' then '4'
end as purreqnorresvngeneration) as PurReqnOrResvnGeneration,
@ObjectModel.foreignKey.association: '_ReservationIsFinallyIssued'
resb.kzear as ReservationIsFinallyIssued,
cast(
case when resb.dbskz = 'F' then 'X'
end as xfeld ) as MaterialCompIsProcuredDirectly,
rsdb_banfn.banfn as PurchaseRequisition,
rsdb_banfn.bnfpo as PurchaseRequisitionItem,
//needs to be exposed for I_MaintOrderComponentDEX (key of rsdb)
rsdb_banfn.rsinz as ResvnPurchasingDocumentNumber,
@ObjectModel.foreignKey.association: '_ProductTypeCode'
resb.producttype as ProductTypeCode,
resb.startdate as PerformancePeriodStartDate,
resb.enddate as PerformancePeriodEndDate,
resb.performanceperiodstarttime as PerformancePeriodStartTime,
resb.performanceperiodendtime as PerformancePeriodEndTime,
@Semantics.quantity.unitOfMeasure: 'LeanServiceDurationUnit'
resb.serviceduration as LeanServiceDuration,
resb.servicedurationunit as LeanServiceDurationUnit,
resb.funct as DistributionFunction,
cast(
case
when resb.kzmpf = 'X' then 'M'
when resb.funct = 'S10' then ''
when resb.funct = 'S50' then 'X'
end as cc4_delvry_date_adj preserving type ) as MaintOrdCompDeliveryDateAdjmt,
resb.operationworkcenteralignment as SrvcSchedgIsAlignedWthOpWrkCtr,
resb.serviceperformer as ServicePerformer,
resb.bwart as GoodsMovementType,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(resb.enmng as pph_enmng preserving type) as WithdrawnQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(resb.vmeng as pph_vmeng preserving type) as ConfirmedAvailableQuantity,
// Debit-Credit Indicator
resb.shkzg as MaintOrderCompDebitCreditCode,
-- Field Logistics:
@Feature: 'BF:FIELD_LOGISTICS'
// Note: After removal of feature toggle, @Feature shall be switched to BF:FIELD_LOGISTICS
resb.fldlogsdelivisheldonshore as FldLogsDelivIsHeldOnShore,
@Feature: 'BF:FIELD_LOGISTICS'
resb.fldlogssupplyprocess as FldLogsSupplyProcess,
resb.xwaok as GoodsMovementIsAllowed,
resb.charg as MaintenanceOrderComponentBatch,
resb.fmeng as QuantityIsFixed,
resb.waers as MaintOrdOpComponentCurrency,
resb.saknr as MaintOrdOpComponentGLAccount,
resb.sanka as MaintOrdOpCompCostingRelevancy,
resb.ewahr as MaintCompAltvProdUsgeRateInPct,
resb.sortf as MaintOrderOpComponentSortText,
resb.schgt as MaintOrdOpCompIsBulkProduct,
resb.beikz as MaterialProvisionType,
cast( resb.pspel as ps_s4_pspnr preserving type ) as MaintOrdOpCompAssgdWBSElmntInt,
@Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
@DefaultAggregation: #SUM
resb.gpreis as MaintOrderOpComponentPrice,
resb.peinh as MaintOrdOpCompPriceUnitQty,
resb.rgekz as MatlCompIsMarkedForBackflush,
resb.ekgrp as PurchasingGroup,
resb.lifzt as DeliveryTimeInDays,
resb.wempf as MaintOrdOpCompGdsRecipientName,
resb.ablad as MaintOrdOpCompUnloadingPtTxt,
resb.webaz as GoodsReceiptDurationInWorkDays,
resb.infnr as PurchasingInfoRecord,
@Semantics.quantity.unitOfMeasure: 'OpsLeadTimeOffsetUnit'
resb.nlfzv as OperationLeadTimeOffset,
resb.nlfmv as OpsLeadTimeOffsetUnit,
rsadd.bednr as MaintOrdOpCompProcmtTrckgNmbr,
rsadd.ekorg as ResponsiblePurchaseOrg,
resb.ebeln as MaintOrdOpCompPurOutlineAgrmt,
resb.ebelp as MaintOrdCompPurOutlineAgrmtItm,
cast( rsdb_banfn.aobar as ps_s4_aobar preserving type ) as OrderOpRelationshipIntType,
rsdb_banfn.zeinh as OpRelshpOffsetDurationUnit,
@Semantics.quantity.unitOfMeasure: 'OpRelshpOffsetDurationUnit'
rsdb_banfn.dauer as OpRelshpOffsetDuration,
resb.dbskz as MaintOrdCompIsDirectlyProcured,
resb.sobkz as MaintOrdOpCompSpecialStockType,
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
resb.roms1 as VariableSizeDimension1,
resb.romei as VariableSizeDimensionUnit,
resb.rform as VariableSizeCompFormulaKey,
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
resb.roms2 as VariableSizeDimension2,
cast(resb.roanz as vdm_roanz) as NumberOfVariableSizeItem,
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
resb.roms3 as VariableSizeDimension3,
@Semantics.quantity.unitOfMeasure: 'VariableSizeComponentUnit'
resb.romen as VariableSizeItemQuantity,
resb.rokme as VariableSizeComponentUnit,
resb.kzmpf as RqmtDateIsEnteredManually,
rsadd.idnlf as SupplierProduct,
rsadd.afnam as MaintOrdOpCompRequisitioner,
@Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
rsadd.overalllimitamount as OverallLimitAmount,
@Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
rsadd.expectedoveralllimitamount as ExpectedOverallLimitAmount,
resb.maintordcompcmtdqtyiskept as MaintOrdCompCmtdQtyIsKept,
rsadd.catalogid as MaintOrdOpCompProcmtCatalog,
rsadd.catalog_prod_id as MaintOrdOpCompProcmtCatalogItm,
// associations:
_MaintenanceOrder,
_MaintenanceOrderOperation,
_Material,
_MaterialText,
_MaterialGroup,
_StorageLocation,
_Plant,
_ItemCategoryText,
_UnitOfMeasure,
_UnitOfMeasureEntry,
_StatusObject,
_SafetyRelevance,
_Supplier,
_PurchaseRequisitionItem,
_ReservationIsFinallyIssued,
_ProductTypeCode,
_ReservationItem,
_PurReqnOrResvnGeneration,
_StatusObjectActiveStatus,
_MaintOrdCompDelivDateAdjmtT,
// _PurchaseOrder,
_PurchasingGroup,
_PurchasingOrganization
}
where
aufk.autyp = '30'