format 使用一例 之 color & input

一 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_num
TYPEi.

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值