Coding search help exits for creating better F4 helps
In this recipe, we will see how search help (and help exits) will help you meet the user requirements when providing the input values of a particular selection screen's input field. We will create a search help in this recipe and will assign it to an input field.
The requirement is to provide a personnel number field with input help that shows all the employees whose birthdays fall in the current month. This means, if the program is run in March, all the employees whose birthdays are in March will be shown in the input help.
Getting ready
We will create a search help for personnel number. The name of the search help is ZST9_SEARCH_HELP
and it uses the database table, pa0002
. The fields PERNR, NACHN, VORNA, and GBDAT are selected and displayed in the hit list.
Next, we will create a program in which we will declare a parameter pernr
, based on PERNR of the table PA0002. We use the matchcode object
addition to assign the search help ZST9_SEARCH_HELP...