P_CN_CADEAcctBalanceStructure

DDL: P_CN_CADEACCTBALANCESTRUCTURE SQL: PCNACCTBALSTRU Type: view COMPOSITE

P_CN_CADEAcctBalanceStructure is a Composite CDS View in SAP S/4HANA. It reads from 4 data sources (I_CompanyCode, I_FiscalYearPeriodForLedger, I_CN_CADEGeneralInformation, P_CN_CADEGLAccountForBalance) and exposes 9 fields with key fields FinancialStatementVariant, FinancialStatementItem, FiscalYearPeriod.

Data Sources (4)

SourceAliasJoin Type
I_CompanyCode CompanyCode inner
I_FiscalYearPeriodForLedger FiscalYearPeriod left_outer
I_CN_CADEGeneralInformation GeneralInformation inner
P_CN_CADEGLAccountForBalance P_CN_CADEGLAccountForBalance from

Parameters (6)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FinancialStatementVariant versn_011
P_FiscalYear fis_gjahr
P_FromFiscalPeriod fins_fiscalperiod
P_ToFiscalPeriod fins_fiscalperiod
P_IsSpecialPeriod xfeld

Annotations (10)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PCNACCTBALSTRU view
VDM.viewType #COMPOSITE view
VDM.private true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY FinancialStatementVariant FinancialStatementVariant
KEY FinancialStatementItem FinancialStatementItem
KEY FiscalYearPeriod FiscalYearPeriod
FiscalYear FiscalYear
FiscalPeriod FiscalPeriod
GLAccountWOPrefix GLAccountWOPrefix
GLAccount GLAccount
IsGLAccount IsGLAccount
CompanyCodeCurrency I_CompanyCode Currency
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PCNACCTBALSTRU'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_CN_CADEAcctBalanceStructure 

  with parameters
    P_CompanyCode               : fis_bukrs,
    P_FinancialStatementVariant : versn_011,
    P_FiscalYear                : fis_gjahr,
    P_FromFiscalPeriod          : fins_fiscalperiod,
    P_ToFiscalPeriod            : fins_fiscalperiod,
    P_IsSpecialPeriod           : xfeld
     
  as select from P_CN_CADEGLAccountForBalance(P_FinancialStatementVariant: :P_FinancialStatementVariant)   as GLAccount 
  
  inner join I_CompanyCode as CompanyCode on CompanyCode.CompanyCode = :P_CompanyCode  
  
  inner join I_CN_CADEGeneralInformation  as GeneralInformation on GeneralInformation.CompanyCode = :P_CompanyCode
  
  left outer join I_FiscalYearPeriodForLedger as FiscalYearPeriod on FiscalYearPeriod.CompanyCode = :P_CompanyCode
                                                                  and FiscalYearPeriod.Ledger = GeneralInformation.Ledger
                                                                  and FiscalYearPeriod.FiscalYear = :P_FiscalYear
                                                                  and FiscalYearPeriod.FiscalPeriod <= :P_ToFiscalPeriod
                                                                  and FiscalYearPeriod.FiscalPeriod >= :P_FromFiscalPeriod
{
  key FinancialStatementVariant,
  key FinancialStatementItem,
  key FiscalYearPeriod,
  FiscalYear,
  FiscalPeriod,
  GLAccountWOPrefix,
  GLAccount,
  IsGLAccount,
  CompanyCode.Currency as CompanyCodeCurrency
}where FiscalYearPeriod.IsSpecialPeriod = '' or FiscalYearPeriod.IsSpecialPeriod != :P_IsSpecialPeriod

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CN_CADEGENERALINFORMATION",
"I_COMPANYCODE",
"I_FISCALYEARPERIODFORLEDGER",
"P_CN_CADEGLACCOUNTFORBALANCE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/