可以通过函数COPO_POPUP_TO_DISPLAY_TEXTLIST为选择画面中字段创建一个简单的F1帮助文档。
代码:
为选择画面中的一个checkbox创建F1帮助文档。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
REPORT ztest_f1_help. DATA: git_text TYPE TABLE OF tline, gwa_text TYPE tline. *&---------------------------------------------------------------------* *& Selection Screen *&---------------------------------------------------------------------* PARAMETERS: p_chk AS CHECKBOX. *&---------------------------------------------------------------------* *& At Selection Screen Event *&---------------------------------------------------------------------* AT SELECTION-SCREEN ON HELP-REQUEST FOR p_chk. gwa_text-tdformat = 'U1'. " To display text in blue color gwa_text-tdline = 'F1 Help'. APPEND gwa_text TO git_text. CLEAR gwa_text. gwa_text-tdline = 'ABAP Demo Checkbox'. APPEND gwa_text TO git_text. CLEAR gwa_text. CALL FUNCTION 'COPO_POPUP_TO_DISPLAY_TEXTLIST' EXPORTING titel = 'F1 Help' TABLES text_table = git_text. |
运行结果:
以上。
发表评论