Predictive Search Helps
An ABAP search helps which provides type-ahead functionality to the elementary search helps are know as Predictive Search Helps.
When you start typing something in a search field – a customer name or product name for example – a drop-down box of all possible values will appear to choose from. We can see this behavior in many websites and also on Google search
Users will be delighted to see this feature available on an SAP screen. So as an ABAPer its time to make end-users happy by creating these kind of search helps.
New in ABAP 7.4
The good news is with SAP system version 7.4 SP 6 predictive search helps are possible in SAP. Thanks to SAP for bring this feature
Lets learn how we can create such predictive ABAP search helps.
For demo purpose lets create a predictive search help to show material number, name and other details of the material
1. Open Transaction SE11 and choose Search Help option.
2. Provide a name for the search help and hit Create button.3. In the next screen provide Short Description, Selection Method for the search help. For selection method you can choose a table or view name.
That’s it, an ABAP predictive search help is ready now for end-users on selection-screen reports or module pool programs.
To use this search help in a ABAP report selection-screen, create a data-element assign the search help to the data element.Easiest way would be to attach the search help to the report selection-screen field using the ABAP key-word MATCHCODE OBJECT
Now its time to test the report, hit F8 to run the report and start typing a letter or number on the selection fields you see a drop-down box appears with all possible matched values with out hitting F4 to choose the values.
With ABAP 7.4 system version ABAP F4 search helps became F1(as fast as formula 1 cars) search helps(…just joking).
Congrats..! you have successfully created a Predictive Search Help in ABAP.
Please feel free to comment and let us know your feedback. Subscribe for updates