P_RSHMaintSchedAddlConfBase
Confirmations for operations not in schedule
P_RSHMaintSchedAddlConfBase is a Consumption CDS View that provides data about "Confirmations for operations not in schedule" in SAP S/4HANA. It reads from 4 data sources (I_RSHMaintSchedFrozenOp, I_MaintenanceOrderConfirmation, I_OrderOperationBasic, I_RSHMaintSchedWrkCtrCap) and exposes 25 fields with key fields WorkCenterInternalID, MaintSchedSimlnUUID, MaintOrderConf, MaintOrderConfCntrValue. Part of development package RSH_CDS_MAINT_SCHED_SIM.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_RSHMaintSchedFrozenOp | FrozenOperations | left_outer |
| I_MaintenanceOrderConfirmation | I_MaintenanceOrderConfirmation | inner |
| I_OrderOperationBasic | I_OrderOperationBasic | from |
| I_RSHMaintSchedWrkCtrCap | I_RSHMaintSchedWrkCtrCap | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRSHADLCNFBASE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | Confirmations for operations not in schedule | view |
Fields (25)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | WorkCenterInternalID | I_RSHMaintSchedWrkCtrCap | WorkCenterInternalID | |
| KEY | MaintSchedSimlnUUID | I_RSHMaintSchedWrkCtrCap | MaintSchedSimlnUUID | |
| KEY | MaintOrderConf | I_MaintenanceOrderConfirmation | MaintOrderConf | |
| KEY | MaintOrderConfCntrValue | MaintOrderConfCntrValue | ||
| MaintenanceOrder | MaintenanceOrder | |||
| MaintenanceOrderOperation | MaintenanceOrderOperation | |||
| MaintenanceOrderSubOperation | MaintenanceOrderSubOperation | |||
| WorkCenterTypeCode | I_RSHMaintSchedWrkCtrCap | WorkCenterTypeCode | ||
| MaintOrderRoutingNumber | I_OrderOperationBasic | OrderInternalID | ||
| MaintOrderOperationCounter | I_OrderOperationBasic | OrderOperationInternalID | ||
| IsFinalConfirmation | IsFinalConfirmation | |||
| IsReversed | IsReversed | |||
| IsReversal | IsReversal | |||
| ConfWorkCenterInternalID | I_MaintenanceOrderConfirmation | WorkCenterInternalID | ||
| OperationConfirmedStartDate | OperationConfirmedStartDate | |||
| OperationConfirmedStartTime | OperationConfirmedStartTime | |||
| OperationConfirmedEndDate | OperationConfirmedEndDate | |||
| OperationConfirmedEndTime | OperationConfirmedEndTime | |||
| dec240asActualWork | ||||
| dec240asRemainingWork | ||||
| NoRemainingWork | NoFurtherWorkQuantityIsExpd | |||
| TotalAvailableCapacity | TotalAvailableCapacity | |||
| TotalPlannedCapacity | TotalPlannedCapacity | |||
| dec240asOperationPlannedWork | ||||
| OperationPlannedWorkUnit |
@AbapCatalog.sqlViewName: 'PRSHADLCNFBASE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'Confirmations for operations not in schedule'
/*
CONTRACT*************************************************************************************************************************
Name: Confirmations for operations which belong to frozen work centers are returned
Specification: This view provides a list of all confirmations for frozen work centers
Requires: NA
Ensures: Confirmations for operations which belong to frozen work centers are returned
All units are converted to seconds
Owners: AN, CK
Contributors:
Unit Test required Y/N: Yes
Additional comments None
END OF CONTRACT******************************************************************************************************************
*/
define view P_RSHMaintSchedAddlConfBase
as select from I_OrderOperationBasic
inner join I_RSHMaintSchedWrkCtrCap on I_RSHMaintSchedWrkCtrCap.WorkCenterInternalID = I_OrderOperationBasic.WorkCenterInternalID
and I_RSHMaintSchedWrkCtrCap.WorkCenterTypeCode = I_OrderOperationBasic.WorkCenterTypeCode
inner join I_MaintenanceOrderConfirmation on I_MaintenanceOrderConfirmation.MaintOrderConf = I_OrderOperationBasic.OperationConfirmation
left outer join I_RSHMaintSchedFrozenOp as FrozenOperations on FrozenOperations.MaintOrderConfirmation = I_OrderOperationBasic.OperationConfirmation
and FrozenOperations.MaintSchedSimlnUUID = I_RSHMaintSchedWrkCtrCap.MaintSchedSimlnUUID
association [1..1] to I_MaintOrderOperPlanningValues on $projection.MaintOrderRoutingNumber = I_MaintOrderOperPlanningValues.MaintOrderRoutingNumber
and $projection.MaintOrderOperationCounter = I_MaintOrderOperPlanningValues.MaintOrderOperationCounter
{
key I_RSHMaintSchedWrkCtrCap.WorkCenterInternalID,
key I_RSHMaintSchedWrkCtrCap.MaintSchedSimlnUUID,
key I_MaintenanceOrderConfirmation.MaintOrderConf,
key MaintOrderConfCntrValue,
MaintenanceOrder,
MaintenanceOrderOperation,
MaintenanceOrderSubOperation,
I_RSHMaintSchedWrkCtrCap.WorkCenterTypeCode,
I_OrderOperationBasic.OrderInternalID as MaintOrderRoutingNumber,
I_OrderOperationBasic.OrderOperationInternalID as MaintOrderOperationCounter,
IsFinalConfirmation,
IsReversed,
IsReversal,
I_MaintenanceOrderConfirmation.WorkCenterInternalID as ConfWorkCenterInternalID,
OperationConfirmedStartDate,
OperationConfirmedStartTime,
OperationConfirmedEndDate,
OperationConfirmedEndTime,
cast( unit_conversion(
QUANTITY => ActualWorkQuantity,
SOURCE_UNIT => ActualWorkQuantityUnit,
TARGET_UNIT => cast( 'S' as abap.unit(3) ),
ERROR_HANDLING => 'SET_TO_NULL' ) as abap.dec(24,0) ) as ActualWork,
cast( unit_conversion(
QUANTITY => RemainingWorkQuantity,
SOURCE_UNIT => RemainingWorkQuantityUnit,
TARGET_UNIT => cast( 'S' as abap.unit(3) ),
ERROR_HANDLING => 'SET_TO_NULL' ) as abap.dec(24,0) ) as RemainingWork,
NoFurtherWorkQuantityIsExpd as NoRemainingWork,
TotalAvailableCapacity,
TotalPlannedCapacity,
cast( unit_conversion(
QUANTITY => I_MaintOrderOperPlanningValues.OperationPlannedWork,
SOURCE_UNIT => I_MaintOrderOperPlanningValues.OperationPlannedWorkUnit,
TARGET_UNIT => cast( 'S' as abap.unit(3) ),
ERROR_HANDLING => 'SET_TO_NULL' ) as abap.dec(24,0) ) as OperationPlannedWork,
'S' as OperationPlannedWorkUnit
}
where
(
IsReversed = ''
and IsReversal = '' //Shouldn't be a case of reversal or reversed
and MaintOrdOpWrkExecEndDateTime >= _MaintSchedSimulation.MaintSchedSimStartDateTime // confirmation end date should fall in the schedule week
and MaintOrdOpWrkExecEndDateTime <= _MaintSchedSimulation.MaintSchedSimEndDateTime
)
// filter out confirmations for operations in the schedule
and FrozenOperations.MaintOrderConfirmation is 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