Entering content frameDefining Field Help Locate the document in its SAP Library structure

If the data type of an input field declared in an executable program is defined in the ABAP Dictionary, the documentation of the underlying data element is automatically displayed if the user positions the cursor in that field and presses F1. To create help for input fields that have no Dictionary reference, or to override the help normally linked to the field, you can create an event block for the event

AT SELECTION-SCREEN ON HELP-REQUEST FOR <field>

The event is triggered when the user calls the F1 help for the field <field>. If no corresponding event block has been defined, the help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default help mechanism. It is then up to the programmer to ensure that appropriate help is displayed.

You cannot declare the event block AT SELECTION-SCREEN ON HELP-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the help mechanism of a logical database within the program. You can define separate help within the logical database program using the HELP-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.

Example

REPORT SELECTION_SCREEN_F1_DEMO.

PARAMETERS: P_CARR_1 TYPE S_CARR_ID,
            P_CARR_2 TYPE S_CARR_ID.

AT SELECTION-SCREEN ON HELP-REQUEST FOR P_CARR_2.

  CALL SCREEN 100 STARTING AT 10 5
                  ENDING   AT 60 10.

This program declares a selection screen with two parameters that both refer to the data element S_CARR_ID in the ABAP Dictionary. The documentation from the ABAP Dictionary is used for P_CARR_1, and a help screen 100 is called for P_CARR_2. The help screen is defined in the Screen Painter as a modal dialog box with next screen 0. It contains the help text defined as help texts. The screen does not require any flow logic.

This graphic is explained in the accompanying text

 

 

 

 

Leaving content frame