@AbapCatalog.sqlViewName: 'PFASSETVALUECUBE'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
//The union all is used to force the optimizer to choose the right path for the values of the not retired assets
define view P_FixedAssetValueCube
with parameters
P_CurrencyRole : fis_curtp,
P_FiscalYear : fis_gjahr,
P_FiscalPeriod : fis_poper,
P_AssetAccountingKeyFigureSet : faa_key_figure_set
//as select from I_FixedAssetValue( P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet )
as select from I_FixedAssetValueForToFsclPerd( P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet, P_FiscalYear: :P_FiscalYear, P_ToFiscalPeriod: :P_FiscalPeriod) as I_FixedAssetValue
inner join I_FiscalYearPeriodForLedger on I_FixedAssetValue.CompanyCode = I_FiscalYearPeriodForLedger.CompanyCode
and I_FixedAssetValue.Ledger = I_FiscalYearPeriodForLedger.Ledger
and I_FiscalYearPeriodForLedger.FiscalYear = :P_FiscalYear
and I_FiscalYearPeriodForLedger.FiscalPeriod = :P_FiscalPeriod
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key I_FixedAssetValue.CompanyCode,
@ObjectModel.foreignKey.association: '_DepreciationArea'
key AssetDepreciationArea,
@ObjectModel.foreignKey.association: '_MasterFixedAsset'
key MasterFixedAsset,
@ObjectModel.foreignKey.association: '_FixedAsset'
key FixedAsset,
@ObjectModel.foreignKey.association: '_Ledger'
key I_FixedAssetValue.Ledger,
@ObjectModel.foreignKey.association: '_FiscalYear'
key I_FixedAssetValue.FiscalYear,
//@ObjectModel.foreignKey.association: '_FiscalPeriod'
@ObjectModel.foreignKey.association: '_FiscalPeriodForVariant'
key I_FixedAssetValue.FiscalPeriod,
@ObjectModel.foreignKey.association: '_SubledgerAccLineItemType'
key SubLedgerAcctLineItemType,
@ObjectModel.foreignKey.association: '_AssetAcctTransClassfctn'
key AssetAcctTransClassfctn,
@ObjectModel.foreignKey.association: '_AssetKeyFigure'
key AssetAccountingKeyFigure,
@ObjectModel.foreignKey.association: '_AssetKeyFigureSet'
key AssetAccountingKeyFigureSet,
@ObjectModel.foreignKey.association: '_JournalEntry'
key AccountingDocument,
key TransactionSubitem,
key DebitCreditCode,
@ObjectModel.foreignKey.association: '_LedgerFiscalYearForVariant'
@Semantics.fiscal.year: true
LedgerFiscalYear,
@ObjectModel.foreignKey.association: '_FiscalYearVariant'
@Semantics.fiscal.yearVariant: true
I_FixedAssetValue.FiscalYearVariant,
@ObjectModel.foreignKey.association: '_FiscalYearPeriodForVariant'
@Semantics.fiscal.yearPeriod: true
I_FixedAssetValue.FiscalYearPeriod,
DepreciationFiscalPeriod,
//AssetLineItemIsPlannedValue,
PlannedValueIsInclusive,
@ObjectModel.foreignKey.association: '_AssetSortedKeyFigureSetSpec'
AssetAccountingSortedKeyFigure,
@ObjectModel.foreignKey.association: '_LedgerGroup'
LedgerGroup,
@ObjectModel.foreignKey.association: '_Country'
I_FixedAssetValue.Country,
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
I_FixedAssetValue.ChartOfAccounts,
//@ObjectModel.foreignKey.association: '_AcqnProdnCostGLAccount'
//_BalanceSheetAccount.AcqnProdnCostGLAccount,
@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
GLAccount,
@ObjectModel.foreignKey.association: '_AlternativeGLAccount'
AlternativeGLAccount,
GroupMasterFixedAsset,
GroupFixedAsset,
@ObjectModel.foreignKey.association: '_FinancialAccountType'
FinancialAccountType,
@Semantics.businessDate.at: true
AccountingDocumentCreationDate,
CreationTime,
JointVentureCostRecoveryCode,
@ObjectModel.foreignKey.association: '_ChartOfDepreciation'
ChartOfDepreciation,
@ObjectModel.foreignKey.association: '_CostCenter'
CostCenter,
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@ObjectModel.foreignKey.association: '_BusinessArea'
BusinessArea,
PersonnelNumber,
@ObjectModel.foreignKey.association: '_FinancialManagementArea'
FinancialManagementArea,
@ObjectModel.foreignKey.association: '_Fund'
Fund,
GrantID,
@ObjectModel.foreignKey.association: '_FunctionalArea'
FunctionalArea,
@ObjectModel.foreignKey.association: '_BudgetPeriod'
BudgetPeriod,
@ObjectModel.foreignKey.association: '_ProfitCenter'
ProfitCenter,
@ObjectModel.foreignKey.association: '_Segment'
Segment,
FundsCenter,
@ObjectModel.foreignKey.association: '_AssetTransactionType'
AssetTransactionType,
@ObjectModel.foreignKey.association: '_ControllingArea'
ControllingArea,
@ObjectModel.foreignKey.association: '_CountryChartOfAccounts'
CountryChartOfAccounts,
@ObjectModel.foreignKey.association: '_FinancialStatementVersion'
I_FixedAssetValue.FinancialStatementVariant,
@ObjectModel.foreignKey.association: '_AccountingPrinciple'
I_FixedAssetValue.AccountingPrinciple,
GLBusinessTransactionType,
@Semantics.currencyCode:true
case when CompanyCodeCurrencyRole = :P_CurrencyRole then CompanyCodeCurrency
when GlobalCurrencyRole = :P_CurrencyRole then GlobalCurrency
when FreeDefinedCurrency1Role = :P_CurrencyRole then FreeDefinedCurrency1
when FreeDefinedCurrency2Role = :P_CurrencyRole then FreeDefinedCurrency2
when FreeDefinedCurrency3Role = :P_CurrencyRole then FreeDefinedCurrency3
when FreeDefinedCurrency4Role = :P_CurrencyRole then FreeDefinedCurrency4
when FreeDefinedCurrency5Role = :P_CurrencyRole then FreeDefinedCurrency5
when FreeDefinedCurrency6Role = :P_CurrencyRole then FreeDefinedCurrency6
when FreeDefinedCurrency7Role = :P_CurrencyRole then FreeDefinedCurrency7
when FreeDefinedCurrency8Role = :P_CurrencyRole then FreeDefinedCurrency8
else cast('' as vdm_v_display_currency)
end as DisplayCurrency,
@DefaultAggregation:#SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
case when CompanyCodeCurrencyRole = :P_CurrencyRole then cast(AmountInCompanyCodeCurrency as farp_amount_display_crcy)
when GlobalCurrencyRole = :P_CurrencyRole then cast(AmountInGlobalCurrency as farp_amount_display_crcy)
when FreeDefinedCurrency1Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency1 as farp_amount_display_crcy)
when FreeDefinedCurrency2Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency2 as farp_amount_display_crcy)
when FreeDefinedCurrency3Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency3 as farp_amount_display_crcy)
when FreeDefinedCurrency4Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency4 as farp_amount_display_crcy)
when FreeDefinedCurrency5Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency5 as farp_amount_display_crcy)
when FreeDefinedCurrency6Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency6 as farp_amount_display_crcy)
when FreeDefinedCurrency7Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency7 as farp_amount_display_crcy)
when FreeDefinedCurrency8Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency8 as farp_amount_display_crcy)
else cast('0' as farp_amount_display_crcy)
end as AmountInDisplayCurrency,
// @DefaultAggregation:#SUM
// @Semantics.amount.currencyCode: 'DisplayCurrency'
// case when CompanyCodeCurrencyRole = :P_CurrencyRole then cast(ActualAmountInCompanyCodeCrcy as farp_amount_display_crcy)
// when GlobalCurrencyRole = :P_CurrencyRole then cast(ActualAmountInGlobalCurrency as farp_amount_display_crcy)
// when FreeDefinedCurrency1Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy1 as farp_amount_display_crcy)
// when FreeDefinedCurrency2Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy2 as farp_amount_display_crcy)
// when FreeDefinedCurrency3Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy3 as farp_amount_display_crcy)
// when FreeDefinedCurrency4Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy4 as farp_amount_display_crcy)
// when FreeDefinedCurrency5Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy5 as farp_amount_display_crcy)
// when FreeDefinedCurrency6Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy6 as farp_amount_display_crcy)
// when FreeDefinedCurrency7Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy7 as farp_amount_display_crcy)
// when FreeDefinedCurrency8Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy8 as farp_amount_display_crcy)
// else cast('0' as farp_amount_display_crcy)
// end as ActualAmountInDisplayCurrency,
/* Fields from ANLA */
@ObjectModel.foreignKey.association: '_AssetAccountDetermination'
AssetAccountDetermination,
@ObjectModel.foreignKey.association: '_AssetClass'
AssetClass,
AssetCapitalizationDate,
FirstAcquisitionFiscalYear,
FirstAcquisitionFiscalPeriod,
AssetDeactivationDate,
@ObjectModel.foreignKey.association: '_FixedAssetGroup'
FixedAssetGroup,
AssetSupplierName,
@ObjectModel.foreignKey.association: '_InvestmentOrder'
InvestmentOrder,
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
BaseUnit,
InventoryIsCounted,
LastInventoryDate,
Inventory,
@ObjectModel.foreignKey.association: '_Group1AssetEvaluationKey'
Group1AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group2AssetEvaluationKey'
Group2AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group3AssetEvaluationKey'
Group3AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group4AssetEvaluationKey'
Group4AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group5AssetEvaluationKey'
Group5AssetEvaluationKey,
AssetSerialNumber,
@ObjectModel.foreignKey.association: '_FixedAssetNatlClfn'
NationalClassification,
@ObjectModel.foreignKey.association: '_TaxDepreciationGroup'
TaxDepreciationGroup,
cast('X' as boolean preserving type) as AssetIsRetiredOnFiscalPerdEnd,
I_FiscalYearPeriodForLedger.FiscalPeriodEndDate,
_WBSElement.WBSElementExternalID,
I_FixedAssetValue._CompanyCode,
I_FixedAssetValue._Country,
_DepreciationArea,
_MasterFixedAsset,
_FixedAsset,
I_FixedAssetValue._Ledger,
I_FixedAssetValue._FiscalYear,
I_FixedAssetValue._FiscalPeriod,
_JournalEntry,
_SubLedgerAccLineItemType,
_AssetAcctTransClassfctn,
_AssetKeyFigure,
_AssetKeyFigureSet,
_AssetSortedKeyFigureSetSpec,
_LedgerGroup,
_ChartOfAccounts,
_GLAccountInChartOfAccounts,
_AlternativeGLAccount,
_FinancialAccountType,
_ChartOfDepreciation,
_CostCenter,
_Plant,
_BusinessArea,
_ProfitCenter,
_Segment,
_FunctionalArea,
_AssetTransactionType,
_ControllingArea,
_CountryChartOfAccounts,
_FinancialStatementVersion,
_AccountingPrinciple,
_AssetAccountDetermination,
_AssetClass,
_FixedAssetGroup,
_InvestmentOrder,
_UnitOfMeasure,
_Group1AssetEvaluationKey,
_Group2AssetEvaluationKey,
_Group3AssetEvaluationKey,
_Group4AssetEvaluationKey,
_Group5AssetEvaluationKey,
I_FixedAssetValue._FiscalYearVariant,
_LedgerFiscalYearForVariant,
_FiscalYearPeriodForVariant,
_FiscalPeriodForVariant,
_FixedAssetCountryData,
_FixedAssetNatlClfn,
_TaxDepreciationGroup,
_FinancialManagementArea,
_Fund,
_BudgetPeriod
}
where
//Due to asset accounting configuration changes we no longer restrict IsRealDepreciationArea
//IsRealDepreciationArea = 'X' //Due to performance we dont select any values from derived areas not even for BUHBKT = '4'
// I_FixedAssetValue.FiscalYear = :P_FiscalYear
// and I_FixedAssetValue.FiscalPeriod <= :P_FiscalPeriod
// and(
(
AssetDeactivationDate <= I_FiscalYearPeriodForLedger.FiscalPeriodEndDate
and AssetDeactivationDate <> '00000000'
)
//union all select from I_FixedAssetValue( P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet )
union all select from I_FixedAssetValueForToFsclPerd( P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet, P_FiscalYear: :P_FiscalYear, P_ToFiscalPeriod: :P_FiscalPeriod) as I_FixedAssetValue
inner join I_FiscalYearPeriodForLedger on I_FixedAssetValue.CompanyCode = I_FiscalYearPeriodForLedger.CompanyCode
and I_FixedAssetValue.Ledger = I_FiscalYearPeriodForLedger.Ledger
and I_FiscalYearPeriodForLedger.FiscalYear = :P_FiscalYear
and I_FiscalYearPeriodForLedger.FiscalPeriod = :P_FiscalPeriod
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key I_FixedAssetValue.CompanyCode,
@ObjectModel.foreignKey.association: '_DepreciationArea'
key AssetDepreciationArea,
@ObjectModel.foreignKey.association: '_MasterFixedAsset'
key MasterFixedAsset,
@ObjectModel.foreignKey.association: '_FixedAsset'
key FixedAsset,
@ObjectModel.foreignKey.association: '_Ledger'
key I_FixedAssetValue.Ledger,
@ObjectModel.foreignKey.association: '_FiscalYear'
key I_FixedAssetValue.FiscalYear,
//@ObjectModel.foreignKey.association: '_FiscalPeriod'
@ObjectModel.foreignKey.association: '_FiscalPeriodForVariant'
key I_FixedAssetValue.FiscalPeriod,
@ObjectModel.foreignKey.association: '_SubledgerAccLineItemType'
key SubLedgerAcctLineItemType,
@ObjectModel.foreignKey.association: '_AssetAcctTransClassfctn'
key AssetAcctTransClassfctn,
@ObjectModel.foreignKey.association: '_AssetKeyFigure'
key AssetAccountingKeyFigure,
@ObjectModel.foreignKey.association: '_AssetKeyFigureSet'
key AssetAccountingKeyFigureSet,
@ObjectModel.foreignKey.association: '_JournalEntry'
key AccountingDocument,
key TransactionSubitem,
key DebitCreditCode,
@ObjectModel.foreignKey.association: '_LedgerFiscalYearForVariant'
@Semantics.fiscal.year: true
LedgerFiscalYear,
@ObjectModel.foreignKey.association: '_FiscalYearVariant'
@Semantics.fiscal.yearVariant: true
I_FixedAssetValue.FiscalYearVariant,
@ObjectModel.foreignKey.association: '_FiscalYearPeriodForVariant'
@Semantics.fiscal.yearPeriod: true
I_FixedAssetValue.FiscalYearPeriod,
DepreciationFiscalPeriod,
//AssetLineItemIsPlannedValue,
PlannedValueIsInclusive,
@ObjectModel.foreignKey.association: '_AssetSortedKeyFigureSetSpec'
AssetAccountingSortedKeyFigure,
@ObjectModel.foreignKey.association: '_LedgerGroup'
LedgerGroup,
@ObjectModel.foreignKey.association: '_Country'
I_FixedAssetValue.Country,
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
I_FixedAssetValue.ChartOfAccounts,
//@ObjectModel.foreignKey.association: '_AcqnProdnCostGLAccount'
//_BalanceSheetAccount.AcqnProdnCostGLAccount,
@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
GLAccount,
@ObjectModel.foreignKey.association: '_AlternativeGLAccount'
AlternativeGLAccount,
GroupMasterFixedAsset,
GroupFixedAsset,
@ObjectModel.foreignKey.association: '_FinancialAccountType'
FinancialAccountType,
@Semantics.businessDate.at: true
AccountingDocumentCreationDate,
CreationTime,
JointVentureCostRecoveryCode,
@ObjectModel.foreignKey.association: '_ChartOfDepreciation'
ChartOfDepreciation,
@ObjectModel.foreignKey.association: '_CostCenter'
CostCenter,
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@ObjectModel.foreignKey.association: '_BusinessArea'
BusinessArea,
PersonnelNumber,
@ObjectModel.foreignKey.association: '_FinancialManagementArea'
FinancialManagementArea,
@ObjectModel.foreignKey.association: '_Fund'
Fund,
GrantID,
@ObjectModel.foreignKey.association: '_FunctionalArea'
FunctionalArea,
@ObjectModel.foreignKey.association: '_BudgetPeriod'
BudgetPeriod,
@ObjectModel.foreignKey.association: '_ProfitCenter'
ProfitCenter,
@ObjectModel.foreignKey.association: '_Segment'
Segment,
FundsCenter,
@ObjectModel.foreignKey.association: '_AssetTransactionType'
AssetTransactionType,
@ObjectModel.foreignKey.association: '_ControllingArea'
ControllingArea,
@ObjectModel.foreignKey.association: '_CountryChartOfAccounts'
CountryChartOfAccounts,
@ObjectModel.foreignKey.association: '_FinancialStatementVersion'
I_FixedAssetValue.FinancialStatementVariant,
@ObjectModel.foreignKey.association: '_AccountingPrinciple'
I_FixedAssetValue.AccountingPrinciple,
GLBusinessTransactionType,
@Semantics.currencyCode:true
case when CompanyCodeCurrencyRole = :P_CurrencyRole then CompanyCodeCurrency
when GlobalCurrencyRole = :P_CurrencyRole then GlobalCurrency
when FreeDefinedCurrency1Role = :P_CurrencyRole then FreeDefinedCurrency1
when FreeDefinedCurrency2Role = :P_CurrencyRole then FreeDefinedCurrency2
when FreeDefinedCurrency3Role = :P_CurrencyRole then FreeDefinedCurrency3
when FreeDefinedCurrency4Role = :P_CurrencyRole then FreeDefinedCurrency4
when FreeDefinedCurrency5Role = :P_CurrencyRole then FreeDefinedCurrency5
when FreeDefinedCurrency6Role = :P_CurrencyRole then FreeDefinedCurrency6
when FreeDefinedCurrency7Role = :P_CurrencyRole then FreeDefinedCurrency7
when FreeDefinedCurrency8Role = :P_CurrencyRole then FreeDefinedCurrency8
else cast('' as vdm_v_display_currency)
end as DisplayCurrency,
@DefaultAggregation:#SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
case when CompanyCodeCurrencyRole = :P_CurrencyRole then cast(AmountInCompanyCodeCurrency as farp_amount_display_crcy)
when GlobalCurrencyRole = :P_CurrencyRole then cast(AmountInGlobalCurrency as farp_amount_display_crcy)
when FreeDefinedCurrency1Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency1 as farp_amount_display_crcy)
when FreeDefinedCurrency2Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency2 as farp_amount_display_crcy)
when FreeDefinedCurrency3Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency3 as farp_amount_display_crcy)
when FreeDefinedCurrency4Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency4 as farp_amount_display_crcy)
when FreeDefinedCurrency5Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency5 as farp_amount_display_crcy)
when FreeDefinedCurrency6Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency6 as farp_amount_display_crcy)
when FreeDefinedCurrency7Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency7 as farp_amount_display_crcy)
when FreeDefinedCurrency8Role = :P_CurrencyRole then cast(AmountInFreeDefinedCurrency8 as farp_amount_display_crcy)
else cast('0' as farp_amount_display_crcy)
end as AmountInDisplayCurrency,
// @DefaultAggregation:#SUM
// @Semantics.amount.currencyCode: 'DisplayCurrency'
// case when CompanyCodeCurrencyRole = :P_CurrencyRole then cast(ActualAmountInCompanyCodeCrcy as farp_amount_display_crcy)
// when GlobalCurrencyRole = :P_CurrencyRole then cast(ActualAmountInGlobalCurrency as farp_amount_display_crcy)
// when FreeDefinedCurrency1Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy1 as farp_amount_display_crcy)
// when FreeDefinedCurrency2Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy2 as farp_amount_display_crcy)
// when FreeDefinedCurrency3Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy3 as farp_amount_display_crcy)
// when FreeDefinedCurrency4Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy4 as farp_amount_display_crcy)
// when FreeDefinedCurrency5Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy5 as farp_amount_display_crcy)
// when FreeDefinedCurrency6Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy6 as farp_amount_display_crcy)
// when FreeDefinedCurrency7Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy7 as farp_amount_display_crcy)
// when FreeDefinedCurrency8Role = :P_CurrencyRole then cast(ActualAmountInFreeDfndCrcy8 as farp_amount_display_crcy)
// else cast('0' as farp_amount_display_crcy)
// end as ActualAmountInDisplayCurrency,
/* Fields from ANLA */
@ObjectModel.foreignKey.association: '_AssetAccountDetermination'
AssetAccountDetermination,
@ObjectModel.foreignKey.association: '_AssetClass'
AssetClass,
AssetCapitalizationDate,
FirstAcquisitionFiscalYear,
FirstAcquisitionFiscalPeriod,
AssetDeactivationDate,
@ObjectModel.foreignKey.association: '_FixedAssetGroup'
FixedAssetGroup,
AssetSupplierName,
@ObjectModel.foreignKey.association: '_InvestmentOrder'
InvestmentOrder,
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
BaseUnit,
InventoryIsCounted,
LastInventoryDate,
Inventory,
@ObjectModel.foreignKey.association: '_Group1AssetEvaluationKey'
Group1AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group2AssetEvaluationKey'
Group2AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group3AssetEvaluationKey'
Group3AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group4AssetEvaluationKey'
Group4AssetEvaluationKey,
@ObjectModel.foreignKey.association: '_Group5AssetEvaluationKey'
Group5AssetEvaluationKey,
AssetSerialNumber,
@ObjectModel.foreignKey.association: '_FixedAssetNatlClfn'
NationalClassification,
@ObjectModel.foreignKey.association: '_TaxDepreciationGroup'
TaxDepreciationGroup,
cast(' ' as boolean preserving type) as AssetIsRetiredOnFiscalPerdEnd,
I_FiscalYearPeriodForLedger.FiscalPeriodEndDate,
_WBSElement.WBSElementExternalID,
I_FixedAssetValue._CompanyCode,
I_FixedAssetValue._Country,
_DepreciationArea,
_MasterFixedAsset,
_FixedAsset,
I_FixedAssetValue._Ledger,
I_FixedAssetValue._FiscalYear,
I_FixedAssetValue._FiscalPeriod,
_JournalEntry,
_SubLedgerAccLineItemType,
_AssetAcctTransClassfctn,
_AssetKeyFigure,
_AssetKeyFigureSet,
_AssetSortedKeyFigureSetSpec,
_LedgerGroup,
_ChartOfAccounts,
_GLAccountInChartOfAccounts,
_AlternativeGLAccount,
_FinancialAccountType,
_ChartOfDepreciation,
_CostCenter,
_Plant,
_BusinessArea,
_ProfitCenter,
_Segment,
_FunctionalArea,
_AssetTransactionType,
_ControllingArea,
_CountryChartOfAccounts,
_FinancialStatementVersion,
_AccountingPrinciple,
_AssetAccountDetermination,
_AssetClass,
_FixedAssetGroup,
_InvestmentOrder,
_UnitOfMeasure,
_Group1AssetEvaluationKey,
_Group2AssetEvaluationKey,
_Group3AssetEvaluationKey,
_Group4AssetEvaluationKey,
_Group5AssetEvaluationKey,
I_FixedAssetValue._FiscalYearVariant,
_LedgerFiscalYearForVariant,
_FiscalYearPeriodForVariant,
_FiscalPeriodForVariant,
_FixedAssetCountryData,
_FixedAssetNatlClfn,
_TaxDepreciationGroup,
_FinancialManagementArea,
_Fund,
_BudgetPeriod
}
where
//Due to asset accounting configuration changes we no longer restrict IsRealDepreciationArea
//IsRealDepreciationArea = 'X' //Due to performance we dont select any values from derived areas not even for BUHBKT = '4'
// I_FixedAssetValue.FiscalYear = :P_FiscalYear
// and I_FixedAssetValue.FiscalPeriod <= :P_FiscalPeriod
// and not(
not(
AssetDeactivationDate <= I_FiscalYearPeriodForLedger.FiscalPeriodEndDate
and AssetDeactivationDate <> '00000000'
)