Skip to Content
Technical Articles
Author's profile photo Mohit Bansal

Fiori Element: Collective / Multiple value help on selection field

Further to my previous Blog featuring Value help on a selection field within a value help dialog, this blog will be featuring about the Multiple or Collective value help feature on one element of the Fiori Element.

Traditional SAP GUI Based application have collective search help feature which is internally associated with many Elementary Search Helps. In a similar way, we can now design Fiori Element based selection field, which can have multiple value help.

Business Scenario

Let’s consider the Business scenario where Fiori Elements based list report display list of sales orders where customer (sold to party) as one of the selection field.

Business needs to search Sold to Party based on the following    way:

  • Based on Customer’s General Attributes (Like name, city, country etc)
  • Based on Customer Company Code information

 

Technical Explanation

  1. Develop main consumption CDS For List Report and add relevant UI annotations for Line Items, Selection Fields.

Please refer below link for Basic Fiori Elements based List Report development.

(https://blogs.sap.com/2016/11/16/fiori-elements-how-to-develop-a-list-report-basic-approach/

 

  1. Add Value help specific annotation for the selection field, provide reference of Value help CDS using annotation “@Consumption.valueHelpDefinition: “
  2. In case of more than one value helps, the default value help is the one without a qualifier.

 

4. Value help with Qualifier will be secondary value help , the qualifier marks the value helps             that are less important.

 

Important Tips

If all value helps are annotated with the qualifier argument, then none of them are displayed as there is no default.

Code snippet for the consumption CDS

 

Result

Once the CDS is exposed as OData and List Report is generated, Sold to Party is displayed as selection field.

On clicking of sold to party value help, opens the dialog with 2 Value help, User have the options to select any one of them.

Customer Selection based on the Company Code( Screen gets chnaged as per the fields inside the CDS for Customer’s company code)

 

Customer Selection based on country

 

 

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo sridhar pulicherla
      sridhar pulicherla

      Thanks for sharing

      Author's profile photo Viren Sharma
      Viren Sharma

      Very nice blog!

      Very clean and descriptive approach I found so far on collective value help.

      Author's profile photo Kesava Mullati
      Kesava Mullati

      Thanks for sharing the content.

      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Thanks Mohit! Another good blog. I have added this to the Fiori elements wiki.

      Author's profile photo Mohit Bansal
      Mohit Bansal
      Blog Post Author

      Thanks a lot Jocelyn 🙂

      Author's profile photo Wolfgang Röckelein
      Wolfgang Röckelein

      Mohit Bansal , thanks for this helpful blog!

      Do you from which NetWeaver resp. S/4HANA version this is available? It seems that this first appears in the S/4HANA 1909 documentation...

      Also since which SAPUI5 version this annotation is interpreted correctly?

      Thanks,

      Wolfgang

      Author's profile photo Remigiusz Kolarczyk
      Remigiusz Kolarczyk

      Hello Experts!

      That collective value helps works perfect in Odata 2, but how you can achive that with OData 4? Are there any specific annotations for that?

      Thanks for replay in advance!
      Remik

      Author's profile photo Remigiusz Kolarczyk
      Remigiusz Kolarczyk

      Mohit Bansal is it possible in OData V4 too?