当双击Report List所输出的某行数据时,触发AT LINE-SELECTION事件。而HIDE定义使输出的内容和当前选择相关联,会自动获取该行内容,如下:
[For Example]
DATA mytext(20).
START-OF-SELECTION.
"WRITE:/ 'AT LINE-SELECTION'.
PERFORM write_and_hide.
FORM write_and_hide.
mytext = 'line1'.
WRITE / mytext.
HIDE mytext.
mytext = 'line2'.
WRITE / mytext.
HIDE mytext.
mytext = 'line3'.
WRITE / mytext.
HIDE mytext.
WRITE / 'line4'.
ENDFORM.
AT LINE-SELECTION.
CASE mytext.
WHEN 'line1'.
WRITE: 'You Had Select The Line1'.
WHEN 'line2'.
WRITE: 'You Had Select The Line2'.
WHEN OTHERS.
WRITE: 'You Had Select Other Line'.
ENDCASE.
CLEAR mytext.
程序中,输出行与其内容相关联,当双击某行时,会根据HIDE关联内容输出相应的值。
选择后: