We are now part of Eviden, discover more...
Blogs / SAP / SAP BusinessObjects / SAP Design Studio / Custom Add-Ons / Add-On Search Component using SAP Design Studio SDK

Add-On Search Component using SAP Design Studio SDK

Nov 26, 2014

SHARE

It is really useful to have search functionality within an SAP Design Studio dashboard. In an earlier post, I had explained how to implement this functionality, in SAP Design Studio 1.3, using arrays. However, a full-blown search functionality cannot be implemented using this method, due to the following reasons –

  • Only case-sensitive searches are possible in SAP Design Studio – there are no string functions for case conversion
  • Not a very elegant solution – individual members need to be matched and manually added to an array prior to setting a filter and displaying results
  • Code complexity increases exponentially if the search needs to be implemented across multiple dimensions

Resorting to the SDK

To resolve these issues, we took up the challenge to design an add-on search component that would allow

  • Case insensitive search
  • Partial string search
  • Search across multiple dimensions

Read on !

Add-On Search Component using SAP Design Studio SDK
Add-On Search Component using SAP Design Studio SDK

Case insensitive search

We used JavaScript functions for case conversion, to get this working.

Add-On Search Component using SAP Design Studio SDK

Partial string search

Add-On Search Component using SAP Design Studio SDK

Search across multiple dimensions
For this, the component uses different methods to get search results for the first 4 dimensions of the data source. Each of these methods returns a filtered member list (MemberArray) for that particular dimension. In the screenshot below, we can see that the pop-up displays all members in the first four dimensions, that contain the searched string (“c”).

Add-On Search Component using SAP Design Studio SDK
Add-On Search Component using SAP Design Studio SDK

In rare cases where the user requires search on more than 4 dimensions at a time, the component has an extra method (getResult()) which can be used to obtain a semi-colon delimited list of members of remaining dimensions. These individual members can then be accessed using array functions native to SAP Design Studio.

Add-On Search Component using SAP Design Studio SDK
Add-On Search Component using SAP Design Studio SDK

Enhancements

The good thing about getting this done is that, we can now implement any further enhancements to the search functionality, as upgrades to the component. One idea is to implement the search component with a dropdown list of suggested values based on each key press (think Google style!).

Another such enhancement is to extend the search for key as well as text values, even if only text values are used in the initial view of the data source. We are currently working on a host of such ideas.

Using the SDK and building add-on components promotes reusability and enhanced functionality. Let’s see what SAP Design Studio 1.4 has in store!


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!