P_AUDIT_AT_AstTransByKeyFigs

DDL: P_AUDIT_AT_ASTTRANSBYKEYFIGS SQL: PAUDITATATBYKF Type: view COMPOSITE

P_AUDIT_AT_AstTransByKeyFigs is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_AssetBalanceCube) and exposes 52 fields with key fields CompanyCode, AssetDepreciationArea, MasterFixedAsset, FixedAsset, Ledger. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_AssetBalanceCube I_AssetBalanceCube from

Parameters (4)

NameTypeDefault
P_AssetAccountingKeyFigureSet faa_key_figure_set
P_FiscalYear fis_gjahr
P_FiscalPeriod fis_poper
P_KeyDate fagl_keydate

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_AssetBalanceSheetAccount _BalanceSheetAccount $projection.CompanyCode = _BalanceSheetAccount.CompanyCode and $projection.AssetAccountDetermination = _BalanceSheetAccount.AssetAccountDetermination and $projection.AssetDepreciationArea = _BalanceSheetAccount.AssetRealDepreciationArea
[0..1] I_GLAccountInChartOfAccounts _AcqnProdnCostGLAccount $projection.ChartOfAccounts = _AcqnProdnCostGLAccount.ChartOfAccounts and $projection.AcqnProdnCostGLAccount = _AcqnProdnCostGLAccount.GLAccount
[0..1] I_FixedAssetLineItem _FixedAssetLineItem $projection.AssetDepreciationArea = _FixedAssetLineItem.AssetDepreciationArea and $projection.CompanyCode = _FixedAssetLineItem.CompanyCode and $projection.FiscalYear = _FixedAssetLineItem.FiscalYear and $projection.MasterFixedAsset = _FixedAssetLineItem.MasterFixedAsset and $projection.FixedAsset = _FixedAssetLineItem.FixedAsset and $projection.SubLedgerAcctLineItemType = _FixedAssetLineItem.SubLedgerAcctLineItemType and $projection.FiscalPeriod = _FixedAssetLineItem.FiscalPeriod and $projection.LedgerGroup = _FixedAssetLineItem.LedgerGroup and $projection.AccountingDocument = _FixedAssetLineItem.AccountingDocument and $projection.Ledger = _FixedAssetLineItem.Ledger and $projection.TransactionSubitem = _FixedAssetLineItem.TransactionSubitem and $projection.DebitCreditCode = _FixedAssetLineItem.DebitCreditCode

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PAUDITATATBYKF view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AssetDepreciationArea AssetDepreciationArea
KEY MasterFixedAsset MasterFixedAsset
KEY FixedAsset FixedAsset
KEY Ledger Ledger
KEY FiscalYear FiscalYear
KEY AssetAccountingKeyFigure AssetAccountingKeyFigure
KEY AssetAccountingKeyFigureSet AssetAccountingKeyFigureSet
KEY AccountingDocument AccountingDocument
KEY CurrencyRole CurrencyRole
KEY SubLedgerAcctLineItemType SubLedgerAcctLineItemType
KEY TransactionSubitem TransactionSubitem
KEY FiscalPeriod FiscalPeriod
KEY DebitCreditCode DebitCreditCode
LedgerGroup LedgerGroup
FiscalYearVariant FiscalYearVariant
LedgerFiscalYear LedgerFiscalYear
PostingDate _FixedAssetLineItem PostingDate
AssetValueDate _FixedAssetLineItem AssetValueDate
DocumentItemText _FixedAssetLineItem DocumentItemText
ReferenceDocument _FixedAssetLineItem ReferenceDocument
Quantity _FixedAssetLineItem Quantity
BaseUnit BaseUnit
AssetAcctgKeyFigureSortSqnc _AssetSortedKeyFigureSetSpec AssetAcctgKeyFigureSortSqnc
AssetAuthorizationContext AssetAuthorizationContext
AssetClass AssetClass
AssetAccountDetermination AssetAccountDetermination
ChartOfAccounts ChartOfAccounts
AcqnProdnCostGLAccount _BalanceSheetAccount AcqnProdnCostGLAccount
SelectedCurrencyBranch SelectedCurrencyBranch
DisplayCurrency DisplayCurrency
AmountInDisplayCurrency
_CompanyCode _CompanyCode
_DepreciationArea _DepreciationArea
_MasterFixedAsset _MasterFixedAsset
_FixedAsset _FixedAsset
_Ledger _Ledger
_FiscalYear _FiscalYear
_AssetKeyFigure _AssetKeyFigure
_AssetKeyFigureSet _AssetKeyFigureSet
_JournalEntry _JournalEntry
_CurrencyRole _CurrencyRole
_SubLedgerAccLineItemType _SubLedgerAccLineItemType
_FiscalPeriodForVariant _FiscalPeriodForVariant
_LedgerGroup _LedgerGroup
_FiscalYearVariant _FiscalYearVariant
_AssetClass _AssetClass
_AssetAccountDetermination _AssetAccountDetermination
_ChartOfAccounts _ChartOfAccounts
_AcqnProdnCostGLAccount _AcqnProdnCostGLAccount
_SelectedCurrencyBranch _SelectedCurrencyBranch
_UnitOfMeasure _UnitOfMeasure
@AbapCatalog.sqlViewName: 'PAUDITATATBYKF'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #TRANSACTIONAL

