@AbapCatalog: { sqlViewName: 'PCMMFTRANSQSUM',
compiler.compareFilter: true ,
preserveKey: true }
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: { viewType: #COMPOSITE,
private: true }
@ObjectModel.usageType: { serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL }
@ClientHandling.algorithm: #SESSION_VARIABLE
//@EndUserText.label : 'Commodity Hedge Const. Trans. Quant. Sum'
define view P_CmmdtyHdgFinTransQuantitySum
with parameters
@Environment.systemField: #SYSTEM_DATE
P_EvalDate : dats
as select from P_CmmdtyHdgCnstltnFinTransQty(P_EvalDate:$parameters .P_EvalDate) as fintran_qty
inner join I_CmmdtyHdgExpsrRelByDteCmpst( P_EvalDate : $parameters .P_EvalDate ) as cm_exp_last_released on cm_exp_last_released.CommodityHedgePlanExposureID = fintran_qty.CommodityHedgePlanExposureID
inner join I_CommodityHedgePlanExposure as cm_exposure on cm_exposure.CommodityHedgePlanExposureUUID = cm_exp_last_released.CommodityHedgePlanExposureUUID
inner join I_CmmdtyHdgHdggArRelByDteCmpst( P_EvalDate : $parameters .P_EvalDate) as hedging_area on hedging_area.HedgingAreaIdentification = cm_exposure.CmmdtyHdgPlnExpsrHedgingArea
{
key fintran_qty.CommodityHedgePlanExposureID,
@Semantics.quantity.unitOfMeasure : 'UnitOfMeasure'
sum( fintran_qty.FinancialTransactionQuantity ) as FinancialTransactionQuantity,
@Semantics.quantity.unitOfMeasure : 'UnitOfMeasure'
sum( fintran_qty.FinTransDesignatedQuantity ) as FinTransDesignatedQuantity,
@Semantics.quantity.unitOfMeasure : 'UnitOfMeasure'
sum( fintran_qty.FinTransPlndDesignatedQuantity ) as FinTransPlndDesignatedQuantity,
@Semantics.unitOfMeasure: true
fintran_qty.UnitOfMeasure,
/* Associations */
fintran_qty._CM_Exposure
}
where
fintran_qty.CommodityHedgePlanExposureID is not null
and fintran_qty.CmmdtyHdgCnstltnProductArea = 'CTY'
and fintran_qty.CmmdtyHdgConstellationDealRole <> 'OFFSETTING'
and fintran_qty.CompanyCode = fintran_qty.CmmdtyHdgPlnExpsrCompanyCode
and (
fintran_qty.TreasuryValuationArea is null
or fintran_qty.TreasuryValuationArea = hedging_area.HdggAreaLeadingValuationArea
)
and (
fintran_qty.HedgingRelationshipStatus is null
or fintran_qty.HedgingRelationshipStatus <> '02' // 02 = Revoked
)
group by
fintran_qty.CommodityHedgePlanExposureID,
fintran_qty.UnitOfMeasure
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_CMMDTYHDGEXPSRRELBYDTECMPST",
"I_CMMDTYHDGHDGGARRELBYDTECMPST",
"I_COMMODITYHEDGEPLANEXPOSURE",
"P_CMMDTYHDGCNSTLTNFINTRANSQTY"
],
"ASSOCIATED":
[
"I_CMMDTYHDGPLNEXPSRLASTRELD"
],
"BASE":
[
"P_CMMDTYHDGCNSTLTNFINTRANSQTY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_CmmdtyHdgFinTransQuantitySum view