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 PARAMATER.

In this event, you can fill the list of 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 paramater 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)

Check more detail on  SAP Workbench Tables

 

 

For more detail about SAP search help, check Search Helps

Sab125

Hi. I have been working as SAP Technical and functional for a decade. Through this blog, I am trying to share with you my experience. Hopefull, it makes your ways easier path ...Sab