I_PurchaseOrderNetAmount
Calculation of net amount on purchase order header level
I_PurchaseOrderNetAmount is a Composite CDS View that provides data about "Calculation of net amount on purchase order header level" in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrderItem) and exposes 4 fields with key field PurchaseOrder. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseOrderItem | I_PurchaseOrderItem | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Currency | _Currency | $projection.DocumentCurrency = _Currency.Currency |
| [1..1] | I_PurchaseOrder | _PurchaseOrder | $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | IPURORDNETAMOUNT | view | |
| EndUserText.label | Calculation of net amount on purchase order header level | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.semanticKey | PurchaseOrder | view | |
| ObjectModel.representativeKey | PurchaseOrder | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | ||
| DocumentCurrency | DocumentCurrency | |||
| _Currency | _Currency | |||
| _PurchaseOrder | _PurchaseOrder |
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'IPURORDNETAMOUNT'
@EndUserText.label: 'Calculation of net amount on purchase order header level'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.semanticKey: 'PurchaseOrder'
@ObjectModel.representativeKey: 'PurchaseOrder'
define view I_PurchaseOrderNetAmount
as select from I_PurchaseOrderItem
association [0..1] to I_Currency as _Currency on $projection.DocumentCurrency = _Currency.Currency
association [1..1] to I_PurchaseOrder as _PurchaseOrder on $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder
{
key PurchaseOrder,
@Semantics.currencyCode: true
DocumentCurrency,
@Semantics.amount.currencyCode: 'DocumentCurrency'
@DefaultAggregation: #SUM
sum(
case PurchasingDocumentDeletionCode
when 'L' then cast(0 as mm_pur_order_tot_net_amount)
when 'X' then cast(0 as mm_pur_order_tot_net_amount)
else case IsStatisticalItem
when 'X' then cast(0 as mm_pur_order_tot_net_amount)
else case IsReturnsItem
when 'X' then cast(-NetAmount as mm_pur_order_tot_net_amount)
else NetAmount
end
end
end
) as PurchaseOrderNetAmount,
_Currency,
_PurchaseOrder
}
group by
PurchaseOrder,
DocumentCurrency
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEORDERITEM"
],
"ASSOCIATED":
[
"I_CURRENCY",
"I_PURCHASEORDER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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