实现加一行,删除一行.上翻页,下翻页. 单选, 多选.
在定义tablecontrol 时,将自带的功能按钮,全部显示出来.定义为不显示.
自定义status 时,将按钮的功能代码名称,定成和标准功能按钮代码一致.就可以实现功能.
保存数据时.将tablecontrl的数据写进另一张内表中.然后, insert zm18 from table it_save accepting duplicate keys.
好象不可以有选择性的作多选.
所以在删除的时候,只能用到一个mark的按钮. :)这个地方可能还有些问题,研究一下.
》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》
在点击事件(pai)中,
data w_status(2) type c.
module user_command_9002 input
case sy-ucomm.
when ''.
endcase.
endmodule. " user_command_9002 INPUT
后程序会自动重新执行pbo一次。
module screen_inti output.
if w_status = 'D'.
loop at screen.
if screen-group1 = 'DTC'. “ 这个dtc要在屏的属性里设置
screen-input = '1'.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'DTC'. “ 这个dtc要在屏的属性里设置
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
endmodule. " SCREEN_INTI OUTPUT
用这个可以控制tablecontrol 为可编辑或者为不可编辑状态.
======================================================
设置固定列。
元素清单------general attr.------选择tc名字----先择属性----在元素属性对话框(固定列的数目写入值)。
在tc中输入的数字,前头加0.
在general attr 中将字段换成numc 型,---- display attr(开始的零勾选)
本文介绍如何在ABAP中使用Table Control实现多种交互功能,包括添加和删除行、翻页、选择等,并通过自定义状态实现这些功能。还介绍了如何设置Table Control的可编辑状态及固定列数。
1万+

被折叠的 条评论
为什么被折叠?



