P_FixedAssetAHSValue
P_FixedAssetAHSValue is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_AssetKeyFigureSetSpec, I_FixedAssetValueForToFsclPerd, I_FixedAssetValueForToFsclPerd) and exposes 247 fields with key fields CompanyCode, AssetDepreciationArea, MasterFixedAsset, FixedAsset, AccountingDocument.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_AssetKeyFigureSetSpec | AssetKeyFigureSetSpec | inner |
| I_FixedAssetValueForToFsclPerd | I_FixedAssetValueForToFsclPerd | from |
| I_FixedAssetValueForToFsclPerd | I_FixedAssetValueForToFsclPerd | union_all |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_CurrencyRole | fis_curtp | |
| P_FiscalYear | fis_gjahr | |
| P_FiscalPeriod | fis_period_to | |
| P_AssetAccountingKeyFigureSet | faa_key_figure_set |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFASSETAHSVALUE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (247)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | ||
| KEY | AssetDepreciationArea | AssetDepreciationArea | ||
| KEY | MasterFixedAsset | MasterFixedAsset | ||
| KEY | FixedAsset | FixedAsset | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | TransactionSubitem | TransactionSubitem | ||
| KEY | Ledger | Ledger | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | FiscalPeriod | FiscalPeriod | ||
| KEY | SubLedgerAcctLineItemType | SubLedgerAcctLineItemType | ||
| KEY | AssetAcctTransClassfctn | AssetAcctTransClassfctn | ||
| KEY | AssetAccountingKeyFigure | AssetAccountingKeyFigure | ||
| KEY | AssetAccountingKeyFigureSet | AssetAccountingKeyFigureSet | ||
| KEY | DebitCreditCode | DebitCreditCode | ||
| KEY | KeyFigureIsZeroBalance | |||
| LedgerFiscalYear | LedgerFiscalYear | |||
| FiscalYearVariant | FiscalYearVariant | |||
| FiscalYearPeriod | FiscalYearPeriod | |||
| DepreciationFiscalPeriod | DepreciationFiscalPeriod | |||
| AssetAccountingSortedKeyFigure | AssetAccountingSortedKeyFigure | |||
| LedgerGroup | LedgerGroup | |||
| Country | Country | |||
| ChartOfAccounts | ChartOfAccounts | |||
| CountryChartOfAccounts | CountryChartOfAccounts | |||
| GLAccount | GLAccount | |||
| AlternativeGLAccount | AlternativeGLAccount | |||
| GroupMasterFixedAsset | GroupMasterFixedAsset | |||
| GroupFixedAsset | GroupFixedAsset | |||
| FinancialAccountType | FinancialAccountType | |||
| AccountingDocumentCreationDate | AccountingDocumentCreationDate | |||
| CreationTime | CreationTime | |||
| JointVentureCostRecoveryCode | JointVentureCostRecoveryCode | |||
| ChartOfDepreciation | ChartOfDepreciation | |||
| CostCenter | CostCenter | |||
| Plant | Plant | |||
| BusinessArea | BusinessArea | |||
| PersonnelNumber | PersonnelNumber | |||
| FinancialManagementArea | FinancialManagementArea | |||
| Fund | Fund | |||
| GrantID | GrantID | |||
| FunctionalArea | FunctionalArea | |||
| BudgetPeriod | BudgetPeriod | |||
| ProfitCenter | ProfitCenter | |||
| Segment | Segment | |||
| FundsCenter | FundsCenter | |||
| AssetTransactionType | AssetTransactionType | |||
| GLBusinessTransactionType | GLBusinessTransactionType | |||
| ControllingArea | ControllingArea | |||
| FinancialStatementVariant | FinancialStatementVariant | |||
| AccountingPrinciple | AccountingPrinciple | |||
| CurrencyRole | ||||
| AssetAccountDetermination | AssetAccountDetermination | |||
| AssetClass | AssetClass | |||
| AssetCapitalizationDate | AssetCapitalizationDate | |||
| FirstAcquisitionFiscalYear | FirstAcquisitionFiscalYear | |||
| FirstAcquisitionFiscalPeriod | FirstAcquisitionFiscalPeriod | |||
| AssetDeactivationDate | AssetDeactivationDate | |||
| FixedAssetGroup | FixedAssetGroup | |||
| AssetSupplierName | AssetSupplierName | |||
| InvestmentOrder | InvestmentOrder | |||
| BaseUnit | BaseUnit | |||
| InventoryIsCounted | InventoryIsCounted | |||
| LastInventoryDate | LastInventoryDate | |||
| Inventory | Inventory | |||
| Group1AssetEvaluationKey | Group1AssetEvaluationKey | |||
| Group2AssetEvaluationKey | Group2AssetEvaluationKey | |||
| Group3AssetEvaluationKey | Group3AssetEvaluationKey | |||
| Group4AssetEvaluationKey | Group4AssetEvaluationKey | |||
| Group5AssetEvaluationKey | Group5AssetEvaluationKey | |||
| AssetSerialNumber | AssetSerialNumber | |||
| NationalClassification | NationalClassification | |||
| TaxDepreciationGroup | TaxDepreciationGroup | |||
| WBSElementExternalID | _WBSElement | WBSElementExternalID | ||
| _CompanyCode | _CompanyCode | |||
| _Country | _Country | |||
| _CountryChartOfAccounts | _CountryChartOfAccounts | |||
| _DepreciationArea | _DepreciationArea | |||
| _ChartOfAccounts | _ChartOfAccounts | |||
| _ControllingArea | _ControllingArea | |||
| _MasterFixedAsset | _MasterFixedAsset | |||
| _FixedAsset | _FixedAsset | |||
| _AssetAccountDetermination | _AssetAccountDetermination | |||
| _AssetClass | _AssetClass | |||
| _Ledger | _Ledger | |||
| _FiscalYear | _FiscalYear | |||
| _FiscalPeriod | _FiscalPeriod | |||
| _FiscalYearPeriod | _FiscalYearPeriod | |||
| _JournalEntry | _JournalEntry | |||
| _SubLedgerAccLineItemType | _SubLedgerAccLineItemType | |||
| _LedgerGroup | _LedgerGroup | |||
| _GLAccountInChartOfAccounts | _GLAccountInChartOfAccounts | |||
| _AlternativeGLAccount | _AlternativeGLAccount | |||
| _AssetAcctTransClassfctn | _AssetAcctTransClassfctn | |||
| _FinancialAccountType | _FinancialAccountType | |||
| _ChartOfDepreciation | _ChartOfDepreciation | |||
| _FinancialStatementVersion | _FinancialStatementVersion | |||
| _AccountingPrinciple | _AccountingPrinciple | |||
| _CostCenter | _CostCenter | |||
| _Plant | _Plant | |||
| _BusinessArea | _BusinessArea | |||
| _ProfitCenter | _ProfitCenter | |||
| _Segment | _Segment | |||
| _FunctionalArea | _FunctionalArea | |||
| _AssetTransactionType | _AssetTransactionType | |||
| _AssetKeyFigure | _AssetKeyFigure | |||
| _AssetKeyFigureSet | _AssetKeyFigureSet | |||
| _FixedAssetGroup | _FixedAssetGroup | |||
| _InvestmentOrder | _InvestmentOrder | |||
| _UnitOfMeasure | _UnitOfMeasure | |||
| _Group1AssetEvaluationKey | _Group1AssetEvaluationKey | |||
| _Group2AssetEvaluationKey | _Group2AssetEvaluationKey | |||
| _Group3AssetEvaluationKey | _Group3AssetEvaluationKey | |||
| _Group4AssetEvaluationKey | _Group4AssetEvaluationKey | |||
| _Group5AssetEvaluationKey | _Group5AssetEvaluationKey | |||
| _FiscalYearVariant | I_FixedAssetValue | _FiscalYearVariant | ||
| _LedgerFiscalYearForVariant | _LedgerFiscalYearForVariant | |||
| _FiscalYearPeriodForVariant | _FiscalYearPeriodForVariant | |||
| _FiscalPeriodForVariant | _FiscalPeriodForVariant | |||
| _FixedAssetCountryData | _FixedAssetCountryData | |||
| _FixedAssetNatlClfn | _FixedAssetNatlClfn | |||
| _TaxDepreciationGroup | _TaxDepreciationGroup | |||
| _FinancialManagementArea | _FinancialManagementArea | |||
| _Fund | _Fund | |||
| KEY | AssetDepreciationArea | AssetDepreciationArea | ||
| KEY | MasterFixedAsset | MasterFixedAsset | ||
| KEY | FixedAsset | FixedAsset | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | TransactionSubitem | TransactionSubitem | ||
| KEY | Ledger | Ledger | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | FiscalPeriod | FiscalPeriod | ||
| KEY | SubLedgerAcctLineItemType | SubLedgerAcctLineItemType | ||
| KEY | AssetAcctTransClassfctn | AssetAcctTransClassfctn | ||
| KEY | AssetAccountingKeyFigure | I_AssetKeyFigureSetSpec | AssetAccountingKeyFigure | |
| KEY | AssetAccountingKeyFigureSet | I_AssetKeyFigureSetSpec | AssetAccountingKeyFigureSet | |
| KEY | DebitCreditCode | DebitCreditCode | ||
| KEY | KeyFigureIsZeroBalance | |||
| LedgerFiscalYear | LedgerFiscalYear | |||
| FiscalYearVariant | FiscalYearVariant | |||
| FiscalYearPeriod | FiscalYearPeriod | |||
| DepreciationFiscalPeriod | DepreciationFiscalPeriod | |||
| AssetAccountingSortedKeyFigure | I_AssetKeyFigureSetSpec | AssetAccountingSortedKeyFigure | ||
| LedgerGroup | LedgerGroup | |||
| Country | Country | |||
| ChartOfAccounts | ChartOfAccounts | |||
| CountryChartOfAccounts | CountryChartOfAccounts | |||
| GLAccount | GLAccount | |||
| AlternativeGLAccount | AlternativeGLAccount | |||
| GroupMasterFixedAsset | GroupMasterFixedAsset | |||
| GroupFixedAsset | GroupFixedAsset | |||
| FinancialAccountType | FinancialAccountType | |||
| AccountingDocumentCreationDate | AccountingDocumentCreationDate | |||
| CreationTime | CreationTime | |||
| JointVentureCostRecoveryCode | JointVentureCostRecoveryCode | |||
| ChartOfDepreciation | ChartOfDepreciation | |||
| CostCenter | CostCenter | |||
| Plant | Plant | |||
| BusinessArea | BusinessArea | |||
| PersonnelNumber | PersonnelNumber | |||
| FinancialManagementArea | FinancialManagementArea | |||
| Fund | Fund | |||
| GrantID | GrantID | |||
| FunctionalArea | FunctionalArea | |||
| BudgetPeriod | BudgetPeriod | |||
| ProfitCenter | ProfitCenter | |||
| Segment | Segment | |||
| FundsCenter | FundsCenter | |||
| AssetTransactionType | AssetTransactionType | |||
| GLBusinessTransactionType | GLBusinessTransactionType | |||
| ControllingArea | ControllingArea | |||
| FinancialStatementVariant | FinancialStatementVariant | |||
| AccountingPrinciple | AccountingPrinciple | |||
| AmountInDisplayCurrency | ||||
| CurrencyRole | ||||
| AssetAccountDetermination | AssetAccountDetermination | |||
| AssetClass | AssetClass | |||
| AssetCapitalizationDate | AssetCapitalizationDate | |||
| FirstAcquisitionFiscalYear | FirstAcquisitionFiscalYear | |||
| FirstAcquisitionFiscalPeriod | FirstAcquisitionFiscalPeriod | |||
| AssetDeactivationDate | AssetDeactivationDate | |||
| FixedAssetGroup | FixedAssetGroup | |||
| AssetSupplierName | AssetSupplierName | |||
| InvestmentOrder | InvestmentOrder | |||
| BaseUnit | BaseUnit | |||
| InventoryIsCounted | InventoryIsCounted | |||
| LastInventoryDate | LastInventoryDate | |||
| Inventory | Inventory | |||
| Group1AssetEvaluationKey | Group1AssetEvaluationKey | |||
| Group2AssetEvaluationKey | Group2AssetEvaluationKey | |||
| Group3AssetEvaluationKey | Group3AssetEvaluationKey | |||
| Group4AssetEvaluationKey | Group4AssetEvaluationKey | |||
| Group5AssetEvaluationKey | Group5AssetEvaluationKey | |||
| AssetSerialNumber | AssetSerialNumber | |||
| NationalClassification | NationalClassification | |||
| TaxDepreciationGroup | TaxDepreciationGroup | |||
| WBSElementExternalID | _WBSElement | WBSElementExternalID | ||
| _CompanyCode | _CompanyCode | |||
| _Country | _Country | |||
| _CountryChartOfAccounts | _CountryChartOfAccounts | |||
| _DepreciationArea | _DepreciationArea | |||
| _ChartOfAccounts | _ChartOfAccounts | |||
| _ControllingArea | _ControllingArea | |||
| _MasterFixedAsset | _MasterFixedAsset | |||
| _FixedAsset | _FixedAsset | |||
| _AssetAccountDetermination | _AssetAccountDetermination | |||
| _AssetClass | _AssetClass | |||
| _Ledger | _Ledger | |||
| _FiscalYear | _FiscalYear | |||
| _FiscalPeriod | _FiscalPeriod | |||
| _FiscalYearPeriod | _FiscalYearPeriod | |||
| _JournalEntry | _JournalEntry | |||
| _SubLedgerAccLineItemType | _SubLedgerAccLineItemType | |||
| _LedgerGroup | _LedgerGroup | |||
| _GLAccountInChartOfAccounts | _GLAccountInChartOfAccounts | |||
| _AlternativeGLAccount | _AlternativeGLAccount | |||
| _AssetAcctTransClassfctn | _AssetAcctTransClassfctn | |||
| _FinancialAccountType | _FinancialAccountType | |||
| _ChartOfDepreciation | _ChartOfDepreciation | |||
| _FinancialStatementVersion | _FinancialStatementVersion | |||
| _AccountingPrinciple | _AccountingPrinciple | |||
| _CostCenter | _CostCenter | |||
| _Plant | _Plant | |||
| _BusinessArea | _BusinessArea | |||
| _ProfitCenter | _ProfitCenter | |||
| _Segment | _Segment | |||
| _FunctionalArea | _FunctionalArea | |||
| _AssetTransactionType | _AssetTransactionType | |||
| _AssetKeyFigure | I_AssetKeyFigureSetSpec | _AssetKeyFigure | ||
| _AssetKeyFigureSet | I_AssetKeyFigureSetSpec | _AssetKeyFigureSet | ||
| _FixedAssetGroup | _FixedAssetGroup | |||
| _InvestmentOrder | _InvestmentOrder | |||
| _UnitOfMeasure | _UnitOfMeasure | |||
| _Group1AssetEvaluationKey | _Group1AssetEvaluationKey | |||
| _Group2AssetEvaluationKey | _Group2AssetEvaluationKey | |||
| _Group3AssetEvaluationKey | _Group3AssetEvaluationKey | |||
| _Group4AssetEvaluationKey | _Group4AssetEvaluationKey | |||
| _Group5AssetEvaluationKey | _Group5AssetEvaluationKey | |||
| _FiscalYearVariant | I_FixedAssetValue | _FiscalYearVariant | ||
| _LedgerFiscalYearForVariant | _LedgerFiscalYearForVariant | |||
| _FiscalYearPeriodForVariant | _FiscalYearPeriodForVariant | |||
| _FiscalPeriodForVariant | _FiscalPeriodForVariant | |||
| _FixedAssetCountryData | _FixedAssetCountryData | |||
| _FixedAssetNatlClfn | _FixedAssetNatlClfn | |||
| _TaxDepreciationGroup | _TaxDepreciationGroup | |||
| _FinancialManagementArea | _FinancialManagementArea | |||
| _Fund | _Fund | |||
| _BudgetPeriod | _BudgetPeriod |
@AbapCatalog.sqlViewName: 'PFASSETAHSVALUE'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
define view P_FixedAssetAHSValue
with parameters
P_CurrencyRole : fis_curtp,
P_FiscalYear : fis_gjahr,
P_FiscalPeriod : fis_period_to,
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
{
key CompanyCode,
key AssetDepreciationArea,
key MasterFixedAsset,
key FixedAsset,
key AccountingDocument,
key TransactionSubitem,
key Ledger,
key FiscalYear,
key FiscalPeriod,
key SubLedgerAcctLineItemType,
key AssetAcctTransClassfctn,
key AssetAccountingKeyFigure,
key AssetAccountingKeyFigureSet,
key DebitCreditCode,
key cast('' as boolean preserving type) as KeyFigureIsZeroBalance,
LedgerFiscalYear,
FiscalYearVariant,
FiscalYearPeriod,
DepreciationFiscalPeriod,
AssetAccountingSortedKeyFigure,
LedgerGroup,
Country,
ChartOfAccounts,
CountryChartOfAccounts,
GLAccount,
AlternativeGLAccount,
GroupMasterFixedAsset,
GroupFixedAsset,
FinancialAccountType,
AccountingDocumentCreationDate,
CreationTime,
JointVentureCostRecoveryCode,
@ObjectModel.foreignKey.association: '_ChartOfDepreciation'
ChartOfDepreciation,
CostCenter,
Plant,
BusinessArea,
PersonnelNumber,
FinancialManagementArea,
Fund,
GrantID,
FunctionalArea,
BudgetPeriod,
ProfitCenter,
Segment,
FundsCenter,
AssetTransactionType,
GLBusinessTransactionType,
// Fields added from Association _CompanyCode
ControllingArea,
// Fields added from Association _AssetDepreciationArea
FinancialStatementVariant,
AccountingPrinciple,
@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,
:P_CurrencyRole as CurrencyRole,
/* Fields from ANLA */
AssetAccountDetermination,
AssetClass,
AssetCapitalizationDate,
FirstAcquisitionFiscalYear,
FirstAcquisitionFiscalPeriod,
AssetDeactivationDate,
FixedAssetGroup,
AssetSupplierName,
InvestmentOrder,
BaseUnit,
InventoryIsCounted,
LastInventoryDate,
Inventory,
Group1AssetEvaluationKey,
Group2AssetEvaluationKey,
Group3AssetEvaluationKey,
Group4AssetEvaluationKey,
Group5AssetEvaluationKey,
AssetSerialNumber,
NationalClassification,
TaxDepreciationGroup,
_WBSElement.WBSElementExternalID,
//Publish Associations
_CompanyCode,
_Country,
_CountryChartOfAccounts,
_DepreciationArea,
_ChartOfAccounts,
_ControllingArea,
_MasterFixedAsset,
_FixedAsset,
_AssetAccountDetermination,
_AssetClass,
_Ledger,
_FiscalYear,
_FiscalPeriod,
_FiscalYearPeriod,
_JournalEntry,
_SubLedgerAccLineItemType,
_LedgerGroup,
_GLAccountInChartOfAccounts,
_AlternativeGLAccount,
_AssetAcctTransClassfctn,
_FinancialAccountType,
_ChartOfDepreciation,
_FinancialStatementVersion,
_AccountingPrinciple,
_CostCenter,
_Plant,
_BusinessArea,
_ProfitCenter,
_Segment,
_FunctionalArea,
_AssetTransactionType,
_AssetKeyFigure,
_AssetKeyFigureSet,
_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
// I_FixedAssetValue.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
//Legal requirement of Asset History Sheet: Columns with zero amounts need to be displayed even when no values exist
//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_AssetKeyFigureSetSpec as AssetKeyFigureSetSpec on AssetKeyFigureSetSpec.AssetAccountingKeyFigureSet = :P_AssetAccountingKeyFigureSet
and AssetKeyFigureSetSpec.AssetAccountingKeyFigure <> I_FixedAssetValue.AssetAccountingKeyFigure
and AssetKeyFigureSetSpec.ZeroBalAmountKeyFigureIsHidden = ''
{
key CompanyCode,
key AssetDepreciationArea,
key MasterFixedAsset,
key FixedAsset,
key AccountingDocument,
key TransactionSubitem,
key Ledger,
key FiscalYear,
key FiscalPeriod,
key SubLedgerAcctLineItemType,
key AssetAcctTransClassfctn,
key AssetKeyFigureSetSpec.AssetAccountingKeyFigure,
key AssetKeyFigureSetSpec.AssetAccountingKeyFigureSet,
key DebitCreditCode,
key cast('X' as boolean preserving type) as KeyFigureIsZeroBalance,
LedgerFiscalYear,
FiscalYearVariant,
FiscalYearPeriod,
DepreciationFiscalPeriod,
AssetKeyFigureSetSpec.AssetAccountingSortedKeyFigure as AssetAccountingSortedKeyFigure,
LedgerGroup,
Country,
ChartOfAccounts,
CountryChartOfAccounts,
GLAccount,
AlternativeGLAccount,
GroupMasterFixedAsset,
GroupFixedAsset,
FinancialAccountType,
AccountingDocumentCreationDate,
CreationTime,
JointVentureCostRecoveryCode,
@ObjectModel.foreignKey.association: '_ChartOfDepreciation'
ChartOfDepreciation,
CostCenter,
Plant,
BusinessArea,
PersonnelNumber,
FinancialManagementArea,
Fund,
GrantID,
FunctionalArea,
BudgetPeriod,
ProfitCenter,
Segment,
FundsCenter,
AssetTransactionType,
GLBusinessTransactionType,
// Fields added from Association _CompanyCode
ControllingArea,
// Fields added from Association _AssetDepreciationArea
FinancialStatementVariant,
AccountingPrinciple,
@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'
cast('0' as farp_amount_display_crcy) as AmountInDisplayCurrency,
:P_CurrencyRole as CurrencyRole,
/* Fields from ANLA */
AssetAccountDetermination,
AssetClass,
AssetCapitalizationDate,
FirstAcquisitionFiscalYear,
FirstAcquisitionFiscalPeriod,
AssetDeactivationDate,
FixedAssetGroup,
AssetSupplierName,
InvestmentOrder,
BaseUnit,
InventoryIsCounted,
LastInventoryDate,
Inventory,
Group1AssetEvaluationKey,
Group2AssetEvaluationKey,
Group3AssetEvaluationKey,
Group4AssetEvaluationKey,
Group5AssetEvaluationKey,
AssetSerialNumber,
NationalClassification,
TaxDepreciationGroup,
_WBSElement.WBSElementExternalID,
//Publish Associations
_CompanyCode,
_Country,
_CountryChartOfAccounts,
_DepreciationArea,
_ChartOfAccounts,
_ControllingArea,
_MasterFixedAsset,
_FixedAsset,
_AssetAccountDetermination,
_AssetClass,
_Ledger,
_FiscalYear,
_FiscalPeriod,
_FiscalYearPeriod,
_JournalEntry,
_SubLedgerAccLineItemType,
_LedgerGroup,
_GLAccountInChartOfAccounts,
_AlternativeGLAccount,
_AssetAcctTransClassfctn,
_FinancialAccountType,
_ChartOfDepreciation,
_FinancialStatementVersion,
_AccountingPrinciple,
_CostCenter,
_Plant,
_BusinessArea,
_ProfitCenter,
_Segment,
_FunctionalArea,
_AssetTransactionType,
AssetKeyFigureSetSpec._AssetKeyFigure as _AssetKeyFigure,
AssetKeyFigureSetSpec._AssetKeyFigureSet as _AssetKeyFigureSet,
_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
//I_FixedAssetValue.IsRealDepreciationArea = 'X' //Due to performance we dont select any values from derived areas not even for BUHBKT = '4'
AssetKeyFigureSetSpec.AssetAccountingKeyFigureSet = :P_AssetAccountingKeyFigureSet
// and I_FixedAssetValue.FiscalYear = :P_FiscalYear
// and I_FixedAssetValue.FiscalPeriod <= :P_FiscalPeriod
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ASSETKEYFIGURESETSPEC",
"I_FIXEDASSETVALUEFORTOFSCLPERD",
"I_WBSELEMENTBYEXTERNALID"
],
"ASSOCIATED":
[
"I_ACCOUNTINGPRINCIPLE",
"I_ASSETACCTDETERMINATION",
"I_ASSETCLASS",
"I_ASSETKEYFIGURE",
"I_ASSETKEYFIGURESET",
"I_ASSETTRANSACTIONTYPE",
"I_BUDGETPERIOD",
"I_BUSINESSAREA",
"I_CHARTOFACCOUNTS",
"I_CHARTOFDEPRECIATION",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_COUNTRY",
"I_DEPRECIATIONAREAFORLEDGER",
"I_FINANCIALACCOUNTTYPE",
"I_FINANCIALMANAGEMENTAREA",
"I_FINANCIALSTATEMENTVERSION",
"I_FISCALPERIODFORVARIANT",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARFORVARIANT",
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_FISCALYEARPERIODFORLEDGER",
"I_FISCALYEARPERIODFORVARIANT",
"I_FISCALYEARVARIANT",
"I_FIXEDASSET",
"I_FIXEDASSETCOUNTRYDATA",
"I_FIXEDASSETGROUP",
"I_FIXEDASSETNATLCLFN",
"I_FUNCTIONALAREA",
"I_FUND",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GROUP1ASSETEVALUATIONKEY",
"I_GROUP2ASSETEVALUATIONKEY",
"I_GROUP3ASSETEVALUATIONKEY",
"I_GROUP4ASSETEVALUATIONKEY",
"I_GROUP5ASSETEVALUATIONKEY",
"I_INTERNALORDER",
"I_JOURNALENTRY",
"I_LEDGER",
"I_LEDGERGROUP",
"I_MASTERFIXEDASSET",
"I_MOVEMENTCATEGORY",
"I_PLANT",
"I_PROFITCENTER",
"I_SEGMENT",
"I_SUBLEDGERACCLINEITEMTYPE",
"I_TAXDEPRECIATIONGROUP",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_FIXEDASSETVALUEFORTOFSCLPERD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA