ABAP Add SearchHelp on Parameter

ABAP Add SearchHelp on Parameter: a step-by-step tutorial how to add a custom Search Help / Value Request for a Parameter in Selection screen in ABAP Code.

ABAP Add SearchHelp on Parameter

In order to add a Search Help or Value Request for a parameter on Selection Screen, you have two alternative

  • Create a SAP Custom Search Help for the Element of the parameter through the tcode SE11.
  • On Selection-screen action, write some code and get more flexibility to handle the value and filter them.

SELECTION-SCREEN ON VALUE-REQUEST

The main action/ event to catch if you want to add the Search help is AT SELECTION-SCREEN ON VALUE-REQUEST FOR PARAMETER.

In this event, you can fill the list with value which will displayed in SAP Popup as table and the user can selection one of them. Use the SAP Standard Function F4IF_INT_TABLE_VALUE_REQUEST to handle the display and the selection.

The steps to be followed in ABAP code :

  1. Retrieve list of Search (Use a ABAP Select query)
  2. Call F4IF_INT_TABLE_VALUE_REQUEST 
    • RETFIELD : Name of Parameter
    • WINDOW_TITLE : Title of SAP PopUp windows
    • VALUE_TAB: list of Value to display
    • RETURN_TAB: List of Selected Lines
  3. Read the value selected

ABAP Add SearchHelp on Parameter: Sample Code

This sample ABAP snippet will help you add a custom Value Request or a Search Help for parameter in Selection option screen.

The parameter P_TABLE in this case is a SAP DDIC Table Name.
Note that the reference SAP Table for Tables is DD02L and DD02T for Text (SAP Table Description).
NB: Caution about the number of Table entries to be retrieved. (in the example, only SAP custom tables are considered)

For more detail about SAP search help, check Search Helps