Get information about how to use data points to display references to persons responsible and to reference periods on SAP Fiori UIs.
... define view ZExample_SalesOrdersByCustomer as select from ... as so { key so.buyer_guid as BuyerGuid, @Semantics.currencyCode: true so.currency_code as CurrencyCode, @UI.dataPoint: { title: 'Gross Amount', description: 'Gross Amount per Customer', longDescription: 'The gross amount per customer ...', valueFormat: { scaleFactor: 1000, numberOfFractionalDigits: 1 }, referencePeriod: { description: '2015 Q3' }, responsibleName: 'John Doe' } @Semantics.amount.currencyCode: 'CurrencyCode' so.actual_amount as ActualAmount }
These parameters have to be aliased in the element list before they can be used in the @UI.dataPoint annotation. The responsible property must refer to a to-one-association. The target entity of this association should contain the contact data of the person responsible.
... define view ZExample_SalesOrdersByCust with parameters p_StartDate : abap.dats, p_EndDate : abap.dats as select from ... as so association [0..1] to Employees as _PersonResponsible on _PersonResponsible.EmployeeId = $projection.PersonResponsible { ... $parameters.p_StartDate as StartDate, -- Alias is required for annotation $parameters.p_EndDate as EndDate, -- Alias is required for annotation so.person_responsible as PersonResponsible, @Semantics.currencyCode: true so.currency_code as CurrencyCode, @UI.dataPoint: { title: 'Gross Amount', referencePeriod: { start: 'StartDate', -- Reference to element end: 'EndDate' -- Reference to element }, responsible: '_PersonResponsible' -- Reference to association } @Semantics.amount.currencyCode: 'CurrencyCode' @DefaultAggregation: #SUM so.actual_amount as ActualAmount, _PersonResponsible } where so.validity_date >= $parameters.p_StartDate and so.validity_date <= $parameters.p_EndDate
For a definition of element list, see section Glossary linked below.