P_FixedAssetPurchaseOrderOvw
P_FixedAssetPurchaseOrderOvw is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrderItem) and exposes 20 fields with key fields PurchaseOrder, PurchaseOrderItem. It has 3 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseOrderItem | I_PurchaseOrderItem | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_TodayDate | fagl_keydate | |
| P_DisplayCurrency | vdm_v_display_currency |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | C_PoItemMoniCalcField | _FinalCalc | $projection.PurchaseOrder = _FinalCalc.PurchaseOrder and $projection.PurchaseOrderItem = _FinalCalc.PurchasingDocumentItem |
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_Plant | _Plant | $projection.PurOrderItemPlant = _Plant.Plant |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFASSETPOOV | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | ||
| KEY | PurchaseOrderItem | PurchaseOrderItem | ||
| AccountAssignmentCategory | AccountAssignmentCategory | |||
| CompanyCode | CompanyCode | |||
| PurOrderItemPlant | ||||
| Supplier | _PurchaseOrder | Supplier | ||
| SupplierName | ||||
| SupplierAccountGroup | ||||
| SupplierBasicAuthorizationGrp | ||||
| PurchasingDocumentOrderDate | _PurchaseOrder | PurchaseOrderDate | ||
| IsCompletelyDelivered | IsCompletelyDelivered | |||
| IsFinallyInvoiced | IsFinallyInvoiced | |||
| PurchaseOrderItemText | ||||
| DisplayCurrency | ||||
| trueasPurchaseOrderItemNetAmount | ||||
| trueasStillToBeDeliveredValue | ||||
| trueasStillToInvoiceValue | ||||
| _PurchaseOrder | _PurchaseOrder | |||
| _CompanyCode | _CompanyCode | |||
| _Plant | _Plant |
@AbapCatalog.sqlViewName: 'PFASSETPOOV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: { viewType: #CONSUMPTION,
private: true }
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: { usageType.serviceQuality: #C,
usageType.sizeCategory: #L,
usageType.dataClass: #TRANSACTIONAL }
define view P_FixedAssetPurchaseOrderOvw
with parameters
P_TodayDate : fagl_keydate,
P_DisplayCurrency : vdm_v_display_currency
as select from I_PurchaseOrderItem
association [1..1] to C_PoItemMoniCalcField as _FinalCalc on $projection.PurchaseOrder = _FinalCalc.PurchaseOrder
and $projection.PurchaseOrderItem = _FinalCalc.PurchasingDocumentItem
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_Plant as _Plant on $projection.PurOrderItemPlant = _Plant.Plant
{
key PurchaseOrder,
key PurchaseOrderItem,
/* Details */
AccountAssignmentCategory,
CompanyCode,
cast( Plant as faa_asset_purg_plant preserving type ) as PurOrderItemPlant,
_PurchaseOrder.Supplier,
_PurchaseOrder._Supplier.SupplierName,
_PurchaseOrder._Supplier.SupplierAccountGroup,
_PurchaseOrder._Supplier.AuthorizationGroup as SupplierBasicAuthorizationGrp,
_PurchaseOrder.PurchaseOrderDate as PurchasingDocumentOrderDate,
IsCompletelyDelivered,
IsFinallyInvoiced,
cast(PurchaseOrderItemText as faa_asset_po_item_text preserving type) as PurchaseOrderItemText,
/* Amounts */
:P_DisplayCurrency as DisplayCurrency,
currency_conversion(
amount => NetAmount,
source_currency => DocumentCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => 'M',
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as PurchaseOrderItemNetAmount,
currency_conversion(
amount => _FinalCalc.StillToBeDeliveredValue,
source_currency => DocumentCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => 'M',
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as StillToBeDeliveredValue,
currency_conversion(
amount => _FinalCalc.StillToInvoiceValue,
source_currency => DocumentCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => 'M',
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as StillToInvoiceValue,
_PurchaseOrder,
_CompanyCode,
_Plant
}
where
PurchasingDocumentDeletionCode = ''
and(
IsCompletelyDelivered = ''
or IsFinallyInvoiced = ''
)
and(
_PurchaseOrder._Supplier.IsBusinessPurposeCompleted <> 'X'
or
_PurchaseOrder._Supplier.Supplier = ' '
)
and AccountAssignmentCategory = 'A'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_POITEMMONICALCFIELD",
"I_PURCHASEORDER",
"I_PURCHASEORDERITEM",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"C_POITEMMONICALCFIELD",
"I_COMPANYCODE",
"I_PLANT",
"I_PURCHASEORDER"
],
"BASE":
[
"I_PURCHASEORDERITEM"
],
"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