一 color
(1) Write 添加背景色
八种颜色,分别为 0-7 可以用8个常量代替输出
WRITE:/'col_key'COLORcol_key,
'col_total'COLORcol_total,
'col_group'COLORcol_group,
'col_background'COLORCOL_BACKGROUND,
'col_heading'COLORcol_heading,
'COL_NEGATIVE'COLORCOL_NEGATIVE,
'COL_POSITIVE'COLORCOL_POSITIVE,
'COL_NORMAL'COLORCOL_NORMAL
.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
0 COL_BACKGROUND Backgrounds
1 COL_HEADING Headers
2 COL_NORMAL List entries
3 COL-TOTAL Totals
4 COL_KEY Key columns
5 COL-POSITIVE Positive threshold values
6 COL_NEGATIVE Negative threshold values
7 COL_GROUP Control levels
如果在前面用 format color 颜色 on 或者 format color = 颜色 的话。
后面的输出默认则用这个颜色作为背景。
如果在前面用 format color off 的话
后面的输出则没有背景颜色。
假设前面没有定义背景颜色。但是后面的输出时 指定了颜色。则该输出使用该颜色。例如:write ‘liujincai’ color 颜色
假设前面定义了背景颜色。但是后面的输出时 指定了其它颜色。则该输出使用其它颜色。例如:write ‘liujincai’ color 颜色
假设前面定义了背景颜色。但是后面的输出时 没有指定颜色。则该输出使用前面定义的颜色。例如:write ‘liujincai’ color 颜色
假设前面定义了背景颜色。但是后面的输出时 关闭了颜色 。则该输出不使用颜色。例如:write ‘liujincai’ color off
二, input
(1) List行的控制以及行中输入框以及 line-selection 事件的响应。
DATA:input_field(100)TYPEc,
line_numTYPEi.
START-OF-SELECTION.
WRITE'Inputtext:'.
SETBLANKLINESON.
FORMATINPUT.
WRITE/input_field.
FORMATINPUTOFF.
WRITE:/'>>>OK<<<'COLOR5HOTSPOT.
ATLINE-SELECTION.
casesy-lisel.
when'>>>OK<<<'.
line_num=sy-lilli-1.
READLINEline_numFIELDVALUEinput_field..
ifsy-subrcne0.exit.endif.
ifinput_field<>'liujincai'.
WRITE:'Theinputwas:',
/input_field.
else.
modifyCURRENTLINEfieldvalueinput_fieldfrom''.
endif.
endcase.