@EndUserText.label: 'Query with Dynamic Labels'
@AccessControl.authorizationCheck: #NOT_ALLOWED
define transient view entity ZJF_C_DynLabels_Q01
provider contract analytical_query
with parameters
@Semantics.businessDate.at: true
@Environment.systemField: #SYSTEM_DATE
P_KeyDate : vdm_v_key_date,
@EndUserText.label: 'Plan Category'
@AnalyticsDetails.query.variableSequence: 20
@AnalyticsDetails.variable: { usageType: #FILTER, referenceElement: 'PlanningCategory', mandatory: true, selectionType: #SINGLE, multipleSelections: false, defaultValue: 'BUDGET03' }
P_PlanningCategory : fcom_category
as projection on I_ActualPlanJrnlEntryItemCube
{
@AnalyticsDetails.query.axis: #ROWS
@UI.textArrangement: #TEXT_LAST
@Consumption.dynamicLabel: { label : 'Cost Center (&1)' ,
binding : [ { index : 1 , parameter : 'P_KeyDate' } ] }
CostCenter,
@AnalyticsDetails.query.axis: #FREE
GlobalCurrency,
@AnalyticsDetails.query.axis: #COLUMNS
@Semantics.amount.currencyCode: 'GlobalCurrency'
@Aggregation.default: #SUM
@EndUserText.label: 'Actual Amount'
case
when ( PlanningCategory = 'ACT01') then curr_to_decfloat_amount( AmountInGlobalCurrency )
end as ActualAmountInGlobCurrency,
@AnalyticsDetails.query.axis: #COLUMNS
@Semantics.amount.currencyCode: 'GlobalCurrency'
@Aggregation.default: #SUM
@Consumption.dynamicLabel: { label : 'Plan Amount (&1)' ,
binding : [ { index : 1 , parameter : 'P_PlanningCategory' } ] }
case
when ( PlanningCategory = $parameters.P_PlanningCategory ) then curr_to_decfloat_amount( AmountInGlobalCurrency )
end as PlanAmountInGlobCurrency,
@AnalyticsDetails.query.axis: #COLUMNS
@Semantics.amount.currencyCode: 'GlobalCurrency'
@Aggregation.default: #FORMULA
@EndUserText.label: 'Plan Actual Delta'
$projection.PlanAmountInGlobCurrency - $projection.ActualAmountInGlobCurrency as DeltaAmountInGlobCurrency
}
where Ledger = '0L' and LedgerFiscalYear = '2021'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
7 | |
7 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |