@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":""
}
}*/