SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → User Dialogs → Screens → Statements in the Screen Flow Logic → FIELD → Field and Input Help → Field and Input Helps - Examples →Screens, Field Help
The example shows how to implement field help on screens.
Source Code
REPORT demo_dynpro_f1_help.
DATA: text TYPE c LENGTH 30,
docu_num TYPE c LENGTH 4,
int TYPE i,
links TYPE TABLE OF tline,
field5 TYPE c LENGTH 10,
field6 TYPE c LENGTH 10.
TABLES demof1help.
text = text-001.
CALL SCREEN 100.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE f1_help_field4 INPUT.
int = int + 1.
CASE int.
WHEN 1.
docu_num = '0100'.
WHEN 2.
docu_num = '0200'.
int = 0.
ENDCASE.
ENDMODULE.
MODULE f1_help_field5 INPUT.
CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
EXPORTING
doklangu = sy-langu
doktitle = text-002
called_for_tab = 'DEMOF1HELP'
called_for_field = 'FIELD1'.
ENDMODULE.
MODULE f1_help_field6 INPUT.
CALL FUNCTION 'HELP_OBJECT_SHOW'
EXPORTING
dokclass = 'TX'
doklangu = sy-langu
dokname = 'DEMO_FOR_F1_HELP'
doktitle = text-003
TABLES
links = links.
ENDMODULE.
Description
The static next screen number of screen 100 is 100. The input fields have been assigned the screen fields DEMOF1HELP-FIELD1, DEMOF1HELP-FIELD2, DEMOF1HELP-FIELD3, and DEMOF1HELP-FIELD4 from the ABAP Dictionary and the fields field5 und field6 from the ABAP program. The function code of the pushbutton is CANCEL with the function type E. The screen flow logic is as follows:
The components FIELD1 to FIELD4 of the structure DEMOF1HELP refer to the data element DEMOF1TYPE. For this data element, the data element documentation as well as two additional data element documentation items with the numbers 0100 and 0200 are created. The following field help is displayed to the user: