@AbapCatalog: {sqlViewName: 'IFASTVALWTHTMPPV', preserveKey: true}
@EndUserText.label: 'Fixed Asset values with temp. plan values'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@ObjectModel: { usageType.serviceQuality: #D,
usageType.sizeCategory: #XXL,
usageType.dataClass: #MIXED }
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
define view I_FixedAssetValWithTmpPlanVal
with parameters
P_CompanyCode : bukrs,
P_MasterFixedAsset : anln1,
P_FixedAsset : anln2,
P_AssetAccountingKeyFigureSet : faa_key_figure_set,
P_CreationDateTime : timestampl,
P_UserID : username,
P_FirstFiscalYear : gjahr
as select from P_FixedAssetLineItem( P_FirstFiscalYear: :P_FirstFiscalYear )
inner join I_AssetKeyFigureSetSpec as AssetKeyFigureSetSpec on AssetKeyFigureSetSpec.AssetAccountingKeyFigureSet = :P_AssetAccountingKeyFigureSet
inner join I_AssetKeyFigureSpecification as AssetKeyFigureSpec on AssetKeyFigureSpec.AssetAccountingKeyFigure = AssetKeyFigureSetSpec.AssetAccountingKeyFigure
and AssetKeyFigureSpec.AssetAcctAnlytlTransClassfctn = P_FixedAssetLineItem.AssetAcctTransClassfctn
and AssetKeyFigureSpec.SubLedgerAcctLineItemType = P_FixedAssetLineItem.SubLedgerAcctLineItemType
left outer join I_LedgerCompanyCodeCrcyRoles as LedgerCompanyCodeCrcyRole on LedgerCompanyCodeCrcyRole.CompanyCode = P_FixedAssetLineItem.CompanyCode
and LedgerCompanyCodeCrcyRole.Ledger = P_FixedAssetLineItem.Ledger
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
// association [0..1] to I_DepreciationArea as _DepreciationArea on $projection.ChartOfDepreciation = _DepreciationArea.ChartOfDepreciation
// and $projection.AssetDepreciationArea = _DepreciationArea.AssetDepreciationArea
association [0..1] to I_AssetDepreciationArea as _AssetDepreciationArea on $projection.ChartOfDepreciation = _AssetDepreciationArea.ChartOfDepreciation
and $projection.AssetDepreciationArea = _AssetDepreciationArea.AssetDepreciationArea
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_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_Ledger as _Ledger on $projection.Ledger = _Ledger.Ledger
association [0..1] to I_LedgerGroup as _LedgerGroup on $projection.ledgergroup = _LedgerGroup.LedgerGroup
association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear on $projection.FiscalYear = _FiscalYear.FiscalYear
and $projection.CompanyCode = _FiscalYear.CompanyCode
association [0..1] to I_FiscalYearPeriodForCmpnyCode as _FiscalPeriod on $projection.FiscalYear = _FiscalPeriod.FiscalYear
and $projection.FiscalPeriod = _FiscalPeriod.FiscalPeriod
and $projection.CompanyCode = _FiscalPeriod.CompanyCode
association [0..1] to I_AssetKeyFigure as _AssetKeyFigure on $projection.AssetAccountingKeyFigure = _AssetKeyFigure.AssetAccountingKeyFigure
association [0..1] to I_ChartOfDepreciation as _ChartOfDepreciation on $projection.ChartOfDepreciation = _ChartOfDepreciation.ChartOfDepreciation
association [0..1] to I_Currency as _CompanyCodeCurrency on $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
association [0..1] to I_Currency as _GlobalCurrency on $projection.GlobalCurrency = _GlobalCurrency.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency1 on $projection.FreeDefinedCurrency1 = _FreeDefinedCurrency1.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency2 on $projection.FreeDefinedCurrency2 = _FreeDefinedCurrency2.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency3 on $projection.FreeDefinedCurrency3 = _FreeDefinedCurrency3.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency4 on $projection.FreeDefinedCurrency4 = _FreeDefinedCurrency4.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency5 on $projection.FreeDefinedCurrency5 = _FreeDefinedCurrency5.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency6 on $projection.FreeDefinedCurrency6 = _FreeDefinedCurrency6.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency7 on $projection.FreeDefinedCurrency7 = _FreeDefinedCurrency7.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency8 on $projection.FreeDefinedCurrency8 = _FreeDefinedCurrency8.Currency
association [0..1] to I_CurrencyRole as _CompanyCodeCurrencyRole on $projection.CompanyCodeCurrencyRole = _CompanyCodeCurrencyRole.CurrencyRole
association [0..1] to I_CurrencyRole as _GlobalCurrencyRole on $projection.GlobalCurrencyRole = _GlobalCurrencyRole.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency1Role on $projection.FreeDefinedCurrency1Role = _FreeDefinedCurrency1Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency2Role on $projection.FreeDefinedCurrency2Role = _FreeDefinedCurrency2Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency3Role on $projection.FreeDefinedCurrency3Role = _FreeDefinedCurrency3Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency4Role on $projection.FreeDefinedCurrency4Role = _FreeDefinedCurrency4Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency5Role on $projection.FreeDefinedCurrency5Role = _FreeDefinedCurrency5Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency6Role on $projection.FreeDefinedCurrency6Role = _FreeDefinedCurrency6Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency7Role on $projection.FreeDefinedCurrency7Role = _FreeDefinedCurrency7Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency8Role on $projection.FreeDefinedCurrency8Role = _FreeDefinedCurrency8Role.CurrencyRole
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key P_FixedAssetLineItem.CompanyCode,
@ObjectModel.foreignKey.association: '_DepreciationArea'
key AssetDepreciationArea,
@ObjectModel.foreignKey.association: '_MasterFixedAsset'
key MasterFixedAsset,
@ObjectModel.foreignKey.association: '_FixedAsset'
key FixedAsset,
@ObjectModel.foreignKey.association: '_Ledger'
key P_FixedAssetLineItem.Ledger,
@ObjectModel.foreignKey.association: '_FiscalYear'
key FiscalYear,
@ObjectModel.foreignKey.association: '_FiscalPeriod'
key FiscalPeriod,
@ObjectModel.foreignKey.association: '_AssetKeyFigure'
key AssetKeyFigureSetSpec.AssetAccountingKeyFigure,
@ObjectModel.foreignKey.association: '_LedgerGroup'
_AssetDepreciationArea.LedgerGroup,
cast('0' as faa_use_val_ty) as PlannedValueIsInclusive,
@ObjectModel.foreignKey.association: '_ChartOfDepreciation'
ChartOfDepreciation,
@ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
@Semantics.currencyCode: true
CompanyCodeCurrency,
@ObjectModel.foreignKey.association: '_CompanyCodeCurrencyRole'
LedgerCompanyCodeCrcyRole.CompanyCodeCurrencyRole,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInCompanyCodeCrcy + P_FixedAssetLineItem.ActualAmountInCompanyCodeCrcy
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInCompanyCodeCrcy
else P_FixedAssetLineItem.ActualAmountInCompanyCodeCrcy end
as AmountInCompanyCodeCurrency,
@ObjectModel.foreignKey.association: '_GlobalCurrency'
@Semantics.currencyCode: true
GlobalCurrency,
@ObjectModel.foreignKey.association: '_GlobalCurrencyRole'
LedgerCompanyCodeCrcyRole.GlobalCurrencyRole,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInGlobalCurrency + P_FixedAssetLineItem.ActualAmountInGlobalCurrency
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInGlobalCurrency
else P_FixedAssetLineItem.ActualAmountInGlobalCurrency end
as AmountInGlobalCurrency,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency1'
@Semantics.currencyCode: true
FreeDefinedCurrency1,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency1Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency1Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy1 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy1
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy1
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy1 end
as AmountInFreeDefinedCurrency1,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency2'
@Semantics.currencyCode: true
FreeDefinedCurrency2,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency2Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency2Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy2 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy2
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy2
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy2 end
as AmountInFreeDefinedCurrency2,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency3'
@Semantics.currencyCode: true
FreeDefinedCurrency3,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency3Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency3Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy3 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy3
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy3
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy3 end
as AmountInFreeDefinedCurrency3,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency4'
@Semantics.currencyCode: true
FreeDefinedCurrency4,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency4Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency4Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy4 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy4
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy4
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy4 end
as AmountInFreeDefinedCurrency4,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency5'
@Semantics.currencyCode: true
FreeDefinedCurrency5,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency5Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency5Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy5 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy5
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy5
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy5 end
as AmountInFreeDefinedCurrency5,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency6'
@Semantics.currencyCode: true
FreeDefinedCurrency6,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency6Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency6Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy6 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy6
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy6
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy6 end
as AmountInFreeDefinedCurrency6,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency7'
@Semantics.currencyCode: true
FreeDefinedCurrency7,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency7Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency7Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy7 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy7
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy7
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy7 end
as AmountInFreeDefinedCurrency7,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency8'
@Semantics.currencyCode: true
FreeDefinedCurrency8,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency8Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency8Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy8 + P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy8
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FixedAssetLineItem.PlanAmountInFreeDefinedCrcy8
else P_FixedAssetLineItem.ActualAmountInFreeDfndCrcy8 end
as AmountInFreeDefinedCurrency8,
_CompanyCode,
_DepreciationArea,
_MasterFixedAsset,
_FixedAsset,
_Ledger,
_LedgerGroup,
_FiscalYear,
_FiscalPeriod,
_AssetKeyFigure,
_ChartOfDepreciation,
_CompanyCodeCurrency,
_GlobalCurrency,
_FreeDefinedCurrency1,
_FreeDefinedCurrency2,
_FreeDefinedCurrency3,
_FreeDefinedCurrency4,
_FreeDefinedCurrency5,
_FreeDefinedCurrency6,
_FreeDefinedCurrency7,
_FreeDefinedCurrency8,
_CompanyCodeCurrencyRole,
_GlobalCurrencyRole,
_FreeDefinedCurrency1Role,
_FreeDefinedCurrency2Role,
_FreeDefinedCurrency3Role,
_FreeDefinedCurrency4Role,
_FreeDefinedCurrency5Role,
_FreeDefinedCurrency6Role,
_FreeDefinedCurrency7Role,
_FreeDefinedCurrency8Role
}
where
P_FixedAssetLineItem.CompanyCode = :P_CompanyCode
and MasterFixedAsset = :P_MasterFixedAsset
and FixedAsset = :P_FixedAsset
union all select from P_FxdAstPlanValWithTmpPlanVal(P_CreationDateTime: :P_CreationDateTime , P_UserID: :P_UserID , P_FirstFiscalYear: :P_FirstFiscalYear)
inner join I_AssetKeyFigureSetSpec as AssetKeyFigureSetSpec on AssetKeyFigureSetSpec.AssetAccountingKeyFigureSet = :P_AssetAccountingKeyFigureSet
inner join I_AssetKeyFigureSpecification as AssetKeyFigureSpec on AssetKeyFigureSpec.AssetAccountingKeyFigure = AssetKeyFigureSetSpec.AssetAccountingKeyFigure
and AssetKeyFigureSpec.AssetAcctAnlytlTransClassfctn = P_FxdAstPlanValWithTmpPlanVal.AssetAcctTransClassfctn
and AssetKeyFigureSpec.SubLedgerAcctLineItemType = P_FxdAstPlanValWithTmpPlanVal.SubLedgerAcctLineItemType
left outer join I_LedgerCompanyCodeCrcyRoles as LedgerCompanyCodeCrcyRole on LedgerCompanyCodeCrcyRole.CompanyCode = P_FxdAstPlanValWithTmpPlanVal.CompanyCode
and LedgerCompanyCodeCrcyRole.Ledger = P_FxdAstPlanValWithTmpPlanVal.Ledger
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_AssetDepreciationArea as _AssetDepreciationArea on $projection.ChartOfDepreciation = _AssetDepreciationArea.ChartOfDepreciation
and $projection.AssetDepreciationArea = _AssetDepreciationArea.AssetDepreciationArea
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_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_AssetKeyFigure as _AssetKeyFigure on $projection.AssetAccountingKeyFigure = _AssetKeyFigure.AssetAccountingKeyFigure
association [0..1] to I_Ledger as _Ledger on $projection.Ledger = _Ledger.Ledger
association [0..1] to I_LedgerGroup as _LedgerGroup on $projection.ledgergroup = _LedgerGroup.LedgerGroup
association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear on $projection.FiscalYear = _FiscalYear.FiscalYear
and $projection.CompanyCode = _FiscalYear.CompanyCode
association [0..1] to I_FiscalYearPeriodForCmpnyCode as _FiscalPeriod on $projection.FiscalYear = _FiscalPeriod.FiscalYear
and $projection.FiscalPeriod = _FiscalPeriod.FiscalPeriod
and $projection.CompanyCode = _FiscalPeriod.CompanyCode
association [0..1] to I_ChartOfDepreciation as _ChartOfDepreciation on $projection.ChartOfDepreciation = _ChartOfDepreciation.ChartOfDepreciation
association [0..1] to I_Currency as _CompanyCodeCurrency on $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
association [0..1] to I_Currency as _GlobalCurrency on $projection.GlobalCurrency = _GlobalCurrency.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency1 on $projection.FreeDefinedCurrency1 = _FreeDefinedCurrency1.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency2 on $projection.FreeDefinedCurrency2 = _FreeDefinedCurrency2.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency3 on $projection.FreeDefinedCurrency3 = _FreeDefinedCurrency3.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency4 on $projection.FreeDefinedCurrency4 = _FreeDefinedCurrency4.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency5 on $projection.FreeDefinedCurrency5 = _FreeDefinedCurrency5.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency6 on $projection.FreeDefinedCurrency6 = _FreeDefinedCurrency6.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency7 on $projection.FreeDefinedCurrency7 = _FreeDefinedCurrency7.Currency
association [0..1] to I_Currency as _FreeDefinedCurrency8 on $projection.FreeDefinedCurrency8 = _FreeDefinedCurrency8.Currency
association [0..1] to I_CurrencyRole as _CompanyCodeCurrencyRole on $projection.CompanyCodeCurrencyRole = _CompanyCodeCurrencyRole.CurrencyRole
association [0..1] to I_CurrencyRole as _GlobalCurrencyRole on $projection.GlobalCurrencyRole = _GlobalCurrencyRole.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency1Role on $projection.FreeDefinedCurrency1Role = _FreeDefinedCurrency1Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency2Role on $projection.FreeDefinedCurrency2Role = _FreeDefinedCurrency2Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency3Role on $projection.FreeDefinedCurrency3Role = _FreeDefinedCurrency3Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency4Role on $projection.FreeDefinedCurrency4Role = _FreeDefinedCurrency4Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency5Role on $projection.FreeDefinedCurrency5Role = _FreeDefinedCurrency5Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency6Role on $projection.FreeDefinedCurrency6Role = _FreeDefinedCurrency6Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency7Role on $projection.FreeDefinedCurrency7Role = _FreeDefinedCurrency7Role.CurrencyRole
association [0..1] to I_CurrencyRole as _FreeDefinedCurrency8Role on $projection.FreeDefinedCurrency8Role = _FreeDefinedCurrency8Role.CurrencyRole
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key P_FxdAstPlanValWithTmpPlanVal.CompanyCode,
@ObjectModel.foreignKey.association: '_DepreciationArea'
key AssetDepreciationArea,
@ObjectModel.foreignKey.association: '_MasterFixedAsset'
key MasterFixedAsset,
@ObjectModel.foreignKey.association: '_FixedAsset'
key FixedAsset,
@ObjectModel.foreignKey.association: '_Ledger'
key P_FxdAstPlanValWithTmpPlanVal.Ledger,
@ObjectModel.foreignKey.association: '_FiscalYear'
key FiscalYear,
@ObjectModel.foreignKey.association: '_FiscalPeriod'
key FiscalPeriod,
@ObjectModel.foreignKey.association: '_AssetKeyFigure'
key AssetKeyFigureSetSpec.AssetAccountingKeyFigure,
@ObjectModel.foreignKey.association: '_LedgerGroup'
//P_FxdAstPlanValWithTmpPlanVal.LedgerGroup,
_AssetDepreciationArea.LedgerGroup,
P_FxdAstPlanValWithTmpPlanVal.PlannedValueIsInclusive,
@ObjectModel.foreignKey.association: '_ChartOfDepreciation'
ChartOfDepreciation,
@ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
@Semantics.currencyCode: true
CompanyCodeCurrency,
@ObjectModel.foreignKey.association: '_CompanyCodeCurrencyRole'
LedgerCompanyCodeCrcyRole.CompanyCodeCurrencyRole,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInCompanyCodeCrcy + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInCompanyCodeCrcy
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInCompanyCodeCrcy
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInCompanyCodeCrcy end
as AmountInCompanyCodeCurrency,
@ObjectModel.foreignKey.association: '_GlobalCurrency'
@Semantics.currencyCode: true
GlobalCurrency,
@ObjectModel.foreignKey.association: '_GlobalCurrencyRole'
LedgerCompanyCodeCrcyRole.GlobalCurrencyRole,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInGlobalCurrency + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInGlobalCurrency
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInGlobalCurrency
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInGlobalCurrency end
as AmountInGlobalCurrency,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency1'
@Semantics.currencyCode: true
FreeDefinedCurrency1,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency1Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency1Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy1 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy1
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy1
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy1 end
as AmountInFreeDefinedCurrency1,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency2'
@Semantics.currencyCode: true
FreeDefinedCurrency2,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency2Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency2Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy2 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy2
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy2
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy2 end
as AmountInFreeDefinedCurrency2,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency3'
@Semantics.currencyCode: true
FreeDefinedCurrency3,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency3Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency3Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy3 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy3
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy3
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy3 end
as AmountInFreeDefinedCurrency3,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency4'
@Semantics.currencyCode: true
FreeDefinedCurrency4,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency4Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency4Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy4 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy4
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy4
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy4 end
as AmountInFreeDefinedCurrency4,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency5'
@Semantics.currencyCode: true
FreeDefinedCurrency5,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency5Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency5Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy5 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy5
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy5
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy5 end
as AmountInFreeDefinedCurrency5,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency6'
@Semantics.currencyCode: true
FreeDefinedCurrency6,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency6Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency6Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy6 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy6
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy6
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy6 end
as AmountInFreeDefinedCurrency6,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency7'
@Semantics.currencyCode: true
FreeDefinedCurrency7,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency7Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency7Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy7 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy7
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy7
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy7 end
as AmountInFreeDefinedCurrency7,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency8'
@Semantics.currencyCode: true
FreeDefinedCurrency8,
@ObjectModel.foreignKey.association: '_FreeDefinedCurrency8Role'
LedgerCompanyCodeCrcyRole.FreeDefinedCurrency8Role,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
case when AssetKeyFigureSpec.PlannedValueIsInclusive = '1' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy8 + P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy8
when AssetKeyFigureSpec.PlannedValueIsInclusive = '2' then P_FxdAstPlanValWithTmpPlanVal.PlanAmountInFreeDefinedCrcy8
else P_FxdAstPlanValWithTmpPlanVal.ActualAmountInFreeDfndCrcy8 end
as AmountInFreeDefinedCurrency8,
_CompanyCode,
_DepreciationArea,
_MasterFixedAsset,
_FixedAsset,
_Ledger,
_LedgerGroup,
_FiscalYear,
_FiscalPeriod,
_AssetKeyFigure,
_ChartOfDepreciation,
_CompanyCodeCurrency,
_GlobalCurrency,
_FreeDefinedCurrency1,
_FreeDefinedCurrency2,
_FreeDefinedCurrency3,
_FreeDefinedCurrency4,
_FreeDefinedCurrency5,
_FreeDefinedCurrency6,
_FreeDefinedCurrency7,
_FreeDefinedCurrency8,
_CompanyCodeCurrencyRole,
_GlobalCurrencyRole,
_FreeDefinedCurrency1Role,
_FreeDefinedCurrency2Role,
_FreeDefinedCurrency3Role,
_FreeDefinedCurrency4Role,
_FreeDefinedCurrency5Role,
_FreeDefinedCurrency6Role,
_FreeDefinedCurrency7Role,
_FreeDefinedCurrency8Role
}
where
P_FxdAstPlanValWithTmpPlanVal.CompanyCode = :P_CompanyCode
and MasterFixedAsset = :P_MasterFixedAsset
and FixedAsset = :P_FixedAsset