I_FIXEDASSETVALUEFORTOFSCLPERD

CDS View

Fixed Asset Values

I_FIXEDASSETVALUEFORTOFSCLPERD is a CDS View in S/4HANA. Fixed Asset Values. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
P_FixedAssetAHSValue view from COMPOSITE
P_FixedAssetAHSValue view union_all COMPOSITE
P_FixedAssetValueCube view from COMPOSITE
P_FixedAssetValueCube view union_all COMPOSITE
@AbapCatalog: {sqlViewName: 'IFASSETVALUEFP', preserveKey: true, compiler.compareFilter: true}
@EndUserText.label: 'Fixed Asset 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_FixedAssetValueForToFsclPerd
  with parameters
    P_AssetAccountingKeyFigureSet : faa_key_figure_set,
    P_FiscalYear                  : fis_gjahr,
    P_ToFiscalPeriod              : fis_period_to

  as select from P_FixedAssetValueForToFsclPerd(P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet, P_FiscalYear: :P_FiscalYear, P_ToFiscalPeriod: :P_ToFiscalPeriod) as Values
    inner join   I_LedgerCompanyCodeCrcyRoles                                                                                                                                    as LedgerCompanyCodeCrcyRole on  LedgerCompanyCodeCrcyRole.CompanyCode = Values.CompanyCode
                                                                                                                                                                                                              and LedgerCompanyCodeCrcyRole.Ledger      = Values.Ledger

  //  as select from           I_LedgerCompanyCodeCrcyRoles                                                                                                                                    as LedgerCompanyCodeCrcyRole

  //    inner join             P_FixedAssetValueForToFsclPerd(P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet, P_FiscalYear: :P_FiscalYear, P_ToFiscalPeriod: :P_ToFiscalPeriod) as Values                    on  Values.CompanyCode = LedgerCompanyCodeCrcyRole.CompanyCode

  //                                                                                                                                                                                                                        and Values.Ledger      = LedgerCompanyCodeCrcyRole.Ledger

  //    left outer to one join I_DepreciationAreaForLedger                                                                                                                                     as DepreciationAreaForLedger on  DepreciationAreaForLedger.CompanyCode           = Values.CompanyCode

  //                                                                                                                                                                                                                        and DepreciationAreaForLedger.Ledger                = Values.Ledger

  //                                                                                                                                                                                                                        and DepreciationAreaForLedger.AssetDepreciationArea = Values.AssetDepreciationArea

  //    left outer to one join I_AssetValuationView                                                                                                                                            as AssetValuationView        on AssetValuationView.AssetValuationView = DepreciationAreaForLedger.AssetValuationView


  //Associations to Core views

  association [0..1] to I_AssetKeyFigureSet            as _AssetKeyFigureSet           on  $projection.AssetAccountingKeyFigureSet = _AssetKeyFigureSet.AssetAccountingKeyFigureSet
  association [1]    to I_AssetSortedKeyFigureSetSpec  as _AssetSortedKeyFigureSetSpec on  $projection.AssetAccountingKeyFigureSet    = _AssetSortedKeyFigureSetSpec.AssetAccountingKeyFigureSet
                                                                                       and $projection.AssetAccountingSortedKeyFigure = _AssetSortedKeyFigureSetSpec.AssetAccountingSortedKeyFigure
  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_RealDepreciationAreaByCoCode as _AssetDepreciationArea       on  $projection.CompanyCode           = _AssetDepreciationArea.CompanyCode
                                                                                       and $projection.AssetDepreciationArea = _AssetDepreciationArea.AssetRealDepreciationArea
  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_MasterFixedAsset             as _PartnerMasterFixedAsset     on  $projection.CompanyCode             = _PartnerMasterFixedAsset.CompanyCode
                                                                                       and $projection.PartnerMasterFixedAsset = _PartnerMasterFixedAsset.MasterFixedAsset
  association [0..1] to I_FixedAsset                   as _PartnerFixedAsset           on  $projection.CompanyCode             = _PartnerFixedAsset.CompanyCode
                                                                                       and $projection.PartnerMasterFixedAsset = _PartnerFixedAsset.MasterFixedAsset
                                                                                       and $projection.PartnerFixedAsset       = _PartnerFixedAsset.FixedAsset
  association [0..1] to I_JournalEntry                 as _JournalEntry                on  $projection.CompanyCode        = _JournalEntry.CompanyCode
                                                                                       and $projection.FiscalYear         = _JournalEntry.FiscalYear
                                                                                       and $projection.AccountingDocument = _JournalEntry.AccountingDocument
  association [1]    to I_DebitCreditCode              as _DebitCreditCode             on  $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
  association [0..1] to I_Ledger                       as _Ledger                      on  $projection.Ledger = _Ledger.Ledger
  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_FiscalYearPeriodForLedger    as _FiscalYearPeriod            on  $projection.CompanyCode  = _FiscalYearPeriod.CompanyCode
                                                                                       and $projection.Ledger       = _FiscalYearPeriod.Ledger
                                                                                       and $projection.FiscalYear   = _FiscalYearPeriod.FiscalYear
                                                                                       and $projection.FiscalPeriod = _FiscalYearPeriod.FiscalPeriod
  association [1]    to I_ChartOfAccounts              as _ChartOfAccounts             on  $projection.chartofaccounts = _ChartOfAccounts.ChartOfAccounts
  association [0..1] to I_GLAccountInChartOfAccounts   as _GLAccountInChartOfAccounts  on  $projection.chartofaccounts = _GLAccountInChartOfAccounts.ChartOfAccounts
                                                                                       and $projection.GLAccount       = _GLAccountInChartOfAccounts.GLAccount
  association [0..1] to I_GLAccountInChartOfAccounts   as _AlternativeGLAccount        on  $projection.CountryChartOfAccounts = _AlternativeGLAccount.ChartOfAccounts
                                                                                       and $projection.AlternativeGLAccount   = _AlternativeGLAccount.GLAccount
  association [0..1] to I_SubLedgerAccLineItemType     as _SubLedgerAccLineItemType    on  $projection.SubLedgerAcctLineItemType = _SubLedgerAccLineItemType.SubLedgerAcctLineItemType
  association [0..1] to I_MovementCategory             as _AssetAcctTransClassfctn     on  $projection.AssetAcctTransClassfctn = _AssetAcctTransClassfctn.AssetAcctTransClassfctn
  association [0..1] to I_AssetKeyFigure               as _AssetKeyFigure              on  $projection.AssetAccountingKeyFigure = _AssetKeyFigure.AssetAccountingKeyFigure
  association [0..1] to I_LedgerGroup                  as _LedgerGroup                 on  $projection.LedgerGroup = _LedgerGroup.LedgerGroup
  association [0..1] to I_FinancialAccountType         as _FinancialAccountType        on  $projection.FinancialAccountType = _FinancialAccountType.FinancialAccountType
  association [0..1] to I_ChartOfDepreciation          as _ChartOfDepreciation         on  $projection.ChartOfDepreciation = _ChartOfDepreciation.ChartOfDepreciation
  association [0..1] to I_FinancialStatementVersion    as _FinancialStatementVersion   on  $projection.financialstatementvariant = _FinancialStatementVersion.FinancialStatementVariant
  association [0..1] to I_AccountingPrinciple          as _AccountingPrinciple         on  $projection.AccountingPrinciple = _AccountingPrinciple.AccountingPrinciple
  association [0..*] to I_CostCenter                   as _CostCenter                  on  $projection.CostCenter      = _CostCenter.CostCenter
                                                                                       and $projection.controllingarea = _CostCenter.ControllingArea
  association [0..1] to I_Plant                        as _Plant                       on  $projection.Plant = _Plant.Plant
  association [0..1] to I_BusinessArea                 as _BusinessArea                on  $projection.BusinessArea = _BusinessArea.BusinessArea
  association [0..*] to I_ProfitCenter                 as _ProfitCenter                on  $projection.ProfitCenter    = _ProfitCenter.ProfitCenter
                                                                                       and $projection.controllingarea = _ProfitCenter.ControllingArea
  association [0..1] to I_Segment                      as _Segment                     on  $projection.Segment = _Segment.Segment
  association [0..1] to I_FunctionalArea               as _FunctionalArea              on  $projection.FunctionalArea = _FunctionalArea.FunctionalArea
  association [0..1] to I_AssetTransactionType         as _AssetTransactionType        on  $projection.AssetTransactionType = _AssetTransactionType.AssetTransactionType

  association [0..1] to I_AssetClass                   as _AssetClass                  on  $projection.assetclass = _AssetClass.AssetClass
  association [0..1] to I_AssetAcctDetermination       as _AssetAccountDetermination   on  $projection.assetaccountdetermination = _AssetAccountDetermination.AssetAccountDetermination

  association [0..1] to I_FiscalYearVariant            as _FiscalYearVariant           on  $projection.FiscalYearVariant = _FiscalYearVariant.FiscalYearVariant
  association [0..1] to I_ChartOfAccounts              as _CountryChartOfAccounts      on  $projection.CountryChartOfAccounts = _CountryChartOfAccounts.ChartOfAccounts
  association [0..1] to I_ControllingArea              as _ControllingArea             on  $projection.controllingarea = _ControllingArea.ControllingArea
  association [0..1] to I_Country                      as _Country                     on  $projection.country = _Country.Country

  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

  association [0..1] to I_UnitOfMeasure                as _UnitOfMeasure               on  $projection.BaseUnit = _UnitOfMeasure.UnitOfMeasure

  association [0..1] to I_FiscalYearForVariant         as _LedgerFiscalYearForVariant  on  $projection.LedgerFiscalYear  = _LedgerFiscalYearForVariant.FiscalYear
                                                                                       and $projection.FiscalYearVariant = _LedgerFiscalYearForVariant.FiscalYearVariant
  association [0..1] to I_FiscalYearPeriodForVariant   as _FiscalYearPeriodForVariant  on  $projection.FiscalYearPeriod  = _FiscalYearPeriodForVariant.FiscalYearPeriod
                                                                                       and $projection.FiscalYearVariant = _FiscalYearPeriodForVariant.FiscalYearVariant
  association [0..1] to I_FiscalPeriodForVariant       as _FiscalPeriodForVariant      on  $projection.LedgerFiscalYear  = _FiscalPeriodForVariant.FiscalYear
                                                                                       and $projection.FiscalPeriod      = _FiscalPeriodForVariant.FiscalPeriod
                                                                                       and $projection.FiscalYearVariant = _FiscalPeriodForVariant.FiscalYearVariant
  association [0..1] to I_AccountingDocumentType       as _AccountingDocumentType      on  $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
  association [0..1] to I_FixedAssetNatlClfn           as _FixedAssetNatlClfn          on  $projection.country                = _FixedAssetNatlClfn.Country
                                                                                       and $projection.nationalclassification = _FixedAssetNatlClfn.NationalClassification
  association [0..1] to I_TaxDepreciationGroup         as _TaxDepreciationGroup        on  $projection.country              = _TaxDepreciationGroup.Country
                                                                                       and $projection.taxdepreciationgroup = _TaxDepreciationGroup.TaxDepreciationGroup
  association [0..1] to I_FixedAssetCountryData        as _FixedAssetCountryData       on  $projection.CompanyCode      = _FixedAssetCountryData.CompanyCode
                                                                                       and $projection.MasterFixedAsset = _FixedAssetCountryData.MasterFixedAsset
                                                                                       and $projection.FixedAsset       = _FixedAssetCountryData.FixedAsset
  association [0..1] to I_FixedAssetForLedger          as _FixedAssetForLedger         on  _FixedAssetForLedger.CompanyCode      = $projection.CompanyCode
                                                                                       and _FixedAssetForLedger.MasterFixedAsset = $projection.MasterFixedAsset
                                                                                       and _FixedAssetForLedger.FixedAsset       = $projection.FixedAsset
                                                                                       and _FixedAssetForLedger.Ledger           = $projection.Ledger
  association [0..1] to I_Supplier                     as _Supplier                    on  $projection.Supplier = _Supplier.Supplier
  association [0..1] to I_FinancialManagementArea      as _FinancialManagementArea     on  $projection.FinancialManagementArea = _FinancialManagementArea.FinancialManagementArea
  association [0..1] to I_Fund                         as _Fund                        on  $projection.FinancialManagementArea = _Fund.FinancialManagementArea
                                                                                       and $projection.Fund                    = _Fund.Fund
  association [0..1] to I_BudgetPeriod                 as _BudgetPeriod                on  $projection.BudgetPeriod = _BudgetPeriod.BudgetPeriod
  association [0..1] to I_WBSElementByExternalID       as _WBSElement                  on  $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
{

      @ObjectModel.foreignKey.association: '_CompanyCode'
  key Values.CompanyCode,
      @ObjectModel.foreignKey.association: '_DepreciationArea'
  key Values.AssetDepreciationArea,
      @ObjectModel.foreignKey.association: '_MasterFixedAsset'
  key Values.MasterFixedAsset,
      @ObjectModel.foreignKey.association: '_FixedAsset'
  key Values.FixedAsset,
      @ObjectModel.foreignKey.association: '_JournalEntry'
  key Values.AccountingDocument,
  key Values.TransactionSubitem,
      @ObjectModel.foreignKey.association: '_Ledger'
  key Values.Ledger,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key Values.FiscalYear,
      //@ObjectModel.foreignKey.association: '_FiscalPeriod'

      @ObjectModel.foreignKey.association: '_FiscalPeriodForVariant'
  key Values.FiscalPeriod,
      @ObjectModel.foreignKey.association: '_SubledgerAccLineItemType'
  key Values.SubLedgerAcctLineItemType,
      @ObjectModel.foreignKey.association: '_AssetAcctTransClassfctn'
  key Values.AssetAcctTransClassfctn,
      @ObjectModel.foreignKey.association: '_AssetKeyFigureSet'
  key :P_AssetAccountingKeyFigureSet                           as AssetAccountingKeyFigureSet,
      @ObjectModel.foreignKey.association: '_AssetKeyFigure'
  key Values.AssetAccountingKeyFigure,
      @ObjectModel.foreignKey.association: '_DebitCreditCode'
  key Values.DebitCreditCode,

      @ObjectModel.foreignKey.association: '_LedgerFiscalYearForVariant'
      @Semantics.fiscal.year: true
      LedgerFiscalYear,
      @ObjectModel.foreignKey.association: '_FiscalYearVariant'
      @Semantics.fiscal.yearVariant: true
      LedgerCompanyCodeCrcyRole.FiscalYearVariant,
      @ObjectModel.foreignKey.association: '_FiscalYearPeriodForVariant'
      @Semantics.fiscal.yearPeriod: true
      FiscalYearPeriod,
      DepreciationFiscalPeriod,

      @ObjectModel.foreignKey.association: '_AssetSortedKeyFigureSetSpec'
      Values.AssetAccountingSortedKeyFigure,
      Values.PlannedValueIsInclusive,

      @ObjectModel.foreignKey.association: '_LedgerGroup'
      Values.LedgerGroup,

      @ObjectModel.foreignKey.association: '_Country'
      _CompanyCode.Country,
      @ObjectModel.foreignKey.association: '_CountryChartOfAccounts'
      Values.CountryChartOfAccounts,
      @ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
      Values.GLAccount,
      @ObjectModel.foreignKey.association: '_AlternativeGLAccount'
      Values.AlternativeGLAccount,

      Values.GroupMasterFixedAsset,
      Values.GroupFixedAsset,
      @ObjectModel.foreignKey.association: '_FinancialAccountType'
      Values.FinancialAccountType,
      @Semantics.businessDate.at: true
      Values.AccountingDocumentCreationDate,
      Values.CreationTime,
      Values.AccountingDocCreatedByUser,
      Values.JointVentureCostRecoveryCode,
      @ObjectModel.foreignKey.association: '_ChartOfDepreciation'
      Values.ChartOfDepreciation,
      @ObjectModel.foreignKey.association: '_FinancialStatementVersion'
      _AssetDepreciationArea.FinancialStatementVariant,

      @ObjectModel.foreignKey.association: '_AccountingPrinciple'
      LedgerCompanyCodeCrcyRole.AccountingPrinciple,

      @ObjectModel.foreignKey.association: '_CostCenter'
      Values.CostCenter,
      @ObjectModel.foreignKey.association: '_Plant'
      Values.Plant,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      Values.BusinessArea,
      Values.PersonnelNumber,
      @ObjectModel.foreignKey.association: '_FinancialManagementArea'
      Values.FinancialManagementArea,
      @ObjectModel.foreignKey.association: '_Fund'
      Values.Fund,
      Values.GrantID,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      Values.FunctionalArea,
      @ObjectModel.foreignKey.association: '_BudgetPeriod'
      Values.BudgetPeriod,
      @ObjectModel.foreignKey.association: '_ProfitCenter'
      Values.ProfitCenter,
      @ObjectModel.foreignKey.association: '_Segment'
      Values.Segment,
      Values.FundsCenter,
      @ObjectModel.foreignKey.association: '_AssetTransactionType'
      Values.AssetTransactionType,
      @ObjectModel.foreignKey.association: '_AccountingDocumentType'
      Values.AccountingDocumentType,

      Values.ReferenceDocumentItem,
      Values.ReferenceDocumentType,
      Values.LogicalSystem,
      Values.ReferenceDocument,
      Values.ReferenceDocumentContext,
      Values.ReversalReferenceDocument,
      Values.ReversalReferenceDocumentCntxt,
      Values.ReversalTransactionSubitem,
      Values.IsReversal,
      Values.IsReversed,
      Values.DocumentDate,
      Values.PostingDate,
      Values.AssetValueDate,
      Values.AssignmentReference,
      Values.DocumentItemText,
      Values.IsStatisticalDocument,
      Values.GLBusinessTransactionType,

      // Fields added from Association _CompanyCode

      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      _CompanyCode.ChartOfAccounts, //required for Association to _GLAccountInChartOfAccounts

      @ObjectModel.foreignKey.association: '_ControllingArea'
      _CompanyCode.ControllingArea, // required for Association to _CostCenter

      //      @ObjectModel.foreignKey.association: '_FiscalYearVariant'

      //      _CompanyCode.FiscalYearVariant,


      @ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
      @Semantics.currencyCode: true
      Values.CompanyCodeCurrency,

      @ObjectModel.foreignKey.association: '_CompanyCodeCurrencyRole'
      LedgerCompanyCodeCrcyRole.CompanyCodeCurrencyRole,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInCompanyCodeCrcy + Values.ActualAmountInCompanyCodeCrcy
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInCompanyCodeCrcy
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInCompanyCodeCrcy
           else Values.ActualAmountInCompanyCodeCrcy       end as AmountInCompanyCodeCurrency,

      @ObjectModel.foreignKey.association: '_GlobalCurrency'
      @Semantics.currencyCode: true
      Values.GlobalCurrency,

      @ObjectModel.foreignKey.association: '_GlobalCurrencyRole'
      LedgerCompanyCodeCrcyRole.GlobalCurrencyRole,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInGlobalCurrency + Values.ActualAmountInGlobalCurrency
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInGlobalCurrency
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInGlobalCurrency
           else Values.ActualAmountInGlobalCurrency    end     as AmountInGlobalCurrency,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency1'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency1,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency1Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency1Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy1 + Values.ActualAmountInFreeDfndCrcy1
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy1
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy1
           else Values.ActualAmountInFreeDfndCrcy1    end      as AmountInFreeDefinedCurrency1,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency2'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency2,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency2Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency2Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy2 + Values.ActualAmountInFreeDfndCrcy2
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy2
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy2
           else Values.ActualAmountInFreeDfndCrcy2    end      as AmountInFreeDefinedCurrency2,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency3'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency3,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency3Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency3Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy3 + Values.ActualAmountInFreeDfndCrcy3
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy3
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy3
           else Values.ActualAmountInFreeDfndCrcy3    end      as AmountInFreeDefinedCurrency3,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency4'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency4,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency4Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency4Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy4 + Values.ActualAmountInFreeDfndCrcy4
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy4
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy4
           else Values.ActualAmountInFreeDfndCrcy4    end      as AmountInFreeDefinedCurrency4,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency5'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency5,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency5Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency5Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy5 + Values.ActualAmountInFreeDfndCrcy5
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy5
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy5
           else Values.ActualAmountInFreeDfndCrcy5    end      as AmountInFreeDefinedCurrency5,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency6'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency6,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency6Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency6Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy6 + Values.ActualAmountInFreeDfndCrcy6
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy6
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy6
           else Values.ActualAmountInFreeDfndCrcy6    end      as AmountInFreeDefinedCurrency6,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency7'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency7,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency7Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency7Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy7 + Values.ActualAmountInFreeDfndCrcy7
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy7
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy7
           else Values.ActualAmountInFreeDfndCrcy7    end      as AmountInFreeDefinedCurrency7,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency8'
      @Semantics.currencyCode: true
      Values.FreeDefinedCurrency8,

      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency8Role'
      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency8Role,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy8  + Values.ActualAmountInFreeDfndCrcy8
           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy8
           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '')  then Values.PlanAmountInFreeDefinedCrcy8
           else Values.ActualAmountInFreeDfndCrcy8    end      as AmountInFreeDefinedCurrency8,

      @ObjectModel.foreignKey.association: '_UnitOfMeasure'
      @Semantics.unitOfMeasure:true
      BaseUnit,
      @DefaultAggregation: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }
      Quantity,

      /* Fields from ANLA */
      @ObjectModel.foreignKey.association: '_AssetAccountDetermination'
      _FixedAsset.AssetAccountDetermination,
      @ObjectModel.foreignKey.association: '_AssetClass'
      _FixedAsset.AssetClass,
      @ObjectModel.foreignKey.association: '_FixedAssetGroup'
      _FixedAsset.FixedAssetGroup,
      _FixedAsset.AssetSupplierName,
      @ObjectModel.foreignKey.association: '_InvestmentOrder'
      _FixedAsset.InvestmentOrder,
      _FixedAsset.InventoryIsCounted,
      _FixedAsset.LastInventoryDate,
      _FixedAsset.Inventory,
      @ObjectModel.foreignKey.association: '_Group1AssetEvaluationKey'
      _FixedAsset.Group1AssetEvaluationKey,
      @ObjectModel.foreignKey.association: '_Group2AssetEvaluationKey'
      _FixedAsset.Group2AssetEvaluationKey,
      @ObjectModel.foreignKey.association: '_Group3AssetEvaluationKey'
      _FixedAsset.Group3AssetEvaluationKey,
      @ObjectModel.foreignKey.association: '_Group4AssetEvaluationKey'
      _FixedAsset.Group4AssetEvaluationKey,
      @ObjectModel.foreignKey.association: '_Group5AssetEvaluationKey'
      _FixedAsset.Group5AssetEvaluationKey,
      _FixedAsset.AssetSerialNumber,
      @ObjectModel.foreignKey.association: '_Supplier'
      _FixedAsset.Supplier                                     as Supplier,


      /* Dedicated properties which moved with the redesign of the asset master from ANLA to FAAT_MD_LD */
      /* -> I_FixedAssetForLedger selects based on the business function from the correct table         */
      _FixedAssetForLedger.AssetCapitalizationDate,
      _FixedAssetForLedger.AssetDeactivationDate,
      _FixedAssetForLedger.FirstAcquisitionFiscalYear,
      _FixedAssetForLedger.FirstAcquisitionFiscalPeriod,

      @ObjectModel.foreignKey.association: '_FixedAssetNatlClfn'
      _FixedAssetCountryData.NationalClassification,
      @ObjectModel.foreignKey.association: '_TaxDepreciationGroup'
      _FixedAssetCountryData.TaxDepreciationGroup,

      @ObjectModel.foreignKey.association: '_PartnerMasterFixedAsset'
      Values.PartnerMasterFixedAsset,
      @ObjectModel.foreignKey.association: '_PartnerFixedAsset'
      Values.PartnerFixedAsset,

      //WBS Element

      @Consumption.hidden: true
      _FixedAsset.InvestmentProjectWBSElement                  as WBSElementInternalID,

      //Publish Associations

      _CompanyCode,
      _ControllingArea,
      _Country,
      _CountryChartOfAccounts,
      _FiscalYearVariant,
      _DepreciationArea,
      _MasterFixedAsset,
      _FixedAsset,
      _Ledger,
      _JournalEntry,
      _DebitCreditCode,
      _FiscalYear,
      _FiscalPeriod,
      _FiscalYearPeriod,
      _SubLedgerAccLineItemType,
      _ChartOfAccounts,
      _GLAccountInChartOfAccounts,
      _AlternativeGLAccount,
      _LedgerGroup,
      _AssetAcctTransClassfctn,
      _TaxDepreciationGroup,
      _FinancialAccountType,
      _ChartOfDepreciation,
      _FinancialStatementVersion,
      _AccountingPrinciple,
      _CostCenter,
      _Plant,
      _BusinessArea,
      _ProfitCenter,
      _Segment,
      _FunctionalArea,
      _AssetTransactionType,
      _AssetKeyFigureSet,
      _AssetKeyFigure,
      _AssetSortedKeyFigureSetSpec,
      _AssetClass,
      _AssetAccountDetermination,
      _CompanyCodeCurrency,
      _GlobalCurrency,
      _FreeDefinedCurrency1,
      _FreeDefinedCurrency2,
      _FreeDefinedCurrency3,
      _FreeDefinedCurrency4,
      _FreeDefinedCurrency5,
      _FreeDefinedCurrency6,
      _FreeDefinedCurrency7,
      _FreeDefinedCurrency8,
      _CompanyCodeCurrencyRole,
      _GlobalCurrencyRole,
      _FreeDefinedCurrency1Role,
      _FreeDefinedCurrency2Role,
      _FreeDefinedCurrency3Role,
      _FreeDefinedCurrency4Role,
      _FreeDefinedCurrency5Role,
      _FreeDefinedCurrency6Role,
      _FreeDefinedCurrency7Role,
      _FreeDefinedCurrency8Role,
      _UnitOfMeasure,
      _FixedAsset._FixedAssetGroup,
      _FixedAsset._InvestmentOrder,
      _FixedAsset._Group1AssetEvaluationKey,
      _FixedAsset._Group2AssetEvaluationKey,
      _FixedAsset._Group3AssetEvaluationKey,
      _FixedAsset._Group4AssetEvaluationKey,
      _FixedAsset._Group5AssetEvaluationKey,
      _LedgerFiscalYearForVariant,
      _FiscalYearPeriodForVariant,
      _FiscalPeriodForVariant,
      _AccountingDocumentType,
      _FixedAssetCountryData,
      _FixedAssetNatlClfn,
      _Supplier,
      _FinancialManagementArea,
      _Fund,
      _BudgetPeriod,
      _PartnerMasterFixedAsset,
      _PartnerFixedAsset,
      _WBSElement
}
//where

