I_MaintOrdOpComponentMaterial
Fetching Operation Material Data
I_MaintOrdOpComponentMaterial is a Basic CDS View that provides data about "Fetching Operation Material Data" in SAP S/4HANA. It reads from 1 data source (resb) and exposes 54 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID. It has 15 associations to related views. Part of development package IWO1.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| resb | resb | from |
Associations (15)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_MaintOrderOperTechObj | _MaintenanceOrderOperation | $projection.MaintenanceOrder = _MaintenanceOrderOperation.MaintenanceOrder and $projection.MaintenanceOrderOperation = _MaintenanceOrderOperation.MaintenanceOrderOperation |
| [1..1] | I_MaintOrderTechObj | _MaintenanceOrder | $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder |
| [0..*] | I_StatusObjectStatusBasic | _StatusObjectActiveStatus | $projection.MaintOrderComponentInternalID = _StatusObjectActiveStatus.StatusObject |
| [0..1] | I_ReservationDocumentItem | _ReservationItem | _ReservationItem.Reservation = $projection.Reservation and _ReservationItem.ReservationItem = $projection.ReservationItem and _ReservationItem.RecordType = $projection.ReservationType |
| [0..*] | I_MaterialText | _MaterialText | _MaterialText.Material = $projection.Material |
| [0..1] | I_MaterialGroup | _MaterialGroup | _MaterialGroup.MaterialGroup = $projection.MaterialGroup |
| [0..1] | I_Plant | _Plant | _Plant.Plant = $projection.Plant |
| [0..1] | I_StorageLocation | _StorageLocation | _StorageLocation.Plant = $projection.Plant and _StorageLocation.StorageLocation = $projection.StorageLocation |
| [0..*] | I_MaintCompItemCategoryTxt | _ItemCategoryText | _ItemCategoryText.MaintComponentItemCategory = $projection.MaintComponentItemCategory |
| [0..1] | I_ProductTypeCode | _ProductTypeCode | _ProductTypeCode.ProductTypeCode = $projection.ProductTypeCode |
| [0..1] | I_PurReqnOrResvnGeneration | _PurReqnOrResvnGeneration | $projection.PurReqnOrResvnGeneration = _PurReqnOrResvnGeneration.PurReqnOrResvnGeneration |
| [0..1] | I_PMUnitOfMeasureVH | _UnitOfMeasure | _UnitOfMeasure.UnitOfMeasure = $projection.BaseUnit |
| [0..1] | I_ReservationDocRecordType | _ReservationDocRecordType | $projection.ReservationType = _ReservationDocRecordType.RecordType |
| [1..1] | I_ReservationDocumentHeader | _ReservationDocumentHeader | $projection.Reservation = _ReservationDocumentHeader.Reservation |
| [0..*] | I_PurReqnOrResvnGenerationText | _PurReqnOrResvnGenerationText | $projection.PurReqnOrResvnGeneration = _PurReqnOrResvnGenerationText.PurReqnOrResvnGeneration |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Fetching Operation Material Data | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| VDM.viewType | #BASIC | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| AccessControl.personalData.blocking | #REQUIRED | view |
Fields (54)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaintenanceOrder | resb | aufnr | |
| KEY | MaintenanceOrderOperation | |||
| KEY | MaintenanceOrderSubOperation | |||
| KEY | MaintOrderComponentInternalID | resb | objnr | |
| Reservation | resb | rsnum | ||
| ReservationItem | resb | rspos | ||
| ReservationType | resb | rsart | ||
| MaintenanceOrderComponent | ||||
| Material | resb | matnr | ||
| MaterialGroup | resb | matkl | ||
| ComponentDescription | resb | potx1 | ||
| RequirementQuantityInBaseUnit | resb | bdmng | ||
| BaseUnit | resb | meins | ||
| MaintOrderCompDebitCreditCode | resb | shkzg | ||
| Plant | resb | werks | ||
| StorageLocation | resb | lgort | ||
| MaintOrderRoutingNumber | resb | aufpl | ||
| MaintOrderOperationCounter | resb | aplzl | ||
| MaintComponentItemCategory | resb | postp | ||
| PurchaseRequisition | rsdb_banfn | banfn | ||
| PurchaseRequisitionItem | rsdb_banfn | bnfpo | ||
| Supplier | resb | lifnr | ||
| SupplierProduct | rsadd | idnlf | ||
| QuantityWithdrawnInBaseUnit | resb | enmng | ||
| ProductTypeCode | resb | producttype | ||
| PerformancePeriodStartDate | resb | startdate | ||
| PerformancePeriodEndDate | resb | enddate | ||
| PerformancePeriodStartTime | resb | performanceperiodstarttime | ||
| PerformancePeriodEndTime | resb | performanceperiodendtime | ||
| LeanServiceDuration | resb | serviceduration | ||
| LeanServiceDurationUnit | resb | servicedurationunit | ||
| MaintOrdOpComponentCurrency | resb | waers | ||
| DistributionFunction | resb | funct | ||
| SrvcSchedgIsAlignedWthOpWrkCtr | resb | operationworkcenteralignment | ||
| OverallLimitAmount | rsadd | overalllimitamount | ||
| ExpectedOverallLimitAmount | rsadd | expectedoveralllimitamount | ||
| RqmtDateIsEnteredManually | resb | kzmpf | ||
| FldLogsDelivIsHeldOnShore | resb | fldlogsdelivisheldonshore | ||
| FldLogsSupplyProcess | resb | fldlogssupplyprocess | ||
| _MaintenanceOrderOperation | _MaintenanceOrderOperation | |||
| _MaintenanceOrder | _MaintenanceOrder | |||
| _StatusObjectActiveStatus | _StatusObjectActiveStatus | |||
| _ReservationItem | _ReservationItem | |||
| _MaterialText | _MaterialText | |||
| _MaterialGroup | _MaterialGroup | |||
| _Plant | _Plant | |||
| _ProductTypeCode | _ProductTypeCode | |||
| _ItemCategoryText | _ItemCategoryText | |||
| _StorageLocation | _StorageLocation | |||
| _PurReqnOrResvnGeneration | _PurReqnOrResvnGeneration | |||
| _UnitOfMeasure | _UnitOfMeasure | |||
| _ReservationDocRecordType | _ReservationDocRecordType | |||
| _ReservationDocumentHeader | _ReservationDocumentHeader | |||
| _PurReqnOrResvnGenerationText | _PurReqnOrResvnGenerationText |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Fetching Operation Material Data'
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #B
@VDM.viewType: #BASIC
@ObjectModel.usageType.sizeCategory: #XL
@AccessControl.personalData.blocking: #REQUIRED
define view entity I_MaintOrdOpComponentMaterial
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
//this 3 assoaitioan from the I_MaintOrderOperComp
association [1..1] to I_MaintOrderOperTechObj as _MaintenanceOrderOperation on $projection.MaintenanceOrder = _MaintenanceOrderOperation.MaintenanceOrder
and $projection.MaintenanceOrderOperation = _MaintenanceOrderOperation.MaintenanceOrderOperation
association [1..1] to I_MaintOrderTechObj as _MaintenanceOrder on $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
// association [0..*] to I_StatusObjectActiveStatus as _StatusObjectActiveStatus on $projection.MaintOrderComponentInternalID = _StatusObjectActiveStatus.StatusObject
association [0..*] to I_StatusObjectStatusBasic as _StatusObjectActiveStatus on $projection.MaintOrderComponentInternalID = _StatusObjectActiveStatus.StatusObject
////
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..*] 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_Plant as _Plant on _Plant.Plant = $projection.Plant
association [0..1] to I_StorageLocation as _StorageLocation on _StorageLocation.Plant = $projection.Plant
and _StorageLocation.StorageLocation = $projection.StorageLocation
association [0..*] to I_MaintCompItemCategoryTxt as _ItemCategoryText on _ItemCategoryText.MaintComponentItemCategory = $projection.MaintComponentItemCategory
association [0..1] to I_ProductTypeCode as _ProductTypeCode on _ProductTypeCode.ProductTypeCode = $projection.ProductTypeCode
association [0..1] to I_PurReqnOrResvnGeneration as _PurReqnOrResvnGeneration on $projection.PurReqnOrResvnGeneration = _PurReqnOrResvnGeneration.PurReqnOrResvnGeneration
association [0..1] to I_PMUnitOfMeasureVH as _UnitOfMeasure on _UnitOfMeasure.UnitOfMeasure = $projection.BaseUnit
association [0..1] to I_ReservationDocRecordType as _ReservationDocRecordType on $projection.ReservationType = _ReservationDocRecordType.RecordType
association [1..1] to I_ReservationDocumentHeader as _ReservationDocumentHeader on $projection.Reservation = _ReservationDocumentHeader.Reservation
association [0..*] to I_PurReqnOrResvnGenerationText as _PurReqnOrResvnGenerationText
on $projection.PurReqnOrResvnGeneration = _PurReqnOrResvnGenerationText.PurReqnOrResvnGeneration //for the purchase requisition Text added this association
{
@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,
@ObjectModel.foreignKey.association: '_ReservationDocumentHeader'
resb.rsnum as Reservation,
@ObjectModel.foreignKey.association: '_ReservationItem'
resb.rspos as ReservationItem,
@ObjectModel.foreignKey.association: '_ReservationDocRecordType'
resb.rsart as ReservationType,
cast( resb.posnr as maintenanceordercomponent preserving type ) as MaintenanceOrderComponent,
@ObjectModel.text.association: '_MaterialText'
resb.matnr as Material,
@ObjectModel.foreignKey.association: '_MaterialGroup'
resb.matkl as MaterialGroup,
resb.potx1 as ComponentDescription,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
resb.bdmng as RequirementQuantityInBaseUnit,
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
resb.meins as BaseUnit,
resb.shkzg as MaintOrderCompDebitCreditCode,
@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,
rsdb_banfn.banfn as PurchaseRequisition,
rsdb_banfn.bnfpo as PurchaseRequisitionItem,
@ObjectModel.text.association: '_PurReqnOrResvnGenerationText'
cast(
case
when resb.no_disp = '1' then '1'
when resb.no_disp = 'X' then '2'
when resb.no_disp = '' then '3'
end as purreqnorresvngeneration) as PurReqnOrResvnGeneration,
cast(
case when resb.dbskz = 'F' then 'X'
end as xfeld ) as MaterialCompIsProcuredDirectly,
resb.lifnr as Supplier,
rsadd.idnlf as SupplierProduct,
cast( case when resb.xloek = '' then resb.xloek
when _StatusObjectActiveStatus[ 1: StatusCode = 'I0013' ].StatusIsInactive = 'X' then ''
when _StatusObjectActiveStatus[ 1: StatusCode = 'I0013' ].StatusIsInactive = '' then 'X'
else '' end as xloek ) as IsDeleted,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@DefaultAggregation: #SUM
resb.enmng as QuantityWithdrawnInBaseUnit,
@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.waers as MaintOrdOpComponentCurrency,
resb.funct as DistributionFunction,
resb.operationworkcenteralignment as SrvcSchedgIsAlignedWthOpWrkCtr,
@Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
rsadd.overalllimitamount as OverallLimitAmount,
@Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
rsadd.expectedoveralllimitamount as ExpectedOverallLimitAmount,
resb.kzmpf as RqmtDateIsEnteredManually,
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.fldlogsdelivisheldonshore as FldLogsDelivIsHeldOnShore,
resb.fldlogssupplyprocess as FldLogsSupplyProcess,
//associations
_MaintenanceOrderOperation,
_MaintenanceOrder,
_StatusObjectActiveStatus,
_ReservationItem,
_MaterialText,
_MaterialGroup,
_Plant,
_ProductTypeCode,
_ItemCategoryText,
_StorageLocation,
_PurReqnOrResvnGeneration,
_UnitOfMeasure,
_ReservationDocRecordType,
_ReservationDocumentHeader,
_PurReqnOrResvnGenerationText
}
where
resb.producttype <> '2' and aufk.autyp = '30'
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