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