C_MfgOrdOpForReworkInsertion
Order operation for rework insertion
C_MfgOrdOpForReworkInsertion is a Consumption CDS View that provides data about "Order operation for rework insertion" in SAP S/4HANA. It reads from 4 data sources (I_MfgOrderBasic, I_OperationControlProfile, I_OrderOperationBasic, I_ShopFloorItem) and exposes 18 fields with key fields ShopFloorItem, OrderInternalID, OrderOperationInternalID. It has 4 associations to related views. Part of development package MPE_PLAN_RTG_VERS.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_MfgOrderBasic | MfgOrderBasic | from |
| I_OperationControlProfile | OperationControlProfile | inner |
| I_OrderOperationBasic | OrderOperationBasic | inner |
| I_ShopFloorItem | ShopFloorItem | left_outer |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_SASStatusCategoryText | _Text | $projection.SASStatusCategory = _Text.SASStatusCategory |
| [1..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_WorkCenter | _WorkCenter | $projection.WorkCenterTypeCode = _WorkCenter.WorkCenterTypeCode and $projection.WorkCenterInternalID = _WorkCenter.WorkCenterInternalID |
| [0..1] | P_OperNmbrOfProdnHolds | _ProductionHold | $projection.OrderInternalID = _ProductionHold.OrderInternalID and $projection.OrderOperationInternalID = _ProductionHold.OrderOperationInternalID |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMFGOOFRI | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Order operation for rework insertion | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ShopFloorItem | |||
| KEY | OrderInternalID | I_OrderOperationBasic | OrderInternalID | |
| KEY | OrderOperationInternalID | I_OrderOperationBasic | OrderOperationInternalID | |
| ManufacturingOrderCategory | I_MfgOrderBasic | ManufacturingOrderCategory | ||
| ManufacturingOrderType | I_MfgOrderBasic | ManufacturingOrderType | ||
| ProductionPlant | I_MfgOrderBasic | ProductionPlant | ||
| OperationControlProfile | I_OrderOperationBasic | OperationControlProfile | ||
| Operation | I_OrderOperationBasic | Operation | ||
| OperationText | I_OrderOperationBasic | OperationText | ||
| Plant | I_OrderOperationBasic | Plant | ||
| PlantName | _Plant | PlantName | ||
| WorkCenterTypeCode | I_OrderOperationBasic | WorkCenterTypeCode | ||
| WorkCenterInternalID | I_OrderOperationBasic | WorkCenterInternalID | ||
| WorkCenter | _WorkCenter | WorkCenter | ||
| ProductionHoldIsApplied | ||||
| _Text | _Text | |||
| _Plant | _Plant | |||
| _WorkCenter | _WorkCenter |
@AbapCatalog: {
sqlViewName: 'CMFGOOFRI',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Order operation for rework insertion'
@ObjectModel.usageType: {
dataClass: #MIXED,
serviceQuality: #C,
sizeCategory: #L
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@UI.presentationVariant: [{sortOrder: [{by: 'Operation', direction: #ASC }]}]
@VDM.viewType: #CONSUMPTION
define view C_MfgOrdOpForReworkInsertion
as select from I_MfgOrderBasic as MfgOrderBasic
inner join I_OrderOperationBasic as OrderOperationBasic on OrderOperationBasic.OrderInternalID = MfgOrderBasic.OrderInternalID
inner join I_OperationControlProfile as OperationControlProfile on OperationControlProfile.OperationControlProfile = OrderOperationBasic.OperationControlProfile
left outer to one join I_StatusObjectStatusBasic as isDeleted on isDeleted.StatusObject = OrderOperationBasic.ObjectInternalID
and isDeleted.StatusCode = 'I0013'
and isDeleted.StatusIsInactive = '' // OperationIsDeleted
--Join data that is needed if execution is non-serialized
left outer to one join I_StatusObjectStatusBasic as isConfirmed on isConfirmed.StatusObject = OrderOperationBasic.ObjectInternalID
and isConfirmed.StatusCode = 'I0009'
and isConfirmed.StatusIsInactive = '' // OperationIsConfirmed
left outer to one join I_StatusObjectStatusBasic as isPartConf on isPartConf.StatusObject = OrderOperationBasic.ObjectInternalID
and isPartConf.StatusCode = 'I0010'
and isPartConf.StatusIsInactive = '' // OperationIsPartiallyConfirmed
--Join data that is needed if execution is serialized (SFI-based)
left outer join I_ShopFloorItem as ShopFloorItem on ShopFloorItem.ManufacturingOrder = MfgOrderBasic.ManufacturingOrder
left outer to one join C_MfgOrderOpSFIAggrgdStsCat as MfgOrderOpSFIAggrgdStsCat on MfgOrderOpSFIAggrgdStsCat.ShopFloorItem = ShopFloorItem.ShopFloorItem
and MfgOrderOpSFIAggrgdStsCat.OrderInternalID = OrderOperationBasic.OrderInternalID
and MfgOrderOpSFIAggrgdStsCat.OrderOperationInternalID = OrderOperationBasic.OrderOperationInternalID
left outer to one join I_SFIReworkOperation as SFIReworkOperation on SFIReworkOperation.ShopFloorItem = ShopFloorItem.ShopFloorItem
and SFIReworkOperation.OrderInternalID = OrderOperationBasic.OrderInternalID
and SFIReworkOperation.OrderOperationInternalID = OrderOperationBasic.OrderOperationInternalID
association [0..*] to I_SASStatusCategoryText as _Text on $projection.SASStatusCategory = _Text.SASStatusCategory
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [0..1] to I_WorkCenter as _WorkCenter on $projection.WorkCenterTypeCode = _WorkCenter.WorkCenterTypeCode
and $projection.WorkCenterInternalID = _WorkCenter.WorkCenterInternalID
association [0..1] to P_OperNmbrOfProdnHolds as _ProductionHold on $projection.OrderInternalID = _ProductionHold.OrderInternalID
and $projection.OrderOperationInternalID = _ProductionHold.OrderOperationInternalID
{
key cast(coalesce(ShopFloorItem.ShopFloorItem,0) as mpe_sfi_id preserving type) as ShopFloorItem,
key OrderOperationBasic.OrderInternalID,
key OrderOperationBasic.OrderOperationInternalID,
MfgOrderBasic.ManufacturingOrderCategory,
MfgOrderBasic.ManufacturingOrderType,
MfgOrderBasic.ProductionPlant,
OrderOperationBasic.OperationControlProfile,
@UI.lineItem: [{position: 10 }]
@ObjectModel.text.element: ['OperationText']
OrderOperationBasic.Operation,
@Semantics.text:true
OrderOperationBasic.OperationText,
@UI.lineItem: [{position: 20 }]
@ObjectModel.text.element: ['PlantName']
OrderOperationBasic.Plant,
_Plant.PlantName,
OrderOperationBasic.WorkCenterTypeCode,
OrderOperationBasic.WorkCenterInternalID,
@UI.lineItem: [{position: 30 }]
_WorkCenter.WorkCenter,
@ObjectModel.text.association: '_Text'
cast(case
when MfgOrderOpSFIAggrgdStsCat.SASStatusCategory is not null then MfgOrderOpSFIAggrgdStsCat.SASStatusCategory
when isConfirmed.StatusCode is not null then 3 --Finally Confirmed mapped to Completed
when isPartConf.StatusCode is not null then 2 --Partially Confirmed mapped to In Process
else 1 --Others mapped to Initial
end as mpe_sas_status_category_type preserving type) as SASStatusCategory,
case when _ProductionHold.OrderInternalID is null then '' else 'X' end as ProductionHoldIsApplied,
// Associations
_Text,
_Plant,
_WorkCenter
}
where
isDeleted.StatusCode is null
and(
--Select all standard operations
OperationControlProfile.OperationIsReworkOperation = ''
--Select all rework operations in non-serialized mode
or ShopFloorItem.ShopFloorItem is null
--In serialized mode select rework operations only if the SFI is assigned to that rework operation
or SFIReworkOperation.ShopFloorItem is not null
)
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