P_CN_CADEGLAccountFSVItem

DDL: P_CN_CADEGLACCOUNTFSVITEM SQL: PCADEGLACTFSVITM Type: view CONSUMPTION

P_CN_CADEGLAccountFSVItem is a Consumption CDS View in SAP S/4HANA. It reads from 9 data sources and exposes 19 fields with key fields CompanyCode, FinancialStatementVariant, ChartOfAccounts, FinancialStatementItem.

Data Sources (9)

SourceAliasJoin Type
I_CN_CADEFinancialStatementItm FinancialStatementItem from
I_FinancialStatementItemText FinancialStatementItemText left_outer
I_FinancialStatementVersion FinancialStatementVersion inner
P_CN_CADEFSVITMWPrefix FinStmntItemWPrefix inner
I_GLAccountInChartOfAccounts GLAccountInChartOfAccounts left_outer
I_GLAccountInChartOfAccounts GLAccountInChartOfAccounts2 left_outer
I_GLAccountInCompanyCode GLAccountInCompanyCode left_outer
P_CN_CADEGLAcctWDesc P_CN_CADEGLAcctWDesc left_outer
P_CN_CADEGLAcctWDesc P_CN_CADEGLAcctWDesc left_outer

Parameters (3)

NameTypeDefault
P_CompanyCode bukrs
P_FinancialStatementVariant versn_011
P_Language sylangu

