abap 如何获取tablecontrol(表控制)选中的行

data: c_line type i,           "当前鼠标点击表控制的行数(从表控制的顶部开始计数)。

          index type i.           "对应的内表行ID。

 

get cursor line c_line.        "鼠标点击的行数。

 

index = tab1-top_line + c_line - 1.         "tab1对应的是表控件的名字,top_line字段对应的顶部显示的记录对应的内表中的行ID。

 

read table t_output index index.            "根据内表的行ID读取内表。

 

 

。。。。。。。最后可以做一些相应的操作!

你可能感兴趣的:(c,table,output)