abap-alv-led,设置led灯
怎样设置alv的led灯,执行后如图所示,调用函数“REUSE_ALV_GRID_DISPLAY”能实现吗,求简单的完整源码?...
怎样设置alv的led灯,执行后如图所示,调用函数“REUSE_ALV_GRID_DISPLAY”能实现吗,求简单的完整源码?
展开
1个回答
展开全部
定义的ALV绑定的内表(假设为it_alv)中加入 icons LIKE icons-text, 这个字段
根据条件调用下面三个FORM,里面的单词代表颜色
PERFORM icon_create USING 'ICON_YELLOW_LIGHT' CHANGING it_alv-icons.
PERFORM icon_create USING 'ICON_GREEN_LIGHT' CHANGING it_alv-icons.
PERFORM icon_create USING 'ICON_RED_LIGHT' CHANGING it_alv-icons.
完成之后别忘记modify it_alv.
FORM icon_create USING name CHANGING p_icon.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = name
add_stdinf = 'X'
IMPORTING
RESULT = p_icon
EXCEPTIONS
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
ENDFORM. "ICON_CREATE
根据条件调用下面三个FORM,里面的单词代表颜色
PERFORM icon_create USING 'ICON_YELLOW_LIGHT' CHANGING it_alv-icons.
PERFORM icon_create USING 'ICON_GREEN_LIGHT' CHANGING it_alv-icons.
PERFORM icon_create USING 'ICON_RED_LIGHT' CHANGING it_alv-icons.
完成之后别忘记modify it_alv.
FORM icon_create USING name CHANGING p_icon.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = name
add_stdinf = 'X'
IMPORTING
RESULT = p_icon
EXCEPTIONS
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
ENDFORM. "ICON_CREATE
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询