P_LatestOperation
Order Latest Operation Details
P_LatestOperation is a Composite CDS View that provides data about "Order Latest Operation Details" in SAP S/4HANA. It reads from 1 data source (P_OrdLatestOperAggr) and exposes 10 fields with key field OrderInternalBillOfOperations. Part of development package ODATA_MPE_MFGORDER.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_OrdLatestOperAggr | _LastOper | from |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OrderInternalBillOfOperations | P_OrdLatestOperAggr | OrderInternalBillOfOperations | |
| LatestOperation | P_OrdLatestOperAggr | LatestOperation | ||
| Plant | P_OrdLatestOperAggr | Plant | ||
| LatestOperationText | _latestOp | OperationText | ||
| LatestOperDet | ||||
| OpLtstConfirmedYieldQty | _latestOp | OpTotalConfirmedYieldQty | ||
| OpLtstConfirmedScrapQty | _latestOp | OpTotalConfirmedScrapQty | ||
| OpLtstPlannedTotalQty | _latestOp | OpPlannedTotalQuantity | ||
| OperationIsConfirmed | ||||
| OperationUnit | _latestOp | OperationUnit |
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Order Latest Operation Details'
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view entity P_LatestOperation
as select from P_OrdLatestOperAggr as _LastOper
left outer to one join P_MfgOperBasicAorList as _latestOp on _LastOper.OrderInternalBillOfOperations = _latestOp.OrderInternalID
and _LastOper.LatestOperation = _latestOp.Operation
and _LastOper.Plant = _latestOp.Plant
// inner join P_MfgOperationsList as _AORListDistinct on _AORListDistinct.OrderInternalID = _LastOper.OrderInternalBillOfOperations
// and _AORListDistinct.OrderOperationInternalID = _latestOp.OrderOperationInternalID
left outer to one join I_StatusObjectStatusBasic as _isConfirmed on _isConfirmed.StatusObject = _latestOp.ObjectInternalID and _isConfirmed.StatusCode = 'I0009' and _isConfirmed.StatusIsInactive = '' // OperationIsConfirmed
{
key _LastOper.OrderInternalBillOfOperations,
_LastOper.LatestOperation,
_LastOper.Plant,
_latestOp.OperationText as LatestOperationText,
concat( concat (_latestOp.OperationText, concat('(',_LastOper.LatestOperation)),')') as LatestOperDet,
_latestOp.OpTotalConfirmedYieldQty as OpLtstConfirmedYieldQty,
_latestOp.OpTotalConfirmedScrapQty as OpLtstConfirmedScrapQty,
_latestOp.OpPlannedTotalQuantity as OpLtstPlannedTotalQty,
case when _isConfirmed.StatusCode is null then '' else 'X' end as OperationIsConfirmed,
_latestOp.OperationUnit
}
where
_latestOp.SuperiorOperationInternalID is initial
and _latestOp.Sequence = '000000'
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