ABAP 选择屏幕上添加按钮,按钮上添加文字和图片
生活随笔
收集整理的這篇文章主要介紹了
ABAP 选择屏幕上添加按钮,按钮上添加文字和图片
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
TABLES:?sscrfields.
TYPE-POOLS:slis,ole2.
TYPE-POOLS?icon.
*?選擇屏幕
SELECTION-SCREEN?SKIP?1.
SELECTION-SCREEN?BEGIN?OF?BLOCK??b1?WITH?FRAME?TITLE?t1.?"選擇屏幕塊
? PARAMETERS:?p_carrid?TYPE?s_carr_id,
????????????p_cityfr?TYPE?s_from_cit.
SELECTION-SCREEN?SKIP.
SELECTION-SCREEN?BEGIN?OF?LINE.
?SELECTION-SCREEN?PUSHBUTTON?7(20)?but1?USER-COMMAND?search.?"?定義搜索按鈕
SELECTION-SCREEN?END?OF?LINE.
SELECTION-SCREEN?END?OF?BLOCK?b1.
INITIALIZATION.
t1?=?'檢索條件'.
"but1?=?'搜??索'.
??CALL?FUNCTION?'ICON_CREATE'?"?給按鈕添加圖標和文本
????EXPORTING
??????name???=?ICON_SEARCH?? "?按鈕的圖片的名字
??????text???=?'搜???索'???????????????????"按鈕的文本
??????info???=?'Search'
????IMPORTING
??????RESULT?=?but1
????EXCEPTIONS
??????OTHERS?=?0.
TYPE-POOLS:slis,ole2.
TYPE-POOLS?icon.
*?選擇屏幕
SELECTION-SCREEN?SKIP?1.
SELECTION-SCREEN?BEGIN?OF?BLOCK??b1?WITH?FRAME?TITLE?t1.?"選擇屏幕塊
? PARAMETERS:?p_carrid?TYPE?s_carr_id,
????????????p_cityfr?TYPE?s_from_cit.
SELECTION-SCREEN?SKIP.
SELECTION-SCREEN?BEGIN?OF?LINE.
?SELECTION-SCREEN?PUSHBUTTON?7(20)?but1?USER-COMMAND?search.?"?定義搜索按鈕
SELECTION-SCREEN?END?OF?LINE.
SELECTION-SCREEN?END?OF?BLOCK?b1.
INITIALIZATION.
t1?=?'檢索條件'.
"but1?=?'搜??索'.
??CALL?FUNCTION?'ICON_CREATE'?"?給按鈕添加圖標和文本
????EXPORTING
??????name???=?ICON_SEARCH?? "?按鈕的圖片的名字
??????text???=?'搜???索'???????????????????"按鈕的文本
??????info???=?'Search'
????IMPORTING
??????RESULT?=?but1
????EXCEPTIONS
??????OTHERS?=?0.
總結
以上是生活随笔為你收集整理的ABAP 选择屏幕上添加按钮,按钮上添加文字和图片的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: abap BDC 使用方法
- 下一篇: SAP固定资产相关的一些表