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.
AT LINE-SELECTION 无效
这个就是F2的原因啊 ,可以设置个就解决问题了啊