P_ASTKEYFIGBALCOMPRNCUBE2
Asset Key Figure Balance Comparison Cube 2
P_ASTKEYFIGBALCOMPRNCUBE2 is a CDS View in S/4HANA. Asset Key Figure Balance Comparison Cube 2. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_AstKeyFigBalComprnCube1 | view | inner | CONSUMPTION | Asset Key Figure Balance Comparison Cube 1 |
//@AbapCatalog.sqlViewName: 'PASTKEYFIGCMPC2'
//@AbapCatalog.preserveKey: true
//@AbapCatalog.compiler.compareFilter: true
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel: { usageType.serviceQuality: #D,
usageType.sizeCategory: #XXL,
usageType.dataClass: #MIXED }
//@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
//@AbapCatalog.buffering.status: #NOT_ALLOWED
define view entity P_AstKeyFigBalComprnCube2
with parameters
P_CompanyCode : bukrs,
P_MasterFixedAsset : anln1,
P_FixedAsset : anln2,
P_AssetAccountingKeyFigureSet : faa_key_figure_set,
P_CurrencyRole : fis_curtp,
P_CreationDateTime : timestampl,
P_UserID : username
as select from P_AstKeyFigBalComprnCube3(
P_CompanyCode: $parameters.P_CompanyCode,
P_MasterFixedAsset: $parameters.P_MasterFixedAsset,
P_FixedAsset: $parameters.P_FixedAsset,
P_AssetAccountingKeyFigureSet: $parameters.P_AssetAccountingKeyFigureSet,
P_CurrencyRole: $parameters.P_CurrencyRole,
P_CreationDateTime: $parameters.P_CreationDateTime,
P_UserID: $parameters.P_UserID
)
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_DepreciationAreaForLedger as _DepreciationArea on $projection.CompanyCode = _DepreciationArea.CompanyCode
and $projection.Ledger = _DepreciationArea.Ledger
and $projection.AssetDepreciationArea = _DepreciationArea.AssetDepreciationArea
association [0..1] to I_Ledger as _Ledger on $projection.Ledger = _Ledger.Ledger
association [0..1] to I_MasterFixedAsset as _MasterFixedAsset on $projection.CompanyCode = _MasterFixedAsset.CompanyCode
and $projection.MasterFixedAsset = _MasterFixedAsset.MasterFixedAsset
association [0..1] to I_FixedAsset as _FixedAsset on $projection.CompanyCode = _FixedAsset.CompanyCode
and $projection.MasterFixedAsset = _FixedAsset.MasterFixedAsset
and $projection.FixedAsset = _FixedAsset.FixedAsset
// association [0..1] to I_AssetAccountingValueType as _AssetAccountingValueType on $projection.AssetAccountingValueType = _AssetAccountingValueType.AssetAccountingValueType
association [0..1] to I_AstAcctgValTypeInValDsp as _AssetAccountingValueType on $projection.AssetAccountingValueType = _AssetAccountingValueType.AssetAccountingValueType
association [0..1] to I_Currency as _Currency on $projection.DisplayCurrency = _Currency.Currency
association [0..1] to I_CurrencyRole as _CurrencyRole on $projection.CurrencyRole = _CurrencyRole.CurrencyRole
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key CompanyCode,
@ObjectModel.foreignKey.association: '_DepreciationArea'
key AssetDepreciationArea,
@ObjectModel.foreignKey.association: '_Ledger'
key Ledger,
@ObjectModel.foreignKey.association: '_MasterFixedAsset'
key MasterFixedAsset,
@ObjectModel.foreignKey.association: '_FixedAsset'
key FixedAsset,
key FiscalYear,
@ObjectModel.foreignKey.association: '_CurrencyRole'
key CurrencyRole,
@ObjectModel.foreignKey.association: '_AssetAccountingValueType'
key AssetAccountingValueType,
_DepreciationArea.AssetValuationView as AssetValuationView,
// @Semantics.currencyCode:true
@ObjectModel.foreignKey.association: '_Currency'
DisplayCurrency,
@DefaultAggregation:#SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(
case AssetAccountingValueType
when '70' then ( StartingBalAmtInDspCrcy + PlannedAmountInDisplayCurrency + AmountInDisplayCurrency ) // NetBook Value (YEAR-END)
when '10' then ( StartingBalAmtInDspCrcy + PlannedAmountInDisplayCurrency + AmountInDisplayCurrency ) // Total APC (YEAR-END)
else ( PlannedAmountInDisplayCurrency + AmountInDisplayCurrency ) // Others (CHANGE)
end
as farp_amount_display_crcy ) as AmountInDisplayCurrency,
cast(
case AssetAccountingValueType
when '70' then 3 // NetBook Value
when '10' then 3 // Total APC
else 0
end
as eve_tv_criticality ) as Criticality,
_CompanyCode,
_DepreciationArea,
_MasterFixedAsset,
_FixedAsset,
_Ledger,
_AssetAccountingValueType,
_Currency,
_CurrencyRole
}
where
// ignoring key figures with zero line items except '70' - NetBook Value / '10' - Total APC
(
StartingBalAmtInDspCrcy <> 0.00
or PlannedAmountInDisplayCurrency <> 0.00
or AmountInDisplayCurrency <> 0.00
)
or(
AssetAccountingValueType = '70'
or AssetAccountingValueType = '10'
)