P_PrepaymentDocumentMarketVal
Document Market Value
P_PrepaymentDocumentMarketVal is a Composite CDS View that provides data about "Document Market Value" in SAP S/4HANA. It reads from 1 data source (P_PrepaymentDocumentFixedVal) and exposes 5 fields with key fields TradingContract, TradingContractItem, PrepaymentRefDocCondition.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_PrepaymentDocumentFixedVal | PricingVal | from |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPMGDOCMKTVAL | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Document Market Value | view |
Fields (5)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | TradingContract | P_PrepaymentDocumentFixedVal | TradingContract | |
| KEY | TradingContractItem | P_PrepaymentDocumentFixedVal | TradingContractItem | |
| KEY | PrepaymentRefDocCondition | P_PrepaymentDocumentFixedVal | PrepaymentRefDocCondition | |
| PrepaymentRefDocFixedPriceCrcy | P_PrepaymentDocumentFixedVal | PrepaymentRefDocFixedPriceCrcy | ||
| PrepaymentTotalAmtIsFixedPrice | P_PrepaymentDocumentFixedVal | PrepaymentTotalAmtIsFixedPrice |
@AbapCatalog.sqlViewName: 'PPMGDOCMKTVAL'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm : #SESSION_VARIABLE
@VDM.private : true
@VDM.viewType : #COMPOSITE
@ObjectModel.usageType.sizeCategory : #L
@ObjectModel.usageType.serviceQuality : #C
@ObjectModel.usageType.dataClass : #TRANSACTIONAL
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Document Market Value'
define view P_PrepaymentDocumentMarketVal
as select from P_PrepaymentDocumentFixedVal as PricingVal
{
key PricingVal.TradingContract as TradingContract,
key PricingVal.TradingContractItem as TradingContractItem,
key PricingVal.PrepaymentRefDocCondition as PrepaymentRefDocCondition,
@Semantics.amount.currencyCode: 'PrepaymentRefDocFixedPriceCrcy'
sum(
case when PricingVal.PrepaymentTotalAmtIsFixedPrice = ' ' -- Price Fixation is partial
and PricingVal.MTMCalculationGroup = 'B' -- Basis
then PricingVal.PrepaymentRefDocFixedPrice +
(PricingVal.PrepaymentDocCmmdtyMarketQty *
coalesce( cast(round(PricingVal.PrepaymentRefDocBasisPrice,4) as abap.curr(13,4)),
PricingVal.ConditionTermRate))
when PricingVal.PrepaymentTotalAmtIsFixedPrice = ' ' -- Price Fixation is partial
and PricingVal.MTMCalculationGroup = 'F' -- Future
then PricingVal.PrepaymentRefDocFixedPrice +
(PricingVal.PrepaymentDocCmmdtyMarketQty *
coalesce( cast(round(PricingVal.PrepaymentRefDocFuturePrice,4) as abap.curr(13,4)),
PricingVal.ConditionTermRate ) )
when PricingVal.PrepaymentTotalAmtIsFixedPrice = 'X' -- Price Fixation is complete
then PricingVal.PrepaymentRefDocFixedPrice
else 0 end ) as PrepaymentTotalAmt,
@Semantics.currencyCode: true
PricingVal.PrepaymentRefDocFixedPriceCrcy as PrepaymentRefDocFixedPriceCrcy,
PricingVal.PrepaymentTotalAmtIsFixedPrice as PrepaymentTotalAmtIsFixedPrice
}
where
PricingVal.MTMConditionGroupCategory = '1'
group by
PricingVal.TradingContract,
PricingVal.TradingContractItem,
PricingVal.PrepaymentRefDocCondition,
PricingVal.PrepaymentRefDocFixedPriceCrcy,
PricingVal.PrepaymentTotalAmtIsFixedPrice
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_PREPAYMENTDOCUMENTFIXEDVAL"
],
"ASSOCIATED":
[],
"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