P_InApprovalPurchaseOrderItem
In Approval Purchase Order Items
P_InApprovalPurchaseOrderItem is a Consumption CDS View that provides data about "In Approval Purchase Order Items" in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrderItem) and exposes 17 fields with key fields PurchaseOrder, PurchaseOrderItem. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseOrderItem | I_PurchaseOrderItem | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_PurchasingCategoryMatlGroup | _PurchasingCategoryMatlGroup | $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PINAPPO | view | |
| EndUserText.label | In Approval Purchase Order Items | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | ||
| KEY | PurchaseOrderItem | PurchaseOrderItem | ||
| MaterialGroup | MaterialGroup | |||
| PurchasingCategory | ||||
| PurchasingOrganization | _PurchaseOrder | PurchasingOrganization | ||
| PurchasingGroup | _PurchaseOrder | PurchasingGroup | ||
| CompanyCode | CompanyCode | |||
| Plant | Plant | |||
| Material | Material | |||
| MaterialName | ||||
| PurchaseOrderDate | _PurchaseOrder | PurchaseOrderDate | ||
| OrderQuantity | ||||
| Supplier | _PurchaseOrder | Supplier | ||
| SupplierName | ||||
| NetAmount | ||||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | |||
| _PurchaseOrder | _PurchaseOrder |
@AbapCatalog.sqlViewName: 'PINAPPO'
@EndUserText.label: 'In Approval Purchase Order Items'
@AbapCatalog.compiler.compareFilter: true
@VDM.private: true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@AbapCatalog.viewEnhancementCategory: [#PROJECTION_LIST,#UNION]
@AbapCatalog.preserveKey:true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck:#PRIVILEGED_ONLY
define view P_InApprovalPurchaseOrderItem //^3349445
as select from I_PurchaseOrderItem
association [0..*] to I_PurchasingCategoryMatlGroup as _PurchasingCategoryMatlGroup on $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup
{
key PurchaseOrder,
key PurchaseOrderItem,
//Filters
MaterialGroup,
_PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory as PurchasingCategory,
_PurchaseOrder.PurchasingOrganization,
_PurchaseOrder.PurchasingGroup,
CompanyCode,
Plant,
@ObjectModel.text.element: ['MaterialName']
@Consumption.labelElement: 'MaterialName'
Material,
@Semantics.text: true
_Material._Text[1: Language = $session.system_language].MaterialName as MaterialName,
_PurchaseOrder.PurchaseOrderDate,
@Semantics.quantity.unitOfMeasure: 'PurchaseOrderQuantityUnit'
cast(OrderQuantity as abap.dec( 21, 5 )) as OrderQuantity,
@ObjectModel.text.element: ['SupplierName']
@Consumption.labelElement: 'SupplierName'
_PurchaseOrder.Supplier,
@Semantics.text: true
_PurchaseOrder._Supplier.SupplierName,
cast( NetAmount as abap.curr(21,5)) as NetAmount,
@Semantics.unitOfMeasure: true
PurchaseOrderQuantityUnit,
// fields for DCL
@UI.hidden: true
_PurchaseOrder
}
where
PurchasingDocumentDeletionCode = ''
and _PurchaseOrder.PurchasingDocumentDeletionCode = ''
and(
IsCompletelyDelivered = ''
or IsFinallyInvoiced = ''
)
and PurchaseOrderItemCategory <> '9' // do not consider Service PO
and PurchaseOrderItemCategory <> '1'
//Conditions for In Approval PO Items
and _PurchaseOrder.ReleaseIsNotCompleted = 'X'
and _PurchaseOrder.PurchasingCompletenessStatus <> 'X'
and _PurchaseOrder.PurchasingProcessingStatus <> '08' //08 => Rejected
// filter out statistical Items (excluding Retail i.e Material = '')
and not( Material = '' and IsStatisticalItem = 'X' ) //v3349445
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