Skip to Content

Fiori Elements List report- Selection fields(Smart Filterbar) sharing filter values

Dear All,

 

Foreground:

Users wanted to pass the filters from one selection field to another selection field in the List report app that was developed.

Steps user wants to perform:

step 1: User selects the company code in selection field 1.

step 2: when user open the help for selection field 2, it should take the company code in selection field 1 and perform the search in selection field 2 help.

 

Solution:

Here we dont have the required sap components & upgrades in our system to use the latest abap programming model achieve this., so went a head using the annotations provided by SAP Webide.

 

The solution given by SAP is pretty neat and simple. By using the annotation ValueListParameterIn.

I will show clearly with the below example.

  1. Create annotation for the property:
  2. Now create the Value list annotation for the same
  3. In the above screen shot, I’ve added ValueListParameterIn annotation, which again has two properties ‘LocalDataProperty’ & ‘ValueListProperty’
  4. ‘LocalDataProperty’ is used to get the filters that are available from the filterbar, here I mentioned as ‘Bukrs’ which the property of the my list report entityset.
  5. ‘ValueListProperty’ is the property to which the filters from the mainentityset needs to be passed in order to perform the search.

Once you add this, we are good to go, we can pass multiple filters as well by adding multiple ‘valuelistparmeterin’ annotation.

The same can also be done from the SAP odata gateway annotation editor as well.

 

Hope this will be useful for someone who is searching for similar requirement.

 

Thanks & Best Regards,

Mahesh

15 Comments
You must be Logged on to comment or reply to a post.
  • Hi Mahesh,

    Is it possible to also show the company code also as one of the value in the items List?

    We have a similar requirement, where I am not able to show the company code in the items list( similar to the one in the screen you have shared).

    Do you have any idea how may we show that up?

     

    Thanks,

    Shiny

  • Hi Mahesh,

    Really useful blog. Thanks for sharing the information.

    I have a requirement like inside the Smart Filter Field’s Value help of a Standard List Report Template, i need to define a Tree table to display the search results. Kindly guide me how to control the tableType property inside that value help request.

     

    Thanks,

    Happy

    • Thanks for the feedback 🙂 .

      As per my knowledge, I don’t think it is possible. You can extend it and add a custom field and handle the f4 help manually using the tree table.

      BR,

      Mahesh

        • Like I’ve mentioned, I don’t think it is possible, You might have to manually call the dialog box popup and show the tree table inside(Here you can probably use the annotations to display the tree table).

          BR,

          Mahesh

  • Hi,

    I have 2 entities.

    Order entity: customerID, siteID, Date.

    Site entity: siteID, siteName

    I am using valuehelp for siteID on order entity. So far I can type siteID in the field and it pop up a table with siteID and siteName.

    But my issue is: i would like to search by siteName as well. Now it is only work on siteID. Is there a way to do it? Thank you

  • Hi Mahesh,

    thanks for the useful blog. It works like a charm so far.

    I have multiple values in selecton field 1. And following your instructions all  values are displayed in the filter of the value help (see screenshot)

    But to make it more user friendly I would like to render this values as DropDown list. Unfortunately once I do that, the list is emtpy (see screenshot).

    Do you have an idea on how to get the values from selection field 1 as Dropdown list in the value help filter?

    Info: to make the filter of the ValueHelp a DropDown List I use the DEFINE Method in the oData Service to set_value_list to ‘F’ (fixed-values).

     

    Thanks, Christophe.

    /
    • Sorry for the late reply Christoph Bühlmann, as far as i know it should work fine, but you will loose the dependent filtering, Hope you got the solution by now, if not, you can post a question about this in the community, so it will attract wide audience