cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Passing default user parameter value in KPI Drilldown report

AbhishekSharma
Active Contributor
0 Likes
1,843

Hi Gurus,

Please help, how to pass user default parameter value to KPI tile/Drilldown report. Please find below screenshot for what value I am trying to access in Tile/Drilldown report.

When user get into the Fiori account user should be able to get records from his/her default Warehouse.

As per my knowledge this can be done by maintaining values in Filter and Parameter section but I don't know what value to maintained and what changes are needed in my CDS view (apart from making it parameterized).

If there is any reference, please suggest.

Thanks-

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

AbhishekSharma
Active Contributor

Hi ama_touzani13

I got it working as below... Posting solution may be helpful for someone...

@Consumption : Helped solving problem.
@AbapCatalog.sqlViewName: 'ZTESTPARAM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'CDS with Parameter test'
@VDM.viewType: #CONSUMPTION
@OData.publish: true

define view ZTEST_PARAM
    with parameters 
    
    @Consumption.hidden: true
    @Consumption.derivation: { lookupEntity: 'I_UserParameter_F2200',
    resultElement: 'UserParameterValue', binding: [
    { targetElement : 'UserParameter' , type : #CONSTANT, value : '/SCWM/LGN' } ]
    }
    p_LGNUM : /scwm/lgnum
as select from ZTEST_PARAM_I (p_lgnum : $parameters.p_LGNUM){
    
    WarehouseNo,
    WarehouseTask,
    WarehouseProcessCategory,
    MaterialId,
    DocumentCategory,
    USERNM,
    @DefaultAggregation:  #SUM
    cast ( 1 as abap.int4 ) as countRecord
}

Thanks-

Abhishek

ama_touzani13
Participant
0 Likes

Thanks for Sharing.

sweta1196
Explorer
0 Likes
Hello Abhishek,
sweta1196
Explorer
0 Likes
What is 'I_UserParameter_F2200' passed to lookupEntity

Answers (0)