P_ClosedOrdCompInconsistency
Maint.order comp. closed stat Inconstcy
P_ClosedOrdCompInconsistency is a Consumption CDS View that provides data about "Maint.order comp. closed stat Inconstcy" in SAP S/4HANA. It reads from 1 data source (I_MaintenanceOrderComponent_2) and exposes 4 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaintenanceOrderComponent_2 | I_MaintenanceOrderComponent_2 | from |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Maint.order comp. closed stat Inconstcy | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #P | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaintenanceOrder | MaintenanceOrder | ||
| KEY | MaintenanceOrderOperation | MaintenanceOrderOperation | ||
| KEY | MaintenanceOrderSubOperation | MaintenanceOrderSubOperation | ||
| KEY | MaintOrderComponentInternalID | MaintOrderComponentInternalID |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Maint.order comp. closed stat Inconstcy'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #P,
sizeCategory: #XL,
dataClass: #TRANSACTIONAL
}
@VDM.private:true
@VDM.viewType: #CONSUMPTION
//Order has CLOSED / TECO status but the PR Items are not deleted( And no PO exists ).
define view entity P_ClosedOrdCompInconsistency
as select from I_MaintenanceOrderComponent_2
{
key MaintenanceOrder,
key MaintenanceOrderOperation,
key MaintenanceOrderSubOperation,
key MaintOrderComponentInternalID,
case when (
( _PurchaseRequisitionItem.IsDeleted is initial or
_PurchaseRequisitionItem.IsDeleted is null ) and
( _PurchaseRequisitionItem.PurchasingDocument is initial or
_PurchaseRequisitionItem.PurchasingDocument is null ) and
sum( case when ( _MaintenanceOrder._StatusObjectActiveStatus[ to one: StatusIsActive = 'X' and
( StatusCode = 'I0045' or StatusCode = 'I0046' ) ].StatusCode is not null ) then 1 else 0 end ) > 0 )
then 'X'
else '' end as MaintOrdCompIsInconsistent
}
where
PurchaseRequisition is not initial
group by
MaintenanceOrder,
MaintenanceOrderOperation,
MaintenanceOrderSubOperation,
MaintOrderComponentInternalID,
_PurchaseRequisitionItem.PurchasingDocument,
_PurchaseRequisitionItem.IsDeleted
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