//     AssetValuationView.AssetValuationViewType is null

//  or AssetValuationView.AssetValuationViewType <> 'C01' //No "Calculated Valuation"

//

////Take derived areas into account

//union all select from I_LedgerCompanyCodeCrcyRoles                                                                                                                                    as LedgerCompanyCodeCrcyRole

//  inner join          I_DepreciationAreaForLedger                                                                                                                                     as CalculatedDeprAreaForLedger  on  CalculatedDeprAreaForLedger.CompanyCode = LedgerCompanyCodeCrcyRole.CompanyCode

//                                                                                                                                                                                                                      and CalculatedDeprAreaForLedger.Ledger      = LedgerCompanyCodeCrcyRole.Ledger

//  inner join          I_AssetValuationView                                                                                                                                            as AssetValuationView           on AssetValuationView.AssetValuationView = CalculatedDeprAreaForLedger.AssetValuationView

//  inner join          I_CalculatedAssetValuationView                                                                                                                                  as CalculatedAssetValuationView on  CalculatedAssetValuationView.CalculatedAssetValuationView = CalculatedDeprAreaForLedger.AssetValuationView

//                                                                                                                                                                                                                      and CalculatedAssetValuationView.AccountingPrinciple          = LedgerCompanyCodeCrcyRole.AccountingPrinciple

//  inner join          I_DepreciationAreaForLedger                                                                                                                                     as SourceDeprAreaForLedger      on  SourceDeprAreaForLedger.CompanyCode        = LedgerCompanyCodeCrcyRole.CompanyCode

//                                                                                                                                                                                                                      and SourceDeprAreaForLedger.Ledger             = LedgerCompanyCodeCrcyRole.Ledger

//                                                                                                                                                                                                                      and SourceDeprAreaForLedger.AssetValuationView = CalculatedAssetValuationView.SourceAssetValuationView

//  inner join          P_FixedAssetValueForToFsclPerd(P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet, P_FiscalYear: :P_FiscalYear, P_ToFiscalPeriod: :P_ToFiscalPeriod) as Values                       on  Values.CompanyCode           = LedgerCompanyCodeCrcyRole.CompanyCode

//                                                                                                                                                                                                                      and Values.Ledger                = LedgerCompanyCodeCrcyRole.Ledger

//                                                                                                                                                                                                                      and Values.AssetDepreciationArea = SourceDeprAreaForLedger.AssetDepreciationArea

//

////Associations to Core views

//association [0..1] to I_AssetKeyFigureSet            as _AssetKeyFigureSet           on  $projection.AssetAccountingKeyFigureSet = _AssetKeyFigureSet.AssetAccountingKeyFigureSet

