1、定义字段
data: status_icon type icons-text.
2、创建屏幕,并在屏幕定义创建一个"Status Icon"控件 ,命名为:status_icon
3、利用ICON_CREATE函数在输出是设置ICON。
call function 'ICON_CREATE'
exporting
name = 'ICON_GREEN_LIGHT'
text = '图标后面显示的文本'
info = '提示'
add_stdinf = 'X'
importing
result = status_icon
exceptions
icon_not_found = 1
outputfield_too_short = 2
others = 3.
4、sap的图标可以使用ICON_SHOW函数显示列出
call function 'ICON_SHOW' exporting onlydisplay = 'X'
exceptions no_object_found = 1
no_icon_selected = 2.
5、关于图标的样例可参见sap的演示代码:DEMO_DYNPRO_STATUS_ICONS