在SAP DIALOG设计中,有时候须要动态的隐藏某些列,以下是方法.
***数据定义
CONTROLS: table_control TYPE TABLEVIEW USING SCREEN 0100.
"Table Control名称
DATA: l_col LIKE LINE OF table_control-cols.
"定义Table Control 列
***在PBO中
PROCESS BEFORE OUTPUT.
MODULE loop_screen_0100. "隐藏列
MODULE loop_screen_0100 OUTPUT.
***隐藏复选框 列
LOOP AT table_control-cols INTO l_col.
IF l_col-screen-name = 'GW_YS_ITEM-SEL' "GW_YS_ITEM-SEL 须要隐藏的列名称
l_col-invisible = '1' .
MODIFY table_control-cols FROM l_col.
ENDIF.
ENDLOOP.
ENDMODULE.
这样名称为GW_YS_ITEM-SEL的列 就被隐藏了