Annotations (10)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PCADEGLACTFSVITM view
VDM.private true view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #A view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode
KEY FinancialStatementVariant I_CN_CADEFinancialStatementItm FinancialStatementVariant
KEY ChartOfAccounts I_FinancialStatementVersion ChartOfAccounts
KEY FinancialStatementItem I_CN_CADEFinancialStatementItm FinancialStatementItem
GLAccount I_GLAccountInCompanyCode GLAccount
GLAccountType I_GLAccountInChartOfAccounts GLAccountType
ReconciliationAccountType I_GLAccountInCompanyCode ReconciliationAccountType
GLAccountName GLAccountWDesc GLAccountName
GLAccountGroup I_GLAccountInChartOfAccounts GLAccountGroup
GLAccountGroupName GLAccountWDesc GLAccountGroupName
AlternativeGLAccountName GLAccountWDesc2 GLAccountName
AlternativeGLAccountGroup I_GLAccountInChartOfAccounts GLAccountGroup
AlternativeGLAccountGroupName GLAccountWDesc2 GLAccountGroupName
FSVItemWithPrefix P_CN_CADEFSVITMWPrefix FSVItemWithPrefix
FinStatementItemDescription I_FinancialStatementItemText FinStatementItemDescription
FSVItemGLAccountType
CN_CADEAccountTypeIndicator
SignIsInverted I_CN_CADEFinancialStatementItm SignIsInverted
GLAccountHierarchy
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PCADEGLACTFSVITM'
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass:  #MASTER
@ObjectModel.usageType.serviceQuality: #A
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_CN_CADEGLAccountFSVItem

  with parameters
    P_CompanyCode               : bukrs,
    P_FinancialStatementVariant : versn_011,
    @Environment.systemField: #SYSTEM_LANGUAGE
    P_Language                  : sylangu

  as select from    I_CN_CADEFinancialStatementItm                as FinancialStatementItem
    inner join      I_FinancialStatementVersion                   as FinancialStatementVersion  on FinancialStatementItem.FinancialStatementVariant = FinancialStatementVersion.FinancialStatementVariant

    inner join      P_CN_CADEFSVITMWPrefix                        as FinStmntItemWPrefix        on  FinancialStatementItem.FinancialStatementVariant = FinStmntItemWPrefix.FinancialStatementVariant
                                                                                                and FinancialStatementItem.FinancialStatementItem    = FinStmntItemWPrefix.FinancialStatementItem

    left outer join I_FinancialStatementItemText                  as FinancialStatementItemText on  FinancialStatementItemText.FinancialStatementVariant = FinancialStatementItem.FinancialStatementVariant
                                                                                                and FinancialStatementItemText.FinancialStatementItem    = FinancialStatementItem.FinancialStatementItem
                                                                                                and FinancialStatementItemText.Language                  = :P_Language

    left outer join I_GLAccountInCompanyCode                      as GLAccountInCompanyCode     on  GLAccountInCompanyCode.CompanyCode = :P_CompanyCode
                                                                                                and GLAccountInCompanyCode.GLAccount   = FinStmntItemWPrefix.FSVItemWithPrefix

    left outer join I_GLAccountInChartOfAccounts                  as GLAccountInChartOfAccounts on GLAccountInChartOfAccounts.ChartOfAccounts = FinancialStatementVersion.ChartOfAccounts
                                                                                                and GLAccountInChartOfAccounts.GLAccount = GLAccountInCompanyCode.GLAccount
    left outer join I_GLAccountInChartOfAccounts                  as GLAccountInChartOfAccounts2 on GLAccountInChartOfAccounts.ChartOfAccounts = FinancialStatementVersion.ChartOfAccounts
                                                                                                and GLAccountInChartOfAccounts.GLAccount = GLAccountInCompanyCode.AlternativeGLAccount

    left outer join P_CN_CADEGLAcctWDesc(P_Language: :P_Language) as GLAccountWDesc             on  GLAccountInCompanyCode.GLAccount                 = GLAccountWDesc.GLAccount
                                                                                                and FinancialStatementItem.FinancialStatementVariant = GLAccountWDesc.FinancialStatementVariant

    left outer join P_CN_CADEGLAcctWDesc(P_Language: :P_Language) as GLAccountWDesc2            on  GLAccountInCompanyCode.AlternativeGLAccount      = GLAccountWDesc2.GLAccount
                                                                                                and FinancialStatementItem.FinancialStatementVariant = GLAccountWDesc2.FinancialStatementVariant
{
  key :P_CompanyCode                                                                                 as  CompanyCode,
  key FinancialStatementItem.FinancialStatementVariant,
  key FinancialStatementVersion.ChartOfAccounts,
  key FinancialStatementItem.FinancialStatementItem,

      GLAccountInCompanyCode.GLAccount,
      GLAccountInChartOfAccounts.GLAccountType,
      GLAccountInCompanyCode.ReconciliationAccountType,
      
      GLAccountWDesc.GLAccountName,
      GLAccountInChartOfAccounts.GLAccountGroup,
      GLAccountWDesc.GLAccountGroupName,

      case 
        when GLAccountInCompanyCode.AlternativeGLAccount is null then ''
        else GLAccountInCompanyCode.AlternativeGLAccount end as AlternativeGLAccount,
      GLAccountWDesc2.GLAccountName                                                                  as  AlternativeGLAccountName,
      GLAccountInChartOfAccounts2.GLAccountGroup                                                       as  AlternativeGLAccountGroup,
      GLAccountWDesc2.GLAccountGroupName                                                             as  AlternativeGLAccountGroupName,

      FinStmntItemWPrefix.FSVItemWithPrefix,
      FinancialStatementItemText.FinStatementItemDescription,
      replace(left(FinStatementItemDescription,5),'#','')                                            as  FSVItemGLAccountType,
      left(ltrim(FinStatementItemDescription,' '),1)                                                 as  CN_CADEAccountTypeIndicator,
      FinancialStatementItem.SignIsInverted,
      cast(FinancialStatementItem.FinStatementHierarchyLevelVal as abap.int1) - cast(1 as abap.int1) as  GLAccountHierarchy
}
where
      FinancialStatementItem.FinancialStatementVariant = :P_FinancialStatementVariant
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinancialStatementAssetsItem
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinancialStatementNetLossItem
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinancialStatementNotesItem
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinancialStatementOrphansItem
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinStatementLiabilitiesItem
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinStatementNetProfitItem
  and FinancialStatementItem.FinancialStatementItem != FinancialStatementVersion.FinStatementProfitAndLossItem

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CN_CADEFINANCIALSTATEMENTITM",
"I_FINANCIALSTATEMENTITEMTEXT",
"I_FINANCIALSTATEMENTVERSION",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GLACCOUNTINCOMPANYCODE",
"P_CN_CADEFSVITMWPREFIX",
"P_CN_CADEGLACCTWDESC"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/