Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil1101
Advisor
Advisor

Hi

I have seen many people are asking how to configure query on OVS UI, this document is an effort to provide help. Currently I have used complex query may be in my next blog I will share thought with SADL based query.

This Document will help you to create, custom OVS based on custom BO which will provide you value help for standard ID field or extended field in standard UI.

Pre-requisite: Custom BO has created at least with two field ID and Description

and Extend a standard BO with field for which you want to use value help. UI with this field has been extended (QC with ID field)

Steps:

Details StepsImages

Create a complex query on BO

  1. Right click on BO and create query ->give details ->next-> select ID and Description field->next-> select all check box for Selection, Basic Find and Result, when you add basic find, query will create search parameter which can use to enter search key.
  2. Save Query -> Activate the BO, it will create new node for BO, here the name is “Overview01”

Now right click on BO and create screen->select OVS -> select field to use in OVS, here select both ID and Description. We will create a find form for search text and configure query to load data in OVS

Open OVS in UI designer and click tab Data Model

  1. Unbind the root
  2. Bind Root with query node and bind data source with query node

Now goto Controller tab expand Query-> Select ValueHelpQuery

Unbind it. And bind this query with QueryByElements in Overview01 node

Select each parameter from query and select drop button. Under the 'Value' click on button (...) and select SearchParameter structure and right click on structure and add data field as per the parameters, now for each parameter select  data field under SearchParameters structure.

In case, you want to set another query for specific search, then add new Query, rename it as 'MyQuery', and follow same steps as previous steps for parameter binding

To configure specific query select DefualtSet and click on + and under 'Low Value' enter specific search key ( it could be user)

Adding new query will add new “EventHandler” which will be execute on select of newly created ‘DefualtSet’, now set this EventHandler as shown in  image
Now goto Designer tab and select AdvanceListPane , and in Property ->click on Default set mapping, select both query , this will be appears as dropdown in OVS.
Now we going to use this OVS as value help for extended ID in Opportunity QC

put this OVS as value help for an extension field in standard screen.

For example I have extended Opportunity QuickCreate UI with ID field

And have assigned this OVS to ID field.

Save and activation your standard UI.

Now we are done, Let test it, login into tenant and open Opportunity click on New

1. It will show record for selected default query(DefaultSet)

2. Type some search key for example "alto", it will search all records and returns only those records which contain 'alto' in description

3. Now test with specific Query, from the dropdown select "MyOVSQuery"

Regards

Sunil

2 Comments