只要将ICON的名字或ID传送到SELECTION-SCREEN COMMENT中,就可以在选择画面中显示ICON图标。
ICON的ID和名字可以在type pool ICON中得到:
也可以通过表ICON看到图标的样子
代码如下:
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 28 |
REPORT ztest_display_icon. TYPE-POOLS: icon. *&---------------------------------------------------------------------* *& Selection screen *&---------------------------------------------------------------------* SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN COMMENT 1(15) g_text_1. SELECTION-SCREEN COMMENT 16(10) g_icon_1. PARAMETERS p_in TYPE pathextern. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN COMMENT 1(15) g_text_2. SELECTION-SCREEN COMMENT 16(10) g_icon_2. PARAMETERS p_out TYPE pathextern. SELECTION-SCREEN END OF LINE. *&---------------------------------------------------------------------* *& Initialization *&---------------------------------------------------------------------* INITIALIZATION. g_text_1 = 'Excel Filename'. **Pass Icon name g_icon_1 = icon_xls. g_text_2 = 'Red Light'. **Pass Icon ID g_icon_2 = '@0A@'. |
显示结果:
以上。
发表评论