//association [1]    to I_AssetSortedKeyFigureSetSpec  as _AssetSortedKeyFigureSetSpec on  $projection.AssetAccountingKeyFigureSet    = _AssetSortedKeyFigureSetSpec.AssetAccountingKeyFigureSet

//                                                                                     and $projection.AssetAccountingSortedKeyFigure = _AssetSortedKeyFigureSetSpec.AssetAccountingSortedKeyFigure

//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_RealDepreciationAreaByCoCode as _AssetDepreciationArea       on  $projection.CompanyCode           = _AssetDepreciationArea.CompanyCode

//                                                                                     and $projection.AssetDepreciationArea = _AssetDepreciationArea.AssetRealDepreciationArea

//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_MasterFixedAsset             as _PartnerMasterFixedAsset     on  $projection.CompanyCode             = _PartnerMasterFixedAsset.CompanyCode

//                                                                                     and $projection.PartnerMasterFixedAsset = _PartnerMasterFixedAsset.MasterFixedAsset

//association [0..1] to I_FixedAsset                   as _PartnerFixedAsset           on  $projection.CompanyCode             = _PartnerFixedAsset.CompanyCode

//                                                                                     and $projection.PartnerMasterFixedAsset = _PartnerFixedAsset.MasterFixedAsset

//                                                                                     and $projection.PartnerFixedAsset       = _PartnerFixedAsset.FixedAsset

