AT LINE-SELECTION

怎甘沉沦 提交于 2020-03-09 04:19:47

AT LINE-SELECTION

Syntax 语法

AT LINE-SELECTION.

Effect 作用

This statement defines an event block whose event is triggered by the ABAP runtime environment during the display of a screen list - provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard list status is automatically enhanced in such a way that the function code F2 and, with it, the double-click mouse function is linked up to the function code PICK.

这个语句定义了一个在屏幕列表显示期间被ABAP运行环境触发的事件块-倘若屏幕指针在一个列表行上并且你用功能码PICK选择了一个功能。通过这个事件块的定义,标准列表状态就自动用功能码F2被增强并且,用它,鼠标双击功能被连接到功能码PICK.

Note

If the function key F2 is linked with a function code different than PICK, each double click will trigger its even, usually AT USER-COMMAND, and not AT LINE-SELECTION.

如果功能键F2与不同于PICK的功能码联系在一起,每一次双击将通常触发AT USER-COMMAND而不是AT LINE-SELECTION

Example 例子

This program works with the standard list status. A line selection with the left mouse key causes the event AT LINE-SELECTION and creates details lists.

这个程序需要标准的列表状态。鼠标左键的选择触发事件AT LINE-SELECTION并且产生明细列表。

REPORT demo_at_line_selection.

START-OF-SELECTION.
  WRITE 'Click me!' COLOR = 5 HOTSPOT.

AT LINE-SELECTION.
  WRITE: / 'You clicked list', sy-listi,
         / 'You are on list',  sy-lsind.
  IF sy-lsind < 20.
    SKIP.
    WRITE: 'More ...' COLOR = 5 HOTSPOT.
  ENDIF.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!