Skip to Content
1
May 16, 2020 at 07:55 PM

Not Able to get F4 Help in Analytics query

477 Views

Hi Gurus,

I am new to Analytics query and i am trying to get F4 Help for my Analytics query. I have built a text and value help view and then used this in analytcs query, but F4 help is not appearing in selection screen. Below is the code. The F4 Help of material is not working. I know we can use I_material for search help but i am trying this as i need search help for other custom objects. Please let me know where i am making mistake.

I have gone through multiple blogs but not able to get a clear picture.

Text view

@AbapCatalog.sqlViewName: 'ZVTESTM1' @ObjectModel.dataCategory: #TEXT @ObjectModel.representativeKey: 'material' @Search.searchable: true define view ztestm1
  as select from makt as textprovider { @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
  key textprovider.matnr              as material,
      @Semantics.language: true -- identifies the language
  key textprovider.spras              as Language,
      @Semantics.text: true            -- identifies the text field
    --  @Search.defaultSearchElement: true
    --  @Search.fuzzinessThreshold: 0.8
      textprovider.maktx              as Name
}

Search help view

@AbapCatalog.sqlViewName: 'ZVTESTM2'
@Search.searchable: true
@EndUserText.label: 'Material'
define view ztestm2 as select from mara as m1
association [0..*] to ztestm1 as _Text
        on $projection.material = _Text.material
        {
         @ObjectModel.text.association: '_Text'
    @Search.defaultSearchElement: true
    key m1.matnr   as material,
    -- association 
    _Text
}

Cube View

@AbapCatalog.sqlViewName: 'ZCUBE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType:#BASIC
@Analytics.dataCategory: #CUBE
@EndUserText.label: 'Cube'
define view ZTEST_BW_CUBE as select from vbap as v1

 {
@EndUserText.label: 'Order'
key vbeln,
@EndUserText.label: 'Item'
key posnr,
@EndUserText.label: 'Material'
--@ObjectModel.foreignKey.association: '_material'
matnr as material,
@Semantics.currencyCode: true
@EndUserText.label: 'currency code'
waerk,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'waerk'
@EndUserText.label: 'Amount'
netwr,
@Semantics.unitOfMeasure: true
meins,
@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'meins'
smeng
}

Analytics Query

@AbapCatalog.sqlViewName: 'ZVTEST4'
@Analytics.query: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
--@EndUserText.label: 'Query'
@AbapCatalog.compiler.compareFilter: true
--@OData.publish:true
define view ztest4 as select from ZTEST_BW_CUBE   
as v1 
association [0..1] to ztestm2 as _material on $projection.material = _material.material
{
--@AnalyticsDetails.query.axis: #ROWS
@EndUserText.label: 'Order'
key vbeln,
--@AnalyticsDetails.query.axis: #ROWS
@EndUserText.label: 'Item'
key posnr,
@EndUserText.label: 'Material'
--@AnalyticsDetails.query.axis: #ROWS
@Consumption.valueHelp: '_material'
@ObjectModel.foreignKey.association: '_material'
@AnalyticsDetails.query.display: #KEY_TEXT
@Consumption.filter:{selectionType:#SINGLE,multipleSelections:true,mandatory:false}
material,
@Semantics.currencyCode: true
@EndUserText.label: 'currency code'
--@AnalyticsDetails.query.axis: #COLUMNS
waerk,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'waerk'
@EndUserText.label: 'Amount'
--@AnalyticsDetails.query.axis: #COLUMNS
netwr,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_QuantityUnitValueHelp'
@Consumption.filter:{selectionType:#SINGLE,multipleSelections:true,mandatory:false}
    v1.meins, 
@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'meins'
smeng
}