可以通过函数COPO_POPUP_TO_DISPLAY_TEXTLIST为选择画面中字段创建一个简单的F1帮助文档。
代码:
为选择画面中的一个checkbox创建F1帮助文档。
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.
运行结果:
以上。
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/19266.html