P_PurOrdMaintainHeaderStatus
Manage Purchase Orders: PO "Simple" Header Status
P_PurOrdMaintainHeaderStatus is a Consumption CDS View that provides data about "Manage Purchase Orders: PO "Simple" Header Status" in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrder) and exposes 1 field with key field PurchaseOrder. Part of development package ODATA_MM_PUR_PO_MAINTAIN.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseOrder | header | from |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PPOMAINTHDRSTAT | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| VDM.viewType | #CONSUMPTION | view |
Fields (1)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | I_PurchaseOrder | PurchaseOrder |
// =========================================================================
// "Simple" Status of Purchase Order Header
// =========================================================================
// The following "simple" status values are supported:
// 01 Draft
// 02 In Approval
// 10 Deleted
// 38 Rejected
//
// The "simple" Status view is used e.g. in "Manage Purchase Order" list,
// the "complex" (i.e. performance intensive) status values are not
// considered here and are calculated in ABAP.
// All status values are calculated in "I_PurchaseOrderStatus".
// =========================================================================
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PPOMAINTHDRSTAT'
@VDM.private: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.viewType: #CONSUMPTION
define view P_PurOrdMaintainHeaderStatus
as select from I_PurchaseOrder as header
{
key header.PurchaseOrder as PurchaseOrder,
case header.PurchasingDocumentDeletionCode
when 'X' then cast('10' as abap.char(2))
when 'L' then cast('10' as abap.char(2))
else case header.PurchasingCompletenessStatus
when 'X' then cast('01' as abap.char(2))
else case header.PurchasingProcessingStatus
when '08' then cast('38' as abap.char(2))
else case header.ReleaseIsNotCompleted
when 'X' then cast('02' as abap.char(2))
else ''
end
end
end
end as PurchasingDocumentStatus
}
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