Tuesday 8 March 2016

Spotlight on the Enhanced Search (F4 Help)

I would like to highlight the Enhanced Search functionality that has been delivered with AS ABAP 7.4 SP05 and improved with higher SPs.

Lately, I’ve received some requests from different channels around the enhanced options of the search helps and especially about suppressing them (when set to active). So I would like to handle the topic in this blog.

SAP HANA ABAP, and Certifications
You may have already noticed the new behaviour in standard transaction such as SE24 and SE38 while typing in the name of a class or report.

As a developer, you can now enhance the functionality of a search help object (F4 Help) with the type-ahead function and Fuzzy Search by just selecting the appropriate settings in the relevant search helps in the ABAP dictionary (SE11).

The type-ahead - aka search-as-you-type - function allows a faster, search engine-like user interaction by showing possible search results from the standard F4 help already in a down box beneath the search field. This option works on all SAP-certified databases (anyDB).

In addition, the Fuzzy Search option allows a fault-tolerant, cross-column full-text search. This option doesn't work on all databases currently - But it does on SAP HANA! An accuracy value can be specified for the error tolerance of the full-text search.

SAP HANA Material and Certifications

Both enhanced options of the Search Help are supported in classical dynpro screens (SAP GUI), but not yet in Web Dynpro. But like we at SAP, you surely have a lot of dynpro-based applications in use and thus lot of users who can benefits from this functionality. Nevertheless a type-ahead function can be provided in Web Dynpro applications using Suggested Values for Input Fields in Web Dynpro.
[New] Starting with WEBCUIF EhP3 SP05, the type-ahead option of the Search Help is supported in the Web Client UI Framework

Watch the video tutorial below and learn how to enable and use the new functionality.


PS: The demo in the video is based on AS ABAP 7.4 SP05, but with 7.4 SP06 and higher (recommended), developers do not longer have to modify the dynpros in order to enable the enhanced search.
"No programming - Just setting!" sounds good, but as it always is, when you tell developers that everything works automatically, questions around exceptions handling are raised up... 
In the present context: How to deactivate the enhanced search?
They are two possibilities to do that and I would like to explain how to achieve it:
  • User-specific deactivation
  • Field-specific deactivation (global) 
User-specific deactivation of the enhanced search
An end-user can influence the enhanced search function. The prerequisite here is that it must be set to active in the search help. The user-specific deactivation can be done in SAP Logon under  Options > Interaction Design >  Visualization 2 .
Three options are available in the Enhanced Search area.:
  • Show Enhanced Search Automatically
  • Show Enhanced Search With Shortcut (Ctrl+Shift+Q)
  • Do Not Show Enhanced Search
SAP HANA Certifications and Material

Deactivation of the enhanced search for specific fields (for all users)
A developer can explicitly (programmatically) suppress the enhanced search for specific fields.
He has to do as follows in the relevant programm:

1. Create a PBO module that disables the function on the relevant fields (see below)

MODULE disable_type_ahead_xxxx OUTPUT.  
  cl_dsh_dynpro_properties=> disable_type_ahead (  
          fields = value #( ( conv string( 'INPUT-FIELD_1' ) )  
                                    ( conv string( 'INPUT-FIELD_2' ) )  )  
                      ).  
ENDMODULE.  

PS: For those who are not familiar with the syntax used above: This is still ABAP!

2. Call the PBO module the appropriate PBO section of the relevant dynpro screen

Central deactivation of the enhanced search (for all users)
An administrator can deactivate the enhanced search centrally in an ABAP system.
He has to perform the following steps: :
  1. Go to transaction SDSH_CONFIG
  2. Switch to the Change mode
  3. Deselect the Use proposal search for input fields option.
SAP HANA ABAP

You can find more information about the deactivation of the enhanced search in SAP Note 1971775.

Source: scn.sap.com

No comments:

Post a Comment