Skip to Content
Author's profile photo Mahesh Palavalli

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

Assigned Tags

      20 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo SHINY NICKITHA CHELLAM J
      SHINY NICKITHA CHELLAM J

      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

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      Hi SHINY NICKITHA CHELLAM J,

      There is some other parameter called as valuHelpParameterDisplayOnly for showing the fields in the table.
      BR,
      Mahesh
      Author's profile photo shinynickitha chellam
      shinynickitha chellam

      I've tried Mahesh. It doesn't work when this is passed to self

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      The above screenshot I shared is working perfectly, maybe some issue with the annotation definitions, I already commented on your question, please update your question accordingly.

      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Nice work Mahesh - I've added this blog to the Fiori elements wiki.

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      Thanks Jocelyn for the feedback 🙂

      Author's profile photo Happy Chhillar
      Happy Chhillar

      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

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      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

      Author's profile photo Happy Chhillar
      Happy Chhillar

      Hello Mahesh,

      Is it possible to achieve this through annotations from backend or frontend in anyway?

       

      Thanks,

      Happy

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      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

      Author's profile photo Budd Fung
      Budd Fung

      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

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      you can use a join with the siteName and expose it via the order entity and show it in the filter bar.. or you can see the below discussion

      https://answers.sap.com/questions/758309/fiori-elements-filter-based-on-association-propert.html

      Author's profile photo Budd Fung
      Budd Fung

      Thanks for the reply.

      What do you mean join with the siteName?

      I am using annotation for the Fiori elements. There is a associate between order.siteID = site.siteID.

      I am wondering if there is setting or extension i can use to filter not only siteID but also siteName.

      Author's profile photo Christoph Bühlmann
      Christoph Bühlmann

      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.

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      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

      Author's profile photo Shyam Vasani
      Shyam Vasani

      Hello Mahesh Kumar Palavalli ,

      Thanks for nice blog. It's very informative.

       

      I tried following the same and I am able to generate Value Help out of the main Entityset I am using to generate the list Report.

       

      But the value list which is getting generated is having duplicate values for the same entry. May be because the DataSet is having multiple records for the Bukrs on which I am trying to implement the ValueList Annotation.

       

      My Question is -> Is it possible to bind distinct value for particular property, i.e., Bukrs using ValueList annotation?

      Best Regards,

      Shyam Vasani

      Author's profile photo Emmanuelezra Paguntalan
      Emmanuelezra Paguntalan

      Hi  Mahesh Kumar Palavalli ,

      Good day.
      Thank you for this guide.

      We are trying to make this work using SmartMultiInput but could not successfully pass the data to ValueListParameterIn.

      We have fiori application with smart multi input filters. The annotation ValueListParameterIn works fine with smartfield control (single entry filter) as Parameter Input but when we convert the control into Smart Multi Input (multiple entries filter) the annotation ValueListParameterIn does not work anymore.

      Would you have any suggestions on what we should do or check?
      Thank you.

      By the way, here is the link to this question that was also posted in the community:
      https://answers.sap.com/questions/13299092/smart-multi-input-as-valuelistparameterin.html

      Best Regards,
      Ezra P.

      Author's profile photo Mahesh Kumar Palavalli
      Mahesh Kumar Palavalli
      Blog Post Author

      Welcome 🙂 , I have replied in your question..

      Cheers!

      Mahesh

      Author's profile photo Arul Deva Rajakumar
      Arul Deva Rajakumar

      Hi Mahesh,

      Thanks for the nice blog!

      I have a scenario where we have developed a Standard OData service (Not 4.0) with entities. The front end developer has used the entity to create a smart table with smart filter.

      In the smart filter we are not able to get Value help (F4) working. How do we get this working, can you please provide some pointers.

      Thanks,

      Arul

      Author's profile photo Hemilkumar Prajapati
      Hemilkumar Prajapati

      Hi Mahesh,

      It's very informative. Thank for sharing

      Is it possible to pass filter from custom filter to standard one.

      for Example Company Code I have taken as custom filter and If I select it and I have to pass that filter for business Entity standard Filter value Help Dialog.

      Thanks

      Hemil 🙂