P_GetAllChildSemanticTag is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_SemanticTag, R_ProjectSemTagGLAccount) and exposes 6 fields with key fields ProjectInternalID, SemanticTag, FinancialStatementVariant.
@AbapCatalog.sqlViewName: 'PGETALCHLDTAG'
@AbapCatalog.compiler.compareFilter: true@VDM.viewType: #COMPOSITE@AbapCatalog.preserveKey: true@AccessControl.authorizationCheck: #NOT_REQUIRED@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel.usageType.serviceQuality: #C@ObjectModel.usageType.sizeCategory: #M@ObjectModel.usageType.dataClass: #MIXED@VDM.private: true//@EndUserText.label: 'Fetches all the child semantic tag for Act Cost'
defineview P_GetAllChildSemanticTag
//CE2308: Begin of change: Inclusion of Global Hierarchy
//asselectfrom I_FSItemBySemanticTag as _Semtag //P_SemTagFAGL2HRRP
asselectfrom R_ProjectSemTagGLAccount as _Semtag
//CE2308: End of change: Inclusion of Global Hierarchy
innerjoin I_SemanticTag as _ChildTag on _Semtag.SemanticTag = _ChildTag.SemanticTag
association to P_GetParSemanticTagForProj as _ParTag on _ChildTag.ParentSemanticTag = _ParTag.ParentSemanticTag
{
key _ParTag.ProjectInternalID,
key _Semtag.SemanticTag,
//CE2308: Begin of change: Inclusion of Global Hierarchy
//key _Semtag.FinancialStatementVariant,
key _Semtag.GLAccountHierarchy as FinancialStatementVariant,
//CE2308: End of change: Inclusion of Global Hierarchy
HierarchyNode,
'' as SemanticTagIsBudgetRelevant,
_ParTag.ProjectIsBudgetRelevant
}
where _Semtag.SemanticTag <> 'ACT_COST'
and _ChildTag.ParentSemanticTag = 'ACT_COST'
//and _Semtag.FinancialStatementVariant = 'INT'
and _ParTag.SemanticTagIsBudgetRelevant is initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SEMANTICTAG",
"P_GETPARSEMANTICTAGFORPROJ",
"R_PROJECTSEMTAGGLACCOUNT"
],
"ASSOCIATED":
[
"P_GETPARSEMANTICTAGFORPROJ"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/