// sum AmountInDisplayCurrency by columns which is needed to expand in P_AUDIT_AT_AstTransToKeyFigs by key figures

define view P_AUDIT_AT_AstTransByKeyFigs
  with parameters
    P_AssetAccountingKeyFigureSet : faa_key_figure_set,
    P_FiscalYear                  : fis_gjahr,
    P_FiscalPeriod                : fis_poper,
    P_KeyDate                     : fagl_keydate

  as select from I_AssetBalanceCube( P_AssetAccountingKeyFigureSet: :P_AssetAccountingKeyFigureSet,  P_FiscalYear: :P_FiscalYear , P_FiscalPeriod: :P_FiscalPeriod, P_KeyDate: :P_KeyDate )
  association [0..1] to I_AssetBalanceSheetAccount   as _BalanceSheetAccount    on  $projection.CompanyCode               = _BalanceSheetAccount.CompanyCode
                                                                                and $projection.AssetAccountDetermination = _BalanceSheetAccount.AssetAccountDetermination
                                                                                and $projection.AssetDepreciationArea     = _BalanceSheetAccount.AssetRealDepreciationArea
  association [0..1] to I_GLAccountInChartOfAccounts as _AcqnProdnCostGLAccount on  $projection.ChartOfAccounts        = _AcqnProdnCostGLAccount.ChartOfAccounts
                                                                                and $projection.AcqnProdnCostGLAccount = _AcqnProdnCostGLAccount.GLAccount
  association [0..1] to I_FixedAssetLineItem         as _FixedAssetLineItem     on  $projection.AssetDepreciationArea     = _FixedAssetLineItem.AssetDepreciationArea
                                                                                and $projection.CompanyCode               = _FixedAssetLineItem.CompanyCode
                                                                                and $projection.FiscalYear                = _FixedAssetLineItem.FiscalYear
                                                                                and $projection.MasterFixedAsset          = _FixedAssetLineItem.MasterFixedAsset
                                                                                and $projection.FixedAsset                = _FixedAssetLineItem.FixedAsset
                                                                                and $projection.SubLedgerAcctLineItemType = _FixedAssetLineItem.SubLedgerAcctLineItemType
                                                                                and $projection.FiscalPeriod              = _FixedAssetLineItem.FiscalPeriod
                                                                                and $projection.LedgerGroup               = _FixedAssetLineItem.LedgerGroup
                                                                                and $projection.AccountingDocument        = _FixedAssetLineItem.AccountingDocument
                                                                                and $projection.Ledger                    = _FixedAssetLineItem.Ledger
                                                                                and $projection.TransactionSubitem        = _FixedAssetLineItem.TransactionSubitem
                                                                                and $projection.DebitCreditCode           = _FixedAssetLineItem.DebitCreditCode
{
       @ObjectModel.foreignKey.association: '_CompanyCode'
  key  CompanyCode,
       @ObjectModel.foreignKey.association: '_DepreciationArea'
  key  AssetDepreciationArea,
       @ObjectModel.foreignKey.association: '_MasterFixedAsset'
  key  MasterFixedAsset,
       @ObjectModel.foreignKey.association: '_FixedAsset'
  key  FixedAsset,
       @ObjectModel.foreignKey.association: '_Ledger'
  key  Ledger,
       @ObjectModel.foreignKey.association: '_FiscalYear'
  key  FiscalYear,
       @ObjectModel.foreignKey.association: '_AssetKeyFigure'
  key  AssetAccountingKeyFigure,
       @ObjectModel.foreignKey.association: '_AssetKeyFigureSet'
  key  AssetAccountingKeyFigureSet,
       @ObjectModel.foreignKey.association: '_JournalEntry'
  key  AccountingDocument,
       @ObjectModel.foreignKey.association: '_CurrencyRole'
  key  CurrencyRole,
       // following keys are needed to get content from I_FixedAssetLineItem

       @ObjectModel.foreignKey.association: '_SubledgerAccLineItemType'
  key  SubLedgerAcctLineItemType,
  key  TransactionSubitem,
       @ObjectModel.foreignKey.association: '_FiscalPeriodForVariant'
  key  FiscalPeriod,
  key  DebitCreditCode,
       @ObjectModel.foreignKey.association: '_LedgerGroup'
       LedgerGroup,

       // for _FiscalPeriodForVariant

       @ObjectModel.foreignKey.association: '_FiscalYearVariant'
       @Semantics.fiscal.yearVariant: true
       FiscalYearVariant,
       @Semantics.fiscal.year: true
       @ObjectModel.foreignKey.association: null
       LedgerFiscalYear,

       _FixedAssetLineItem.PostingDate                          as PostingDate,
       _FixedAssetLineItem.AssetValueDate                       as AssetValueDate,
       _FixedAssetLineItem.DocumentItemText                     as DocumentItemText,
       _FixedAssetLineItem.ReferenceDocument                    as ReferenceDocument,
       @Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }
       _FixedAssetLineItem.Quantity                             as Quantity,

       @ObjectModel.foreignKey.association: '_UnitOfMeasure'
       BaseUnit                                                 as BaseUnit,

       _AssetSortedKeyFigureSetSpec.AssetAcctgKeyFigureSortSqnc as AssetAcctgKeyFigureSortSqnc,

       @Consumption.hidden: true
       AssetAuthorizationContext, //Needed for DCL

       @ObjectModel.foreignKey.association: '_AssetClass'
       AssetClass,
       @ObjectModel.foreignKey.association: '_AssetAccountDetermination'
       AssetAccountDetermination,

       @ObjectModel.foreignKey.association: '_ChartOfAccounts'
       ChartOfAccounts,
       @ObjectModel.foreignKey.association: '_AcqnProdnCostGLAccount'
       _BalanceSheetAccount.AcqnProdnCostGLAccount              as AcqnProdnCostGLAccount,

       @ObjectModel.foreignKey.association: '_SelectedCurrencyBranch'
       @Environment.sql.passValue : true
       SelectedCurrencyBranch,
       @Semantics.currencyCode:true
       DisplayCurrency,
       @Semantics.amount.currencyCode: 'DisplayCurrency'
       sum(AmountInDisplayCurrency)                             as AmountInDisplayCurrency,

       /*Associations */
       _CompanyCode,
       _DepreciationArea,
       _MasterFixedAsset,
       _FixedAsset,
       _Ledger,
       _FiscalYear,
       _AssetKeyFigure,
       _AssetKeyFigureSet,
       _JournalEntry,
       _CurrencyRole,
       _SubLedgerAccLineItemType,
       _FiscalPeriodForVariant,
       _LedgerGroup,
       _FiscalYearVariant,
       _AssetClass,
       _AssetAccountDetermination,
       _ChartOfAccounts,
       _AcqnProdnCostGLAccount,
       _SelectedCurrencyBranch,
       _UnitOfMeasure
}
group by
  CompanyCode,
  AssetDepreciationArea,
  MasterFixedAsset,
  FixedAsset,
  Ledger,
  FiscalYear,
  AssetAccountingKeyFigure,
  AssetAccountingKeyFigureSet,
  AccountingDocument,
  CurrencyRole,
  _AssetSortedKeyFigureSetSpec.AssetAcctgKeyFigureSortSqnc,
  AssetAuthorizationContext,
  AssetClass,
  AssetAccountDetermination,
  ChartOfAccounts,
  _BalanceSheetAccount.AcqnProdnCostGLAccount,
  SelectedCurrencyBranch,
  DisplayCurrency,
  SubLedgerAcctLineItemType,
  TransactionSubitem,
  _FixedAssetLineItem.AssetValueDate,
  _FixedAssetLineItem.PostingDate,
  _FixedAssetLineItem.DocumentItemText,
  _FixedAssetLineItem.ReferenceDocument,
  _FixedAssetLineItem.Quantity,
  BaseUnit,
  FiscalPeriod,
  DebitCreditCode,
  LedgerGroup,
  FiscalYearVariant,
  LedgerFiscalYear
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ASSETBALANCECUBE",
"I_ASSETBALANCESHEETACCOUNT",
"I_ASSETSORTEDKEYFIGURESETSPEC",
"I_FIXEDASSETLINEITEM"
],
"ASSOCIATED":
[
"I_ASSETACCTDETERMINATION",
"I_ASSETBALANCESHEETACCOUNT",
"I_ASSETCLASS",
"I_ASSETKEYFIGURE",
"I_ASSETKEYFIGURESET",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CURRENCYROLE",
"I_DEPRECIATIONAREAFORLEDGER",
"I_FISCALPERIODFORVARIANT",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARVARIANT",
"I_FIXEDASSET",
"I_FIXEDASSETLINEITEM",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_JOURNALENTRY",
"I_LEDGER",
"I_LEDGERGROUP",
"I_MASTERFIXEDASSET",
"I_SELECTEDCURRENCYBRANCH",
"I_SUBLEDGERACCLINEITEMTYPE",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_ASSETBALANCECUBE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/