ABAP Events - AT SELECTION-SCREEN ON HELP REQUEST FOR field.
AT SELECTION-SCREEN ON HELP REQUEST FOR <FIELD>.
This event is triggered when the user hits F1 on the field in a selection screen. This event gets triggered at the POH of the selection screen.
This event is used when we want to display some kind of documentation related to a specific field in the selection screen. In short using this event, a self-programmed help for the input/output field in the selection screen, can be implemented.
If the program contains such an event and the user presses F1, the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
The event is triggered when the user calls the F1 help for the field <field>. If this event has not been defined, the help from the ABAP Dictionary is displayed, or none, if the field has no Dictionary reference.
Also remember that if there is a select-option field, then this event has to be written twice i.e. one for field-low and another for field-high.
SAMPLE PROGRAM :
REPORT ztest.
PARAMETERS: p_carrid(2) TYPE c.
DATA: it_f1help TYPE STANDARD TABLE OF helpval WITH HEADER LINE.
AT SELECTION-SCREEN ON HELP-REQUEST FOR p_carrid.
CLEAR it_f1help[].
it_f1help-tabname = 'TEXT1'.
it_f1help-fieldname = 'p_carrid'.
it_f1help-keyword = 'Short Text'.
it_f1help-length = 50.
it_f1help-value = 'Enter A Valid Carrier ID, e.g. SJ, AI, KF, etc.'.
APPEND it_f1help.
CALL FUNCTION 'HELP_GET_VALUES'
EXPORTING
popup_title = 'CARRIER ID'
TABLES
fields = it_f1help
EXCEPTIONS
no_entries = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
OUTPUT:
On pressing ‘F1’ Help Button on the field,
ALSO READ:
- ABAP EVENTS During Runtime Of A Report Program.
- INITIALIZATION Event - Introduction With A Sample Code.
- AT SELECTION-SCREEN Event - Introduction With A Sample Code.
- AT SELECTION-SCREEN OUTPUT Event - Introduction With A Sample Code.
- AT SELECTION-SCREEN ON VALUE REQUEST- Introduction With A Sample Code.
- AT SELECTION-SCREEN ON HELP REQUEST- Introduction With A Sample Code.
- AT SELECTION-SCREEN ON - Introduction With A Sample Code.
- Sample Program On AT SELECTION-SCREEN OUTPUT - 1.
- Sample Program On AT SELECTION-SCREEN OUTPUT - 2.
- Sample Program On AT SELECTION-SCREEN OUTPUT - 3.
- Sample Program On AT SELECTION-SCREEN OUTPUT - 4.
- Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 1.
- Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 2.
- Sample Program On AT SELECTION-SCREEN ON HELP REQUEST FOR field- 1.
Your suggestions and comments are welcome in this section.
Please mail all your contributions to administrator@abapmadeeasy.com We request you to mention your Name, Designation, Experience & Organization you are working for. Your posts will be verified and posted in this site with your name.