@EndUserText.label: 'Query with hierarchy selection'
@AccessControl.authorizationCheck: #NOT_ALLOWED
define transient view entity ZJF_C_HIERARCHIES_Q01
provider contract analytical_query
with parameters
@Consumption.hidden :true
@AnalyticsDetails.variable: {
usageType: #FILTER, referenceElement: 'CompanyCode', mandatory: true, selectionType: #HIERARCHY_NODE, multipleSelections: false,
defaultHierarchyNode: { nodeType: 'HierarchyNode', node: [{ element: 'HierarchyNode', value: '0EMEA' }] },
hierarchyBinding: [{ type: #CONSTANT , value: 'HCCD/ZTESTCC' }]
}
P_CompanyCode_EMEA : fis_bukrs,
@Consumption.hidden :false
@AnalyticsDetails.variable: {
usageType: #FILTER, referenceElement: 'CompanyCode', mandatory: true, selectionType: #HIERARCHY_NODE, multipleSelections: false,
defaultHierarchyNode: { nodeType: 'HierarchyNode', node: [{ element: 'HierarchyNode', value: '0AMER' }] },
hierarchyBinding: [{ type: #CONSTANT , value: 'HCCD/ZTESTCC' }]
}
@EndUserText.label: 'Comparison Region'
P_CompanyCode_Comp : fis_bukrs,
@AnalyticsDetails.variable: { usageType: #FILTER, referenceElement: 'GLAccount', mandatory: true, selectionType: #SINGLE, multipleSelections: false, defaultValue: 'FPA1'}
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_GLAccountHierarchyStdVH', element: 'GLAccountHierarchy' }}]
P_GLAccountHierarchy : fis_glaccthier
as projection on I_GLAccountLineItem
{
@AnalyticsDetails.query.axis: #FREE
@UI.textArrangement: #TEXT_LAST
CompanyCode,
@AnalyticsDetails.query.axis: #FREE
GlobalCurrency,
@AnalyticsDetails.query.axis: #FREE
FiscalYearPeriod,
@AnalyticsDetails.query.axis: #FREE
FiscalYearVariant,
@UI.textArrangement: #TEXT_ONLY
@AnalyticsDetails.query: {
axis: #ROWS,
displayHierarchy: #ON,
hierarchyInitialLevel: 2,
hierarchyBinding: [ {type: #PARAMETER, value: 'P_GLAccountHierarchy' } ],
hierarchySettings: { childNodePosition: #ABOVE }
}
GLAccount,
@AnalyticsDetails.query.axis: #FREE
virtual VirtualCurrency : abap.cuky,
@AnalyticsDetails.query.axis: #COLUMNS
@Semantics.amount.currencyCode: 'VirtualCurrency'
@Aggregation.default: #SUM
@EndUserText.label: 'EMEA Region'
case
when ( CompanyCode = $parameters.P_CompanyCode_EMEA ) then curr_to_decfloat_amount( AmountInGlobalCurrency )
end as EMEAAmount,
@AnalyticsDetails.query.axis: #COLUMNS
@Semantics.amount.currencyCode: 'VirtualCurrency'
@Aggregation.default: #SUM
@EndUserText.label: 'Comparison Region'
case
when ( CompanyCode = $parameters.P_CompanyCode_Comp ) then curr_to_decfloat_amount( AmountInGlobalCurrency )
end as CompRegionAmount
}
where
Ledger = '0L'
and FiscalYearVariant = 'K4'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |