P_SrvcOrdFUPPurOrdProcessFlow
Solution Order Purchase Order Flow
P_SrvcOrdFUPPurOrdProcessFlow is a Consumption CDS View that provides data about "Solution Order Purchase Order Flow" in SAP S/4HANA. It reads from 3 data sources (P_BusSolnOrdSrvcOrdFlwLvl21, I_PurchaseOrderHistoryBasic, I_PurchaseOrderItem) and exposes 10 fields with key fields PurchaseOrderendasPrecedingDocument, char6endasPrecedingDocumentItem, SubsequentDocument, SubsequentDocumentItem. Part of development package CRMS4_SOLUTION_ORDER_PROGRESS.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_BusSolnOrdSrvcOrdFlwLvl21 | Level21 | from |
| I_PurchaseOrderHistoryBasic | POHistory | inner |
| I_PurchaseOrderItem | POItem | inner |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSRVORDPRPF | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| EndUserText.label | Solution Order Purchase Order Flow | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrderendasPrecedingDocument | |||
| KEY | char6endasPrecedingDocumentItem | |||
| KEY | SubsequentDocument | I_PurchaseOrderHistoryBasic | PurchasingHistoryDocument | |
| KEY | SubsequentDocumentItem | I_PurchaseOrderHistoryBasic | PurchasingHistoryDocumentItem | |
| PurchaseRequisition | I_PurchaseOrderItem | PurchaseRequisition | ||
| PurchaseRequisitionItem | I_PurchaseOrderItem | PurchaseRequisitionItem | ||
| ServiceObjectType | P_BusSolnOrdSrvcOrdFlwLvl21 | ServiceObjectType | ||
| ServiceOrder | P_BusSolnOrdSrvcOrdFlwLvl21 | ServiceOrder | ||
| ServiceOrderItem | P_BusSolnOrdSrvcOrdFlwLvl21 | ServiceOrderItem | ||
| BusinessSolutionOrder | P_BusSolnOrdSrvcOrdFlwLvl21 | BusinessSolutionOrder |
@AbapCatalog: {
sqlViewName: 'PSRVORDPRPF',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {
dataClass: #MIXED,
serviceQuality: #D,
sizeCategory: #XL
}
@VDM: {
viewType: #CONSUMPTION,
private: true
}
@EndUserText.label: 'Solution Order Purchase Order Flow'
/*
Purchase Order -> Service Entry Sheet
Purchase Order -> Goods Receipt
Purchase Order -> Invoice Receipt
Service Entry Sheet -> Goods Receipt
Service Entry Sheet -> Invoice Receipt
Goods Receipt -> Invoice Receipt
*/
define view P_SrvcOrdFUPPurOrdProcessFlow
as select from P_BusSolnOrdSrvcOrdFlwLvl21 as Level21
inner join I_PurchaseOrderItem as POItem on POItem.PurchaseRequisition = Level21.SubsequentDocument
and POItem.PurchaseRequisitionItem = Level21.SubsequentDocumentItem
inner join I_PurchaseOrderHistoryBasic as POHistory on POHistory.PurchaseOrder = POItem.PurchaseOrder
and POHistory.PurchaseOrderItem = POItem.PurchaseOrderItem
{
key case when POHistory.ReferenceDocument <> ''
and POHistory.ReferenceDocument <> POHistory.PurchasingHistoryDocument
then POHistory.ReferenceDocument
else POItem.PurchaseOrder
end as PrecedingDocument,
key case when POHistory.ReferenceDocument <> ''
and POHistory.ReferenceDocument <> POHistory.PurchasingHistoryDocument
then POHistory.ReferenceDocumentItem
else cast (POItem.PurchaseOrderItem as abap.char(6))
end as PrecedingDocumentItem,
key case when POHistory.ReferenceDocument <> ''
and POHistory.ReferenceDocument <> POHistory.PurchasingHistoryDocument
and POHistory.ReferenceDocument like '5%'
then 'G'
when POHistory.ReferenceDocument <> ''
and POHistory.ReferenceDocument <> POHistory.PurchasingHistoryDocument
then 'SES'
else 'F'
end as PrecedingDocumentCategory,
key POHistory.PurchasingHistoryDocument as SubsequentDocument,
key POHistory.PurchasingHistoryDocumentItem as SubsequentDocumentItem,
key case when POHistory.PurchasingHistoryDocumentType = '1'
then 'G'
when POHistory.PurchasingHistoryDocumentType = 'S'
then 'SES'
else POHistory.PurchasingHistoryDocumentType
end as SubsequentDocumentCategory,
POItem.PurchaseRequisition,
POItem.PurchaseRequisitionItem,
Level21.ServiceObjectType,
Level21.ServiceOrder,
Level21.ServiceOrderItem,
Level21.BusinessSolutionOrder
}
where
POHistory.PurchasingHistoryDocumentType = '1' // Goods Receipt
or POHistory.PurchasingHistoryDocumentType = '2' // Invoice Receipt
or POHistory.PurchasingHistoryDocumentType = 'S' // Service Entry Sheet in SAP S/4HANA
and(
POHistory.PurchasingHistoryCategory = '0' // Service Entry Sheet
or POHistory.PurchasingHistoryCategory = 'E' // Goods Receipt
or POHistory.PurchasingHistoryCategory = 'Q' // Invoice Receipt
or POHistory.PurchasingHistoryCategory = 'R' // Invoice Receipt
)
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