P_OperationActivityCompUnion
P_OperationActivityCompUnion is a Consumption CDS View in SAP S/4HANA. It reads from 5 data sources (I_OpActyAssemblyByComponent, I_EAMMaterialItemCategory, I_MfgOrderOperationComponent, I_OpActyComponentAssignment, I_OrderOperation) and exposes 114 fields with key fields OpActyNtwkInstance, OpActyNtwkElement, Reservation, ReservationItem, RecordType. It has 1 association to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_OpActyAssemblyByComponent | Agg | union_all |
| I_EAMMaterialItemCategory | MaterialItemCategory | inner |
| I_MfgOrderOperationComponent | MfgOrderOperationComponent | inner |
| I_OpActyComponentAssignment | OpActyComponentAssignment | from |
| I_OrderOperation | OrderOperation | inner |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_OpActyAssemblyByComponent | _OpActyAssemblyByComponent | $projection.Reservation = _OpActyAssemblyByComponent.Reservation and $projection.ReservationItem = _OpActyAssemblyByComponent.ReservationItem and $projection.RecordType = _OpActyAssemblyByComponent.RecordType and $projection.OpActyNtwkInstance = _OpActyAssemblyByComponent.OpActyNtwkInstance and $projection.OpActyNtwkElement = _OpActyAssemblyByComponent.OpActyNtwkElement and $projection.Material = _OpActyAssemblyByComponent.Material and $projection.Plant = _OpActyAssemblyByComponent.Plant |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMPEOACOMPUNION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view |
Fields (114)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OpActyNtwkInstance | I_OpActyComponentAssignment | OpActyNtwkInstance | |
| KEY | OpActyNtwkElement | I_OpActyComponentAssignment | OpActyNtwkElement | |
| KEY | Reservation | I_MfgOrderOperationComponent | Reservation | |
| KEY | ReservationItem | I_MfgOrderOperationComponent | ReservationItem | |
| KEY | RecordType | I_MfgOrderOperationComponent | RecordType | |
| KEY | Material | I_MfgOrderOperationComponent | Material | |
| KEY | Plant | I_MfgOrderOperationComponent | Plant | |
| StorageLocation | I_MfgOrderOperationComponent | StorageLocation | ||
| ProductionPlant | I_MfgOrderOperationComponent | ProductionPlant | ||
| AssemblySequenceNumber | I_OpActyComponentAssignment | AssemblySequenceNumber | ||
| BaseUnit | I_MfgOrderOperationComponent | BaseUnit | ||
| MfgOrderComponentUsageQuantity | I_OpActyComponentAssignment | MfgOrderComponentUsageQuantity | ||
| MaterialComponentQuantity | _OpActyAssemblyByComponent | MaterialComponentQuantity | ||
| QuantityInEntryUnit | ||||
| EntryUnit | _OpActyAssemblyByComponent | EntryUnit | ||
| IsBulkMaterialComponent | ||||
| MatlCompIsMarkedForBackflush | ||||
| GoodsMovementIsAllowed | I_MfgOrderOperationComponent | GoodsMovementIsAllowed | ||
| MaterialComponentIsMissing | I_MfgOrderOperationComponent | MaterialComponentIsMissing | ||
| ReservationIsFinallyIssued | I_MfgOrderOperationComponent | ReservationIsFinallyIssued | ||
| MatlCompDiscontinuationType | I_MfgOrderOperationComponent | MatlCompDiscontinuationType | ||
| MaterialCompIsVariableSized | ||||
| VariableSizeItemUnit | I_MfgOrderOperationComponent | VariableSizeItemUnit | ||
| FormulaKey | I_MfgOrderOperationComponent | FormulaKey | ||
| VariableSizeDimension1 | I_MfgOrderOperationComponent | VariableSizeDimension1 | ||
| VariableSizeDimension2 | I_MfgOrderOperationComponent | VariableSizeDimension2 | ||
| VariableSizeDimension3 | I_MfgOrderOperationComponent | VariableSizeDimension3 | ||
| VariableSizeDimensionUnit | I_MfgOrderOperationComponent | VariableSizeDimensionUnit | ||
| VariableSizeComponentQuantity | I_MfgOrderOperationComponent | VariableSizeComponentQuantity | ||
| VariableSizeComponentUnit | I_MfgOrderOperationComponent | VariableSizeComponentUnit | ||
| RelatedReservation | ||||
| RelatedReservationItem | I_OpActyComponentAssignment | RelatedReservationItem | ||
| RelatedRecordType | I_OpActyComponentAssignment | RelatedRecordType | ||
| RelatedOpActyNtwkInstance | I_OpActyComponentAssignment | RelatedOpActyNtwkInstance | ||
| RelatedOpActyNtwkElement | I_OpActyComponentAssignment | RelatedOpActyNtwkElement | ||
| LeadingReservation | I_OpActyComponentAssignment | LeadingReservation | ||
| LeadingReservationItem | I_OpActyComponentAssignment | LeadingReservationItem | ||
| LeadingReservationRecordType | I_OpActyComponentAssignment | LeadingReservationRecordType | ||
| LeadingOpActyNtwkInstance | I_OpActyComponentAssignment | LeadingOpActyNtwkInstance | ||
| LeadingOpActyNtwkElement | I_OpActyComponentAssignment | LeadingOpActyNtwkElement | ||
| BillOfMaterialCategory | ||||
| BillOfMaterial | I_MfgOrderOperationComponent | BillOfMaterial | ||
| BOMItem | I_MfgOrderOperationComponent | BOMItem | ||
| BOMItemInternalChangeCount | I_MfgOrderOperationComponent | BOMItemInternalChangeCount | ||
| BillOfMaterialInternalID | I_MfgOrderOperationComponent | BillOfMaterialInternalID | ||
| BillOfMaterialVariant | I_MfgOrderOperationComponent | BillOfMaterialVariant | ||
| BillOfMaterialVersion | I_MfgOrderOperationComponent | BillOfMaterialVersion | ||
| InheritedBOMItemNode | I_MfgOrderOperationComponent | InheritedBOMItemNode | ||
| BOMItemCategory | I_MfgOrderOperationComponent | BOMItemCategory | ||
| BillOfMaterialItemUUID | ||||
| BillOfOperationsType | ||||
| BillOfOperationsGroup | ||||
| BOOOpBOMItemInternalID | I_OpActyComponentAssignment | BOOOpBOMItemInternalID | ||
| LogicalComponent | I_OpActyComponentAssignment | LogicalComponent | ||
| MfgRefStrucBOMLeafAssgmtUUID | I_OpActyComponentAssignment | MfgRefStrucBOMLeafAssgmtUUID | ||
| MfgRefStructureItemDetailUUID | I_OpActyComponentAssignment | MfgRefStructureItemDetailUUID | ||
| MfgRefStrucItmDetIsContextual | I_OpActyComponentAssignment | MfgRefStrucItmDetIsContextual | ||
| OpActyNtwkInstance | ||||
| KEY | OpActyNtwkElement | I_OpActyAssemblyByComponent | OpActyNtwkElement | |
| KEY | Reservation | I_OpActyAssemblyByComponent | Reservation | |
| KEY | ReservationItem | I_OpActyAssemblyByComponent | ReservationItem | |
| KEY | RecordType | I_OpActyAssemblyByComponent | RecordType | |
| KEY | Material | I_OpActyAssemblyByComponent | Material | |
| KEY | Plant | I_OpActyAssemblyByComponent | Plant | |
| StorageLocation | ||||
| ProductionPlant | ||||
| AssemblySequenceNumber | ||||
| BaseUnit | I_OpActyAssemblyByComponent | MaterialBaseUnit | ||
| MfgOrderComponentUsageQuantity | ||||
| RequiredQuantity | ||||
| MaterialComponentQuantity | I_OpActyAssemblyByComponent | MaterialComponentQuantity | ||
| QuantityInEntryUnit | ||||
| EntryUnit | I_OpActyAssemblyByComponent | EntryUnit | ||
| IsBulkMaterialComponent | ||||
| MatlCompIsMarkedForBackflush | ||||
| GoodsMovementIsAllowed | ||||
| MaterialComponentIsMissing | ||||
| ReservationIsFinallyIssued | ||||
| MatlCompDiscontinuationType | ||||
| VariableSizeItemUnit | ||||
| FormulaKey | ||||
| VariableSizeDimension1 | ||||
| VariableSizeDimension2 | ||||
| VariableSizeDimension3 | ||||
| VariableSizeDimensionUnit | ||||
| VariableSizeComponentQuantity | ||||
| VariableSizeComponentUnit | ||||
| RelatedReservationItem | ||||
| RelatedRecordType | ||||
| RelatedOpActyNtwkInstance | ||||
| RelatedOpActyNtwkElement | ||||
| LeadingReservation | ||||
| LeadingReservationItem | ||||
| LeadingReservationRecordType | ||||
| LeadingOpActyNtwkInstance | ||||
| LeadingOpActyNtwkElement | ||||
| BillOfMaterialCategory | ||||
| BillOfMaterial | ||||
| BOMItem | ||||
| BOMItemInternalChangeCount | ||||
| BillOfMaterialInternalID | ||||
| BillOfMaterialVariant | ||||
| BillOfMaterialVersion | ||||
| InheritedBOMItemNode | ||||
| BOMItemCategory | ||||
| BillOfMaterialItemUUID | ||||
| BillOfOperationsType | ||||
| BillOfOperationsGroup | ||||
| BOOOpBOMItemInternalID | ||||
| LogicalComponent | ||||
| MfgRefStrucBOMLeafAssgmtUUID | ||||
| MfgRefStructureItemDetailUUID | ||||
| MfgRefStrucItmDetIsContextual | ||||
| MatlCompInstceAssyIsRequired |
@AbapCatalog.sqlViewName: 'PMPEOACOMPUNION'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #XL, dataClass: #CUSTOMIZING}
@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view P_OperationActivityCompUnion
as select from I_OpActyComponentAssignment as OpActyComponentAssignment
inner join I_MfgOrderOperationComponent as MfgOrderOperationComponent on MfgOrderOperationComponent.Reservation = OpActyComponentAssignment.Reservation
and MfgOrderOperationComponent.ReservationItem = OpActyComponentAssignment.ReservationItem
and MfgOrderOperationComponent.RecordType = OpActyComponentAssignment.RecordType
inner join I_OrderOperation as OrderOperation on OrderOperation.OrderInternalID = MfgOrderOperationComponent.OrderInternalBillOfOperations
and OrderOperation.OrderOperationInternalID = MfgOrderOperationComponent.OrderIntBillOfOperationsItem
inner join I_EAMMaterialItemCategory as MaterialItemCategory on MfgOrderOperationComponent.BOMItemCategory = MaterialItemCategory.BOMItemCategory
left outer to one join I_StatusObjectStatusBasic as IsCreatedBySplit on IsCreatedBySplit.StatusObject = MfgOrderOperationComponent.ObjectInternalID
and IsCreatedBySplit.StatusCode = 'I0487'
and IsCreatedBySplit.StatusIsInactive = ''
association [0..1] to I_OpActyAssemblyByComponent as _OpActyAssemblyByComponent on $projection.Reservation = _OpActyAssemblyByComponent.Reservation
and $projection.ReservationItem = _OpActyAssemblyByComponent.ReservationItem
and $projection.RecordType = _OpActyAssemblyByComponent.RecordType
and $projection.OpActyNtwkInstance = _OpActyAssemblyByComponent.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _OpActyAssemblyByComponent.OpActyNtwkElement
and $projection.Material = _OpActyAssemblyByComponent.Material
and $projection.Plant = _OpActyAssemblyByComponent.Plant
{
key OpActyComponentAssignment.OpActyNtwkInstance,
key OpActyComponentAssignment.OpActyNtwkElement,
key MfgOrderOperationComponent.Reservation,
key MfgOrderOperationComponent.ReservationItem,
key MfgOrderOperationComponent.RecordType,
key MfgOrderOperationComponent.Material,
key MfgOrderOperationComponent.Plant,
MfgOrderOperationComponent.StorageLocation,
MfgOrderOperationComponent.ProductionPlant,
OpActyComponentAssignment.AssemblySequenceNumber,
MfgOrderOperationComponent.BaseUnit,
OpActyComponentAssignment.MfgOrderComponentUsageQuantity, --PlannedQuantity
case MfgOrderOperationComponent.QuantityIsFixed
when 'X' then OpActyComponentAssignment.MfgOrderComponentUsageQuantity
else cast( OrderOperation.OpPlannedTotalQuantity * OrderOperation.OpQtyToBaseQtyNmrtr as esmng )
/ cast( OrderOperation.OpQtyToBaseQtyDnmntr as esmng )
* OpActyComponentAssignment.MfgOrderComponentUsageNetQty
end as RequiredQuantity,
_OpActyAssemblyByComponent.MaterialComponentQuantity, --ConsumedQuantity
_OpActyAssemblyByComponent.QuantityInEntryUnit,
_OpActyAssemblyByComponent.EntryUnit,
cast( MfgOrderOperationComponent.IsBulkMaterialComponent as boolean preserving type ) as IsBulkMaterialComponent,
cast( MfgOrderOperationComponent.MatlCompIsMarkedForBackflush as boolean preserving type ) as MatlCompIsMarkedForBackflush,
MfgOrderOperationComponent.GoodsMovementIsAllowed,
MfgOrderOperationComponent.MaterialComponentIsMissing,
MfgOrderOperationComponent.ReservationIsFinallyIssued,
MfgOrderOperationComponent.MatlCompDiscontinuationType,
-- Variable-Size Item Fields
MfgOrderOperationComponent.MaterialCompIsVariableSized,
MfgOrderOperationComponent.VariableSizeItemUnit,
MfgOrderOperationComponent.FormulaKey,
MfgOrderOperationComponent.VariableSizeDimension1,
MfgOrderOperationComponent.VariableSizeDimension2,
MfgOrderOperationComponent.VariableSizeDimension3,
MfgOrderOperationComponent.VariableSizeDimensionUnit,
MfgOrderOperationComponent.VariableSizeComponentQuantity,
MfgOrderOperationComponent.VariableSizeComponentUnit,
-- Related / Leading Reservations
OpActyComponentAssignment.RelatedReservation,
OpActyComponentAssignment.RelatedReservationItem,
OpActyComponentAssignment.RelatedRecordType,
OpActyComponentAssignment.RelatedOpActyNtwkInstance,
OpActyComponentAssignment.RelatedOpActyNtwkElement,
OpActyComponentAssignment.LeadingReservation,
OpActyComponentAssignment.LeadingReservationItem,
OpActyComponentAssignment.LeadingReservationRecordType,
OpActyComponentAssignment.LeadingOpActyNtwkInstance,
OpActyComponentAssignment.LeadingOpActyNtwkElement,
-- Additional data needed for corresponding association
MfgOrderOperationComponent.BillOfMaterialCategory,
MfgOrderOperationComponent.BillOfMaterial,
MfgOrderOperationComponent.BOMItem,
MfgOrderOperationComponent.BOMItemInternalChangeCount,
MfgOrderOperationComponent.BillOfMaterialInternalID,
MfgOrderOperationComponent.BillOfMaterialVariant,
MfgOrderOperationComponent.BillOfMaterialVersion,
MfgOrderOperationComponent.InheritedBOMItemNode,
MfgOrderOperationComponent.BOMItemCategory,
-- MfgOrderOperationComponent._BillOfMaterialItem.BillOfMaterialItemUUID,
-- MfgOrderOperationComponent._MfgOrderOperation.BillOfOperationsType,
-- MfgOrderOperationComponent._MfgOrderOperation.BillOfOperationsGroup,
OpActyComponentAssignment.BOOOpBOMItemInternalID,
OpActyComponentAssignment.LogicalComponent,
OpActyComponentAssignment.MfgRefStrucBOMLeafAssgmtUUID,
OpActyComponentAssignment.MfgRefStructureItemDetailUUID,
OpActyComponentAssignment.MfgRefStrucItmDetIsContextual,
OpActyComponentAssignment.MatlCompInstceAssyIsRequired
}
where
MfgOrderOperationComponent.DebitCreditCode = 'H'
and MfgOrderOperationComponent.RequiredQuantity <> 0
and IsCreatedBySplit.StatusCode is null
and MaterialItemCategory.ItemCatRequiresMaterialEntry = '+'
union all
select from I_OpActyAssemblyByComponent as Agg
{
key Agg.OpActyNtwkInstance,
key Agg.OpActyNtwkElement,
key Agg.Reservation,
key Agg.ReservationItem,
key Agg.RecordType,
key Agg.Material,
key Agg.Plant,
cast(' ' as pph_lgort preserving type) as StorageLocation,
cast(' ' as pwwrk preserving type) as ProductionPlant,
cast('0000' as mpe_rtgv_proc_seq_no preserving type) as AssemblySequenceNumber,
Agg.MaterialBaseUnit as BaseUnit,
cast(0 as esmng) as MfgOrderComponentUsageQuantity, --PlannedQuantity
Agg.RequiredQuantity,
Agg.MaterialComponentQuantity, --ConsumedQuantity
Agg.QuantityInEntryUnit,
Agg.EntryUnit,
cast('' as boolean preserving type ) as IsBulkMaterialComponent,
cast('' as boolean preserving type ) as MatlCompIsMarkedForBackflush,
cast('X' as xwaok preserving type ) as GoodsMovementIsAllowed,
cast('' as xfehl preserving type) as MaterialComponentIsMissing,
cast('' as kzear preserving type) as ReservationIsFinallyIssued,
cast('' as auslf preserving type ) as MatlCompDiscontinuationType,
-- Variable-Size Item Fields
cast('' as rohps preserving type) as MaterialCompIsVariableSized,
cast('' as vdm_roame) as VariableSizeItemUnit,
cast(' ' as rform preserving type) as FormulaKey,
cast(0 as roms1) as VariableSizeDimension1,
cast(0 as roms2) as VariableSizeDimension2,
cast(0 as roms3) as VariableSizeDimension3,
cast('' as romei) as VariableSizeDimensionUnit,
cast(0 as pph_romen) as VariableSizeComponentQuantity,
cast('' as pph_rokme) as VariableSizeComponentUnit,
-- Related / Leading Reservations
cast('0000000000' as rsnum preserving type ) as RelatedReservation,
cast('0000' as rspos preserving type ) as RelatedReservationItem,
cast('' as rsart preserving type ) as RelatedRecordType,
cast(0 as mpe_oan_instance_id ) as RelatedOpActyNtwkInstance,
cast(0 as mpe_oan_element_number ) as RelatedOpActyNtwkElement,
cast('0000000000' as rsnum preserving type ) as LeadingReservation,
cast('0000' as rspos preserving type ) as LeadingReservationItem,
cast('' as rsart preserving type ) as LeadingReservationRecordType,
cast(0 as mpe_oan_instance_id ) as LeadingOpActyNtwkInstance,
cast(0 as mpe_oan_element_number ) as LeadingOpActyNtwkElement,
cast('' as pph_stlty preserving type) as BillOfMaterialCategory,
cast(' ' as stnum preserving type) as BillOfMaterial,
cast('00000000' as pph_stlkn preserving type) as BOMItem,
cast('00000000' as cim_count preserving type) as BOMItemInternalChangeCount,
cast(' ' as stnum preserving type) as BillOfMaterialInternalID,
cast( ' ' as stalt ) as BillOfMaterialVariant,
cast( ' ' as cim_bom_versn) as BillOfMaterialVersion,
cast(' ' as kntnr) as InheritedBOMItemNode,
cast('' as pph_postp preserving type) as BOMItemCategory,
-- cast(hextobin( '00000000000000000000000000000000' ) as cs_guid preserving type) as BillOfMaterialItemUUID,
-- cast('' as plnty preserving type) as BillOfOperationsType,
-- cast('' as plnnr) as BillOfOperationsGroup,
cast('00000000' as cim_zuord preserving type) as BOOOpBOMItemInternalID,
cast(0 as mpe_log_comp_counter) as LogicalComponent,
cast(hextobin('00000000000000000000000000000000') as mpe_mrs_leaf_assignment_uuid preserving type) as MfgRefStrucBOMLeafAssgmtUUID,
cast(hextobin('00000000000000000000000000000000') as mpe_mrs_leaf_assignment_uuid preserving type) as MfgRefStructureItemDetailUUID,
cast('' as xfeld preserving type) as MfgRefStrucItmDetIsContextual,
cast('' as mpe_instce_assembly_rqd preserving type) as MatlCompInstceAssyIsRequired
}
where
Agg.Reservation = '0000000000' --Unplanned Assemblies
and MaterialComponentQuantity <> 0
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EAMMATERIALITEMCATEGORY",
"I_MFGORDEROPERATIONCOMPONENT",
"I_OPACTYASSEMBLYBYCOMPONENT",
"I_OPACTYCOMPONENTASSIGNMENT",
"I_ORDEROPERATION",
"I_STATUSOBJECTSTATUSBASIC"
],
"ASSOCIATED":
[
"I_OPACTYASSEMBLYBYCOMPONENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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