//association [0..1] to I_JournalEntry                 as _JournalEntry                on  $projection.CompanyCode        = _JournalEntry.CompanyCode

//                                                                                     and $projection.FiscalYear         = _JournalEntry.FiscalYear

//                                                                                     and $projection.AccountingDocument = _JournalEntry.AccountingDocument

//association [1]    to I_DebitCreditCode              as _DebitCreditCode             on  $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode

//association [0..1] to I_Ledger                       as _Ledger                      on  $projection.Ledger = _Ledger.Ledger

//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_FiscalYearPeriodForLedger    as _FiscalYearPeriod            on  $projection.CompanyCode  = _FiscalYearPeriod.CompanyCode

//                                                                                     and $projection.Ledger       = _FiscalYearPeriod.Ledger

//                                                                                     and $projection.FiscalYear   = _FiscalYearPeriod.FiscalYear

//                                                                                     and $projection.FiscalPeriod = _FiscalYearPeriod.FiscalPeriod

//association [1]    to I_ChartOfAccounts              as _ChartOfAccounts             on  $projection.chartofaccounts = _ChartOfAccounts.ChartOfAccounts

//association [0..1] to I_GLAccountInChartOfAccounts   as _GLAccountInChartOfAccounts  on  $projection.chartofaccounts = _GLAccountInChartOfAccounts.ChartOfAccounts

//                                                                                     and $projection.GLAccount       = _GLAccountInChartOfAccounts.GLAccount

//association [0..1] to I_GLAccountInChartOfAccounts   as _AlternativeGLAccount        on  $projection.CountryChartOfAccounts = _AlternativeGLAccount.ChartOfAccounts

//                                                                                     and $projection.AlternativeGLAccount   = _AlternativeGLAccount.GLAccount

//association [0..1] to I_SubLedgerAccLineItemType     as _SubLedgerAccLineItemType    on  $projection.SubLedgerAcctLineItemType = _SubLedgerAccLineItemType.SubLedgerAcctLineItemType

//association [0..1] to I_MovementCategory             as _AssetAcctTransClassfctn     on  $projection.AssetAcctTransClassfctn = _AssetAcctTransClassfctn.AssetAcctTransClassfctn

//association [0..1] to I_AssetKeyFigure               as _AssetKeyFigure              on  $projection.AssetAccountingKeyFigure = _AssetKeyFigure.AssetAccountingKeyFigure

//association [0..1] to I_LedgerGroup                  as _LedgerGroup                 on  $projection.LedgerGroup = _LedgerGroup.LedgerGroup

//association [0..1] to I_FinancialAccountType         as _FinancialAccountType        on  $projection.FinancialAccountType = _FinancialAccountType.FinancialAccountType

//association [0..1] to I_ChartOfDepreciation          as _ChartOfDepreciation         on  $projection.ChartOfDepreciation = _ChartOfDepreciation.ChartOfDepreciation

//association [0..1] to I_FinancialStatementVersion    as _FinancialStatementVersion   on  $projection.financialstatementvariant = _FinancialStatementVersion.FinancialStatementVariant

//association [0..1] to I_AccountingPrinciple          as _AccountingPrinciple         on  $projection.AccountingPrinciple = _AccountingPrinciple.AccountingPrinciple

//association [0..*] to I_CostCenter                   as _CostCenter                  on  $projection.CostCenter      = _CostCenter.CostCenter

//                                                                                     and $projection.controllingarea = _CostCenter.ControllingArea

//association [0..1] to I_Plant                        as _Plant                       on  $projection.Plant = _Plant.Plant

//association [0..1] to I_BusinessArea                 as _BusinessArea                on  $projection.BusinessArea = _BusinessArea.BusinessArea

//association [0..*] to I_ProfitCenter                 as _ProfitCenter                on  $projection.ProfitCenter    = _ProfitCenter.ProfitCenter

//                                                                                     and $projection.controllingarea = _ProfitCenter.ControllingArea

//association [0..1] to I_Segment                      as _Segment                     on  $projection.Segment = _Segment.Segment

//association [0..1] to I_FunctionalArea               as _FunctionalArea              on  $projection.FunctionalArea = _FunctionalArea.FunctionalArea

//association [0..1] to I_AssetTransactionType         as _AssetTransactionType        on  $projection.AssetTransactionType = _AssetTransactionType.AssetTransactionType

//

//association [0..1] to I_AssetClass                   as _AssetClass                  on  $projection.assetclass = _AssetClass.AssetClass

//association [0..1] to I_AssetAcctDetermination       as _AssetAccountDetermination   on  $projection.assetaccountdetermination = _AssetAccountDetermination.AssetAccountDetermination

//

//association [0..1] to I_FiscalYearVariant            as _FiscalYearVariant           on  $projection.FiscalYearVariant = _FiscalYearVariant.FiscalYearVariant

//association [0..1] to I_ChartOfAccounts              as _CountryChartOfAccounts      on  $projection.CountryChartOfAccounts = _CountryChartOfAccounts.ChartOfAccounts

//association [0..1] to I_ControllingArea              as _ControllingArea             on  $projection.controllingarea = _ControllingArea.ControllingArea

//association [0..1] to I_Country                      as _Country                     on  $projection.country = _Country.Country

//

//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

//

//association [0..1] to I_UnitOfMeasure                as _UnitOfMeasure               on  $projection.BaseUnit = _UnitOfMeasure.UnitOfMeasure

//

//association [0..1] to I_FiscalYearForVariant         as _LedgerFiscalYearForVariant  on  $projection.LedgerFiscalYear  = _LedgerFiscalYearForVariant.FiscalYear

//                                                                                     and $projection.FiscalYearVariant = _LedgerFiscalYearForVariant.FiscalYearVariant

//association [0..1] to I_FiscalYearPeriodForVariant   as _FiscalYearPeriodForVariant  on  $projection.FiscalYearPeriod  = _FiscalYearPeriodForVariant.FiscalYearPeriod

//                                                                                     and $projection.FiscalYearVariant = _FiscalYearPeriodForVariant.FiscalYearVariant

//association [0..1] to I_FiscalPeriodForVariant       as _FiscalPeriodForVariant      on  $projection.LedgerFiscalYear  = _FiscalPeriodForVariant.FiscalYear

//                                                                                     and $projection.FiscalPeriod      = _FiscalPeriodForVariant.FiscalPeriod

//                                                                                     and $projection.FiscalYearVariant = _FiscalPeriodForVariant.FiscalYearVariant

//association [0..1] to I_AccountingDocumentType       as _AccountingDocumentType      on  $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType

//association [0..1] to I_FixedAssetNatlClfn           as _FixedAssetNatlClfn          on  $projection.country                = _FixedAssetNatlClfn.Country

//                                                                                     and $projection.nationalclassification = _FixedAssetNatlClfn.NationalClassification

//association [0..1] to I_TaxDepreciationGroup         as _TaxDepreciationGroup        on  $projection.country              = _TaxDepreciationGroup.Country

//                                                                                     and $projection.taxdepreciationgroup = _TaxDepreciationGroup.TaxDepreciationGroup

//association [0..1] to I_FixedAssetCountryData        as _FixedAssetCountryData       on  $projection.CompanyCode      = _FixedAssetCountryData.CompanyCode

//                                                                                     and $projection.MasterFixedAsset = _FixedAssetCountryData.MasterFixedAsset

//                                                                                     and $projection.FixedAsset       = _FixedAssetCountryData.FixedAsset

//association [0..1] to I_FixedAssetForLedger          as _FixedAssetForLedger         on  _FixedAssetForLedger.CompanyCode      = $projection.CompanyCode

//                                                                                     and _FixedAssetForLedger.MasterFixedAsset = $projection.MasterFixedAsset

//                                                                                     and _FixedAssetForLedger.FixedAsset       = $projection.FixedAsset

//                                                                                     and _FixedAssetForLedger.Ledger           = $projection.Ledger

//association [0..1] to I_Supplier                     as _Supplier                    on  $projection.Supplier = _Supplier.Supplier

//association [0..1] to I_FinancialManagementArea      as _FinancialManagementArea     on  $projection.FinancialManagementArea = _FinancialManagementArea.FinancialManagementArea

//association [0..1] to I_Fund                         as _Fund                        on  $projection.FinancialManagementArea = _Fund.FinancialManagementArea

//                                                                                     and $projection.Fund                    = _Fund.Fund

//association [0..1] to I_BudgetPeriod                 as _BudgetPeriod                on  $projection.BudgetPeriod = _BudgetPeriod.BudgetPeriod

//association [0..1] to I_WBSElementByExternalID       as _WBSElement                  on  $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID

//{

//

//      @ObjectModel.foreignKey.association: '_CompanyCode'

//  key Values.CompanyCode,

//      @ObjectModel.foreignKey.association: '_DepreciationArea'

//  key CalculatedDeprAreaForLedger.AssetDepreciationArea,

//      @ObjectModel.foreignKey.association: '_MasterFixedAsset'

//  key Values.MasterFixedAsset,

//      @ObjectModel.foreignKey.association: '_FixedAsset'

//  key Values.FixedAsset,

//      @ObjectModel.foreignKey.association: '_JournalEntry'

//  key Values.AccountingDocument,

//  key Values.TransactionSubitem,

//      @ObjectModel.foreignKey.association: '_Ledger'

//  key Values.Ledger,

//      @ObjectModel.foreignKey.association: '_FiscalYear'

//  key Values.FiscalYear,

//      //@ObjectModel.foreignKey.association: '_FiscalPeriod'

//      @ObjectModel.foreignKey.association: '_FiscalPeriodForVariant'

//  key Values.FiscalPeriod,

//      @ObjectModel.foreignKey.association: '_SubledgerAccLineItemType'

//  key Values.SubLedgerAcctLineItemType,

//      @ObjectModel.foreignKey.association: '_AssetAcctTransClassfctn'

//  key Values.AssetAcctTransClassfctn,

//      @ObjectModel.foreignKey.association: '_AssetKeyFigureSet'

//  key :P_AssetAccountingKeyFigureSet                           as AssetAccountingKeyFigureSet,

//      @ObjectModel.foreignKey.association: '_AssetKeyFigure'

//  key Values.AssetAccountingKeyFigure,

//      @ObjectModel.foreignKey.association: '_DebitCreditCode'

//  key Values.DebitCreditCode,

//

//      @ObjectModel.foreignKey.association: '_LedgerFiscalYearForVariant'

//      @Semantics.fiscal.year: true

//      LedgerFiscalYear,

//      @ObjectModel.foreignKey.association: '_FiscalYearVariant'

//      @Semantics.fiscal.yearVariant: true

//      LedgerCompanyCodeCrcyRole.FiscalYearVariant,

//      @ObjectModel.foreignKey.association: '_FiscalYearPeriodForVariant'

//      @Semantics.fiscal.yearPeriod: true

//      FiscalYearPeriod,

//      DepreciationFiscalPeriod,

//

//      @ObjectModel.foreignKey.association: '_AssetSortedKeyFigureSetSpec'

//      Values.AssetAccountingSortedKeyFigure,

//      Values.PlannedValueIsInclusive,

//

//      @ObjectModel.foreignKey.association: '_LedgerGroup'

//      Values.LedgerGroup,

//

//      @ObjectModel.foreignKey.association: '_Country'

//      _CompanyCode.Country,

//      @ObjectModel.foreignKey.association: '_CountryChartOfAccounts'

//      Values.CountryChartOfAccounts,

//      @ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'

//      Values.GLAccount,

//      @ObjectModel.foreignKey.association: '_AlternativeGLAccount'

//      Values.AlternativeGLAccount,

//

//      Values.GroupMasterFixedAsset,

//      Values.GroupFixedAsset,

//      @ObjectModel.foreignKey.association: '_FinancialAccountType'

//      Values.FinancialAccountType,

//      @Semantics.businessDate.at: true

//      Values.AccountingDocumentCreationDate,

//      Values.CreationTime,

//      Values.AccountingDocCreatedByUser,

//      Values.JointVentureCostRecoveryCode,

//      @ObjectModel.foreignKey.association: '_ChartOfDepreciation'

//      Values.ChartOfDepreciation,

//      @ObjectModel.foreignKey.association: '_FinancialStatementVersion'

//      _AssetDepreciationArea.FinancialStatementVariant,

//

//      @ObjectModel.foreignKey.association: '_AccountingPrinciple'

//      LedgerCompanyCodeCrcyRole.AccountingPrinciple,

//

//      @ObjectModel.foreignKey.association: '_CostCenter'

//      Values.CostCenter,

//      @ObjectModel.foreignKey.association: '_Plant'

//      Values.Plant,

//      @ObjectModel.foreignKey.association: '_BusinessArea'

//      Values.BusinessArea,

//      Values.PersonnelNumber,

//      @ObjectModel.foreignKey.association: '_FinancialManagementArea'

//      Values.FinancialManagementArea,

//      @ObjectModel.foreignKey.association: '_Fund'

//      Values.Fund,

//      Values.GrantID,

//      @ObjectModel.foreignKey.association: '_FunctionalArea'

//      Values.FunctionalArea,

//      @ObjectModel.foreignKey.association: '_BudgetPeriod'

//      Values.BudgetPeriod,

//      @ObjectModel.foreignKey.association: '_ProfitCenter'

//      Values.ProfitCenter,

//      @ObjectModel.foreignKey.association: '_Segment'

//      Values.Segment,

//      Values.FundsCenter,

//      @ObjectModel.foreignKey.association: '_AssetTransactionType'

//      Values.AssetTransactionType,

//      @ObjectModel.foreignKey.association: '_AccountingDocumentType'

//      Values.AccountingDocumentType,

//

//      Values.ReferenceDocumentItem,

//      Values.ReferenceDocumentType,

//      Values.LogicalSystem,

//      Values.ReferenceDocument,

//      Values.ReferenceDocumentContext,

//      Values.ReversalReferenceDocument,

//      Values.ReversalReferenceDocumentCntxt,

//      Values.ReversalTransactionSubitem,

