New Features in ABAP 7.4 – Enhanced Search Helps

ABAPAnthony Cecchini is the President of Information Technology Partners (ITP), an SAP consulting company headquartered in Pennsylvania. ITP offers comprehensive planning, resource allocation, implementation, upgrade, and training assistance to companies. Anthony has over 20 years of experience in SAP business process analysis and SAP systems integration. His areas of expertise include SAP NetWeaver integration; ALE development; RFC, BAPI, IDoc, Dialog, and Web Dynpro development; and customized Workflow development. You can reach him at ajcecchini@itpsap.com.

Search Helps in ABAP 7.4

At some point in your ABAP career, you probably will develop a search help for a screen field to aid the user in entering correct data. In the “Classic” days (Everything old in SAP is Classic) these were called Match Codes.This blog post is not a tutorial on how to create a search help, please see the SAP ABAP 7.4 help for that. Instead, I am going to introduce you to some new functionality that became available in ABAP 7.4.

First, let’s quickly review what a search help is…

A Search Help, a repository object of ABAP Dictionary, is used to display all the possible values for a field in the form of a list. This list is also known as a hit list. You can select the values that are to be entered in the fields from this hit list instead of manually entering the value, which is tedious and error prone.

There are several types of Search helps:
Elementary search helps: This type implements a search path for determining the possible entries.
Collective search helps: This type contains several elementary search helps. A collective search help, therefore, provides several alternative search paths for possible entries.
Append search helps: This type can be used to enhance collective search helps delivered by SAP with customer-specific search paths without requiring a modification.

An example of an elementary search help is shown below. You will see the Search Help Icon icon next to the field. You enter a pattern and hit this icon or F4 and the hit list is displayed for you to choose from. (see below).

 Search help Screen
Search Help Hit List
So you want to find a book on ABAP, so you head over to your favorite browser and using Google start typing in ABAP and instantly you see search results. (see below)
google
What if this “type ahead” (Predictive) or “search engine like” functionality could be used in our ABAP 7.4 Search helps?

Well, the good news is it can. You need to be on SAP NetWeaver 7.4 SP06, and SAP GUI 7.30 for Windows Patch Level 5, SAP recommends Patch Level 6 or higher. You can use this on  ABAP 7.4 SP05, but you will need to add a PBO section in your DYNPRO to call class CL_DSH_DYNPRO_PROPERTIES=>enable_type_ahead.
At the end of this blog, I will add a link to a SAP video that explains this and much more in detail. For this blog, I am on the correct support pack and GUI, so this will all be done with any coding changes.
First, let’s look at the code that invokes the Search help. As you can see, this program is a simple one line PARAMETER statement that invokes MATCHCODE OBJECT zsh.
Search Help Program
Next, let’s double-click on the Search Help zsh in order to enter transaction Se11 and make the changes. Once you are there, please notice a new section called ENHANCED OPTIONS. In this section, you will see a checkbox for “proposal Search for Input Fields”. This is what will allow the type-ahead – aka search-as-you-type – function. Checking this box 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 is Database Agnostic, so you Do NOT need HANA for this.
Search Help Enhanced
OK, now let’s activate the changes and test the demo program again. As you see if I begin to enter a number, like 4, I immediately start seeing results.
Search Help Enhanced Results
In addition to this “type-ahead” option in the new Enhanced Section of the Search Help, there is the” Fuzzy Search” option. This 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.

Summary

Both enhanced options of the Search Help are supported in classical Dynpro screens (SAP GUI), but not yet in Web Dynpro. But there are a lot of Dynpro-based applications in use and thus lot of users who can benefit from this functionality. A type-ahead function can be provided in Web Dynpro applications using the Suggested Values for Input Fields in Web Dynpro.  And, starting with WEBCUIF EhP3 SP05, the type-ahead option of the Search Help is supported in the Web Client UI Framework.

Here is the video I promised.

ITP logo

If you enjoyed this blog, New Features in ABAP 7.4 – Enhanced Search Helps, please fill out the form below to sign up for our newsletter. We deliver SAP Technical tips & tricks, SAP news, and the current month’s BLOG right to your inbox!

Related Posts

Pin It on Pinterest

Share This

If you enjoyed this post, why not share it with your friends!