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

How to use Parameterized CDS view for Exposed association

Princejoshizal
Explorer
0 Kudos
825

Hi,

I am creating a Fiori List report with object page.
If I click on any record from List report it should navigate to object page for that record. But in my case the association to object page is from a Parameterized CDS view.

Below are CDS views

define view entity ZC_MATERIAL_GRP_INVENTORY
    as select from ZI_MATERIAL_GRP_TP2 as a
    association [0..*] to ZC_nav_material_gropping as _gropping on _gropping.Plant = $projection.Plant and 
_gropping.LU = $projection.LU 
{
  key a.MaterialGroupL1L5,
  key a.Plant,
  key a.LU,
      a.MaterialGroup                       as ProductGroup,

      /* Associations */
       _gropping

}

And view ZC_nav_material_gropping has Parameter "p_plusdays"

define view entity ZC_nav_material_gropping
  with parameters
    @EndUserText.label: 'Next Days'
    @Consumption.defaultValue: '14'
    p_plusdays : int1
  as select from ZI_Material_Groupping( p_plusdays: 14 )
{
  key Plant,
  key MaterialGroup                       as ProductGroup,
  key LU,
      CurrentStock,
      some more fields...
}

 

List page is loading correctly but when it navigate to object page it do not show anything:
Below is object page:

Princejoshizal_0-1727709110547.png

 

So, wanted to know how to pass parameter to an exposed association?


Regards,
Prince

Accepted Solutions (0)

Answers (1)

Answers (1)

SerhiiMartynkov
Product and Topic Expert
Product and Topic Expert

Hi,

I recommend you investigate this discussion, especially the comments section

How to use a CDS view with parameters with a CDS j... - SAP Community

I think its related to your problem.

BR, Serhii.