//      Values.IsReversal,

//      Values.IsReversed,

//      Values.DocumentDate,

//      Values.PostingDate,

//      Values.AssetValueDate,

//      Values.AssignmentReference,

//      Values.DocumentItemText,

//      Values.IsStatisticalDocument,

//      Values.GLBusinessTransactionType,

//

//      // Fields added from Association _CompanyCode

//      @ObjectModel.foreignKey.association: '_ChartOfAccounts'

//      _CompanyCode.ChartOfAccounts, //required for Association to _GLAccountInChartOfAccounts

//      @ObjectModel.foreignKey.association: '_ControllingArea'

//      _CompanyCode.ControllingArea, // required for Association to _CostCenter

//      //      @ObjectModel.foreignKey.association: '_FiscalYearVariant'

//      //      _CompanyCode.FiscalYearVariant,

//

//      @ObjectModel.foreignKey.association: '_CompanyCodeCurrency'

//      @Semantics.currencyCode: true

//      Values.CompanyCodeCurrency,

//

//      @ObjectModel.foreignKey.association: '_CompanyCodeCurrencyRole'

//      LedgerCompanyCodeCrcyRole.CompanyCodeCurrencyRole,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInCompanyCodeCrcy + Values.ActualAmountInCompanyCodeCrcy

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInCompanyCodeCrcy

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInCompanyCodeCrcy

////           else Values.ActualAmountInCompanyCodeCrcy       end as AmountInCompanyCodeCurrency,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInCompanyCodeCrcy + Values.ActualAmountInCompanyCodeCrcy

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInCompanyCodeCrcy

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInCompanyCodeCrcy

//                else Values.ActualAmountInCompanyCodeCrcy end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInCompanyCodeCrcy * -1 + Values.ActualAmountInCompanyCodeCrcy * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInCompanyCodeCrcy * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInCompanyCodeCrcy * -1

//                else Values.ActualAmountInCompanyCodeCrcy * -1 end

//      end as AmountInCompanyCodeCurrency,

//

//      @ObjectModel.foreignKey.association: '_GlobalCurrency'

//      @Semantics.currencyCode: true

//      Values.GlobalCurrency,

//

//      @ObjectModel.foreignKey.association: '_GlobalCurrencyRole'

//      LedgerCompanyCodeCrcyRole.GlobalCurrencyRole,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInGlobalCurrency + Values.ActualAmountInGlobalCurrency

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInGlobalCurrency

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInGlobalCurrency

////           else Values.ActualAmountInGlobalCurrency    end     as AmountInGlobalCurrency,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInGlobalCurrency + Values.ActualAmountInGlobalCurrency

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInGlobalCurrency

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInGlobalCurrency

//                else Values.ActualAmountInGlobalCurrency end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInGlobalCurrency * -1 + Values.ActualAmountInGlobalCurrency * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInGlobalCurrency * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInGlobalCurrency * -1

//                else Values.ActualAmountInGlobalCurrency * -1 end

//      end as AmountInGlobalCurrency,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency1'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency1,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency1Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency1Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy1 + Values.ActualAmountInFreeDfndCrcy1

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy1

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy1

////           else Values.ActualAmountInFreeDfndCrcy1    end      as AmountInFreeDefinedCurrency1,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy1 + Values.ActualAmountInFreeDfndCrcy1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy1

//                else Values.ActualAmountInFreeDfndCrcy1 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy1  * -1 + Values.ActualAmountInFreeDfndCrcy1 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy1 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy1 * -1

//                else Values.ActualAmountInFreeDfndCrcy1 * -1 end

//      end as AmountInFreeDefinedCurrency1,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency2'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency2,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency2Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency2Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy2 + Values.ActualAmountInFreeDfndCrcy2

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy2

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy2

////           else Values.ActualAmountInFreeDfndCrcy2    end      as AmountInFreeDefinedCurrency2,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy2 + Values.ActualAmountInFreeDfndCrcy2

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy2

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy2

//                else Values.ActualAmountInFreeDfndCrcy2 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy2  * -1 + Values.ActualAmountInFreeDfndCrcy2 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy2 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy2 * -1

//                else Values.ActualAmountInFreeDfndCrcy2 * -1 end

//      end as AmountInFreeDefinedCurrency2,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency3'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency3,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency3Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency3Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy3 + Values.ActualAmountInFreeDfndCrcy3

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy3

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy3

////           else Values.ActualAmountInFreeDfndCrcy3    end      as AmountInFreeDefinedCurrency3,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy3 + Values.ActualAmountInFreeDfndCrcy3

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy3

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy3

//                else Values.ActualAmountInFreeDfndCrcy3 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy3  * -1 + Values.ActualAmountInFreeDfndCrcy3 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy3 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy3 * -1

//                else Values.ActualAmountInFreeDfndCrcy3 * -1 end

//      end as AmountInFreeDefinedCurrency3,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency4'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency4,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency4Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency4Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy4 + Values.ActualAmountInFreeDfndCrcy4

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy4

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy4

////           else Values.ActualAmountInFreeDfndCrcy4    end      as AmountInFreeDefinedCurrency4,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy4 + Values.ActualAmountInFreeDfndCrcy4

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy4

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy4

//                else Values.ActualAmountInFreeDfndCrcy4 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy4  * -1 + Values.ActualAmountInFreeDfndCrcy4 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy4 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy4 * -1

//                else Values.ActualAmountInFreeDfndCrcy4 * -1 end

//      end as AmountInFreeDefinedCurrency4,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency5'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency5,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency5Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency5Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy5 + Values.ActualAmountInFreeDfndCrcy5

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy5

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy5

////           else Values.ActualAmountInFreeDfndCrcy5    end      as AmountInFreeDefinedCurrency5,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy5 + Values.ActualAmountInFreeDfndCrcy5

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy5

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy5

//                else Values.ActualAmountInFreeDfndCrcy5 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy5  * -1 + Values.ActualAmountInFreeDfndCrcy5 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy5 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy5 * -1

//                else Values.ActualAmountInFreeDfndCrcy5 * -1 end

//      end as AmountInFreeDefinedCurrency5,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency6'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency6,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency6Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency6Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy6 + Values.ActualAmountInFreeDfndCrcy6

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy6

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy6

////           else Values.ActualAmountInFreeDfndCrcy6    end      as AmountInFreeDefinedCurrency6,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy6 + Values.ActualAmountInFreeDfndCrcy6

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy6

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy6

//                else Values.ActualAmountInFreeDfndCrcy6 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy6  * -1 + Values.ActualAmountInFreeDfndCrcy6 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy6 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy6 * -1

//                else Values.ActualAmountInFreeDfndCrcy6 * -1 end

//      end as AmountInFreeDefinedCurrency6,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency7'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency7,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency7Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency7Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy7 + Values.ActualAmountInFreeDfndCrcy7

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy7

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy7

////           else Values.ActualAmountInFreeDfndCrcy7    end      as AmountInFreeDefinedCurrency7,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy7 + Values.ActualAmountInFreeDfndCrcy7

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy7

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy7

//                else Values.ActualAmountInFreeDfndCrcy7 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy7  * -1 + Values.ActualAmountInFreeDfndCrcy7 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy7 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy7 * -1

//                else Values.ActualAmountInFreeDfndCrcy7 * -1 end

//      end as AmountInFreeDefinedCurrency7,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency8'

//      @Semantics.currencyCode: true

//      Values.FreeDefinedCurrency8,

//

//      @ObjectModel.foreignKey.association: '_FreeDefinedCurrency8Role'

