table control名为ztab, 关联的内表名为itab.
取得鼠标所在屏幕元素和行号
MODULE user_command_9000 INPUT.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'BACK'.
LEAVE TO SCREEN 0.
ELSEIF save_ok = ''.
GET CURSOR FIELD field_name LINE c_line.
c_line = c_line + 1.
ENDIF.
ENDMODULE. " USER_COMMAND_9000 INPUT
注意 在PBO中要判断上一个PAI的鼠标位置是否在 table control内.
MODULE status_9000 OUTPUT.
SET PF-STATUS 'STATUS_9000'.
IF field_name+0(5) = 'ITAB-'.
IF c_line <= ztab-lines.
SET CURSOR FIELD field_name LINE c_line .
ELSE.
SET CURSOR FIELD field_name LINE 1.
ENDIF.
ENDIF.
CLEAR: field_name, c_line.
ENDMODULE. " STATUS_9000 OUTPUT
阅读(2575) | 评论(0) | 转发(0) |