//      LedgerCompanyCodeCrcyRole.FreeDefinedCurrency8Role,

//

//      @DefaultAggregation: #SUM

//      @Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }

////      case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy8  + Values.ActualAmountInFreeDfndCrcy8

////           when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy8

////           when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '')  then Values.PlanAmountInFreeDefinedCrcy8

////           else Values.ActualAmountInFreeDfndCrcy8    end      as AmountInFreeDefinedCurrency8,

//      case when CalculatedAssetValuationView.DerivedDeprAreaValCalcSign = '+'

//      then case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy8 + Values.ActualAmountInFreeDfndCrcy8

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy8

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy8

//                else Values.ActualAmountInFreeDfndCrcy8 end

//      else case when Values.PlannedValueIsInclusive = '1' then Values.PlanAmountInFreeDefinedCrcy8  * -1 + Values.ActualAmountInFreeDfndCrcy8 * -1

//                when Values.PlannedValueIsInclusive = '2' and FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '' then Values.ActualAmountInFreeDfndCrcy8 * -1

//                when Values.PlannedValueIsInclusive = '2'and not (FiscalPeriod > :P_ToFiscalPeriod and IsPlanningDocument = '') then Values.PlanAmountInFreeDefinedCrcy8 * -1

//                else Values.ActualAmountInFreeDfndCrcy8 * -1 end

//      end as AmountInFreeDefinedCurrency8,

//

//      @ObjectModel.foreignKey.association: '_UnitOfMeasure'

//      @Semantics.unitOfMeasure:true

//      BaseUnit,

//      @DefaultAggregation: #SUM

//      @Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }

//      Quantity,

//

//      /* Fields from ANLA */

//      @ObjectModel.foreignKey.association: '_AssetAccountDetermination'

//      _FixedAsset.AssetAccountDetermination,

//      @ObjectModel.foreignKey.association: '_AssetClass'

//      _FixedAsset.AssetClass,

//      @ObjectModel.foreignKey.association: '_FixedAssetGroup'

//      _FixedAsset.FixedAssetGroup,

//      _FixedAsset.AssetSupplierName,

//      @ObjectModel.foreignKey.association: '_InvestmentOrder'

//      _FixedAsset.InvestmentOrder,

//      _FixedAsset.InventoryIsCounted,

//      _FixedAsset.LastInventoryDate,

//      _FixedAsset.Inventory,

//      @ObjectModel.foreignKey.association: '_Group1AssetEvaluationKey'

//      _FixedAsset.Group1AssetEvaluationKey,

//      @ObjectModel.foreignKey.association: '_Group2AssetEvaluationKey'

//      _FixedAsset.Group2AssetEvaluationKey,

//      @ObjectModel.foreignKey.association: '_Group3AssetEvaluationKey'

//      _FixedAsset.Group3AssetEvaluationKey,

//      @ObjectModel.foreignKey.association: '_Group4AssetEvaluationKey'

//      _FixedAsset.Group4AssetEvaluationKey,

//      @ObjectModel.foreignKey.association: '_Group5AssetEvaluationKey'

//      _FixedAsset.Group5AssetEvaluationKey,

//      _FixedAsset.AssetSerialNumber,

//      @ObjectModel.foreignKey.association: '_Supplier'

//      _FixedAsset.Supplier                                     as Supplier,

//

//

//      /* Dedicated properties which moved with the redesign of the asset master from ANLA to FAAT_MD_LD */

//      /* -> I_FixedAssetForLedger selects based on the business function from the correct table         */

//      _FixedAssetForLedger.AssetCapitalizationDate,

//      _FixedAssetForLedger.AssetDeactivationDate,

//      _FixedAssetForLedger.FirstAcquisitionFiscalYear,

//      _FixedAssetForLedger.FirstAcquisitionFiscalPeriod,

//

//      @ObjectModel.foreignKey.association: '_FixedAssetNatlClfn'

//      _FixedAssetCountryData.NationalClassification,

//      @ObjectModel.foreignKey.association: '_TaxDepreciationGroup'

//      _FixedAssetCountryData.TaxDepreciationGroup,

//

//      @ObjectModel.foreignKey.association: '_PartnerMasterFixedAsset'

//      Values.PartnerMasterFixedAsset,

//      @ObjectModel.foreignKey.association: '_PartnerFixedAsset'

//      Values.PartnerFixedAsset,

//

//      //WBS Element

//      @Consumption.hidden: true

//      _FixedAsset.InvestmentProjectWBSElement                  as WBSElementInternalID,

//

//      //Publish Associations

//      _CompanyCode,

//      _ControllingArea,

//      _Country,

//      _CountryChartOfAccounts,

//      _FiscalYearVariant,

//      _DepreciationArea,

//      _MasterFixedAsset,

//      _FixedAsset,

//      _Ledger,

//      _JournalEntry,

//      _DebitCreditCode,

//      _FiscalYear,

//      _FiscalPeriod,

//      _FiscalYearPeriod,

//      _SubLedgerAccLineItemType,

//      _ChartOfAccounts,

//      _GLAccountInChartOfAccounts,

//      _AlternativeGLAccount,

//      _LedgerGroup,

//      _AssetAcctTransClassfctn,

//      _TaxDepreciationGroup,

//      _FinancialAccountType,

//      _ChartOfDepreciation,

//      _FinancialStatementVersion,

//      _AccountingPrinciple,

//      _CostCenter,

//      _Plant,

//      _BusinessArea,

//      _ProfitCenter,

//      _Segment,

//      _FunctionalArea,

//      _AssetTransactionType,

//      _AssetKeyFigureSet,

//      _AssetKeyFigure,

//      _AssetSortedKeyFigureSetSpec,

//      _AssetClass,

//      _AssetAccountDetermination,

//      _CompanyCodeCurrency,

//      _GlobalCurrency,

//      _FreeDefinedCurrency1,

//      _FreeDefinedCurrency2,

//      _FreeDefinedCurrency3,

//      _FreeDefinedCurrency4,

//      _FreeDefinedCurrency5,

//      _FreeDefinedCurrency6,

//      _FreeDefinedCurrency7,

//      _FreeDefinedCurrency8,

//      _CompanyCodeCurrencyRole,

//      _GlobalCurrencyRole,

//      _FreeDefinedCurrency1Role,

//      _FreeDefinedCurrency2Role,

//      _FreeDefinedCurrency3Role,

//      _FreeDefinedCurrency4Role,

//      _FreeDefinedCurrency5Role,

//      _FreeDefinedCurrency6Role,

//      _FreeDefinedCurrency7Role,

//      _FreeDefinedCurrency8Role,

//      _UnitOfMeasure,

//      _FixedAsset._FixedAssetGroup,

//      _FixedAsset._InvestmentOrder,

//      _FixedAsset._Group1AssetEvaluationKey,

//      _FixedAsset._Group2AssetEvaluationKey,

//      _FixedAsset._Group3AssetEvaluationKey,

//      _FixedAsset._Group4AssetEvaluationKey,

//      _FixedAsset._Group5AssetEvaluationKey,

//      _LedgerFiscalYearForVariant,

//      _FiscalYearPeriodForVariant,

//      _FiscalPeriodForVariant,

//      _AccountingDocumentType,

//      _FixedAssetCountryData,

//      _FixedAssetNatlClfn,

//      _Supplier,

//      _FinancialManagementArea,

//      _Fund,

//      _BudgetPeriod,

//      _PartnerMasterFixedAsset,

//      _PartnerFixedAsset,

//      _WBSElement

//}

//where

//  AssetValuationView.AssetValuationViewType = 'C01' //Calculated Valuation