Table Control动态隐藏列
form tc_col_hide. loop at mywr-cols into cols . if numbet = '1111' . if cols-screen-name = 'W_RATI-ZEINR' or cols-screen-name = 'W_RATI-NTGEW' or cols-screen-name = 'W_RATI-MNGKO' or cols-screen-name = 'W_RATI-CSTPR' or cols-screen-name = 'W_RATI-CMBTR' or cols-screen-name = 'W_RATI-JMBTR' or cols-screen-name = 'W_RATI-DMBTD' OR cols-screen-name = 'W_RATI-KBETR' OR cols-screen-name = 'W_RATI-BAREA' OR cols-screen-name = 'W_RATI-JJBTR' .
cols-selected = 'X' . cols-invisible = '1' . else. cols-selected = '' . cols-invisible = '0' . endif. MODIFY mywr-cols FROM cols INDEX sy-tabix. elseif numbet = '1112' . if cols-screen-name = 'W_RATI-BAREA' OR cols-screen-name = 'W_RATI-JJBTR' OR cols-screen-name = 'W_RATI-MONEY' .
cols-selected = 'X' . cols-invisible = '1' . else. cols-selected = '' . cols-invisible = '0' . endif. MODIFY mywr-cols FROM cols INDEX sy-tabix. elseif numbet = '1113' . if cols-screen-name = 'W_RATI-ZEINR' OR cols-screen-name = 'W_RATI-MNGKO' OR cols-screen-name = 'W_RATI-CSTPR' OR cols-screen-name = 'W_RATI-CMBTR' OR cols-screen-name = 'W_RATI-JMBTR' OR cols-screen-name = 'W_RATI-DMBTD' OR cols-screen-name = 'W_RATI-KBETR' OR cols-screen-name = 'W_RATI-BAREA' OR cols-screen-name = 'W_RATI-PEINH'.
cols-selected = 'X' . cols-invisible = '1' . else. cols-selected = '' . cols-invisible = '0' . endif. MODIFY mywr-cols FROM cols INDEX sy-tabix. elseif numbet = '1114' . if cols-screen-name = 'W_RATI-ZEINR' OR cols-screen-name = 'W_RATI-MNGKO' OR cols-screen-name = 'W_RATI-CSTPR' OR cols-screen-name = 'W_RATI-CMBTR' OR cols-screen-name = 'W_RATI-JMBTR' OR cols-screen-name = 'W_RATI-DMBTD' OR cols-screen-name = 'W_RATI-KBETR' OR cols-screen-name = 'W_RATI-PEINH' OR cols-screen-name = 'W_RATI-NTGEW'.
cols-selected = 'X' . cols-invisible = '1' . else. cols-selected = '' . cols-invisible = '0' . endif. MODIFY mywr-cols FROM cols INDEX sy-tabix. elseif numbet = '1115' . if cols-screen-name = 'W_RATI-ZEINR' OR cols-screen-name = 'W_RATI-MNGKO' OR cols-screen-name = 'W_RATI-CSTPR' OR cols-screen-name = 'W_RATI-CMBTR' OR cols-screen-name = 'W_RATI-JMBTR' OR cols-screen-name = 'W_RATI-DMBTD' OR cols-screen-name = 'W_RATI-KBETR' OR cols-screen-name = 'W_RATI-PEINH' .
cols-selected = 'X' . cols-invisible = '1' . else. cols-selected = '' . cols-invisible = '0' . endif. MODIFY mywr-cols FROM cols INDEX sy-tabix. endif. endloop.
loop at myyr-cols into colr . if numbet = '1111' . if colr-screen-name = 'Y_RATI-ZEINR' or colr-screen-name = 'Y_RATI-NTGEW' or colr-screen-name = 'Y_RATI-MNGKO' or colr-screen-name = 'Y_RATI-CSTPR' or colr-screen-name = 'Y_RATI-CMBTR' or colr-screen-name = 'Y_RATI-JMBTR' or colr-screen-name = 'Y_RATI-DMBTD' OR colr-screen-name = 'Y_RATI-KBETR' OR colr-screen-name = 'Y_RATI-BAREA' OR colr-screen-name = 'Y_RATI-JJBTR' .
colr-selected = 'X' . colr-invisible = '1' . else. colr-selected = '' . colr-invisible = '0' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. elseif numbet = '1112' . if colr-screen-name = 'Y_RATI-BAREA' OR colr-screen-name = 'Y_RATI-JJBTR' OR colr-screen-name = 'Y_RATI-MONEY' .
colr-selected = 'X' . colr-invisible = '1' . else. colr-selected = '' . colr-invisible = '0' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. elseif numbet = '1113' . if colr-screen-name = 'Y_RATI-ZEINR' OR colr-screen-name = 'Y_RATI-MNGKO' OR colr-screen-name = 'Y_RATI-CSTPR' OR colr-screen-name = 'Y_RATI-CMBTR' OR colr-screen-name = 'Y_RATI-JMBTR' OR colr-screen-name = 'Y_RATI-DMBTD' OR colr-screen-name = 'Y_RATI-KBETR' OR colr-screen-name = 'Y_RATI-BAREA' OR colr-screen-name = 'Y_RATI-PEINH'.
colr-selected = 'X' . colr-invisible = '1' . else. colr-selected = '' . colr-invisible = '0' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. elseif numbet = '1114' . if colr-screen-name = 'Y_RATI-ZEINR' OR colr-screen-name = 'Y_RATI-MNGKO' OR colr-screen-name = 'Y_RATI-CSTPR' OR colr-screen-name = 'Y_RATI-CMBTR' OR colr-screen-name = 'Y_RATI-JMBTR' OR colr-screen-name = 'Y_RATI-DMBTD' OR colr-screen-name = 'Y_RATI-KBETR' OR colr-screen-name = 'Y_RATI-PEINH' OR colr-screen-name = 'Y_RATI-NTGEW'.
colr-selected = 'X' . colr-invisible = '1' . else. colr-selected = '' . colr-invisible = '0' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. elseif numbet = '1115' . if colr-screen-name = 'Y_RATI-ZEINR' OR colr-screen-name = 'Y_RATI-MNGKO' OR colr-screen-name = 'Y_RATI-CSTPR' OR colr-screen-name = 'Y_RATI-CMBTR' OR colr-screen-name = 'Y_RATI-JMBTR' OR colr-screen-name = 'Y_RATI-DMBTD' OR colr-screen-name = 'Y_RATI-KBETR' OR colr-screen-name = 'Y_RATI-PEINH' .
colr-selected = 'X' . colr-invisible = '1' . else. colr-selected = '' . colr-invisible = '0' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. endif.
if numbet = '1114' or numbet = '1115' . if colr-screen-name = 'Y_RATI-MONEY' . colr-screen-input = '0' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. else. if colr-screen-name = 'Y_RATI-MONEY' . colr-screen-input = '1' . endif. MODIFY myyr-cols FROM colr INDEX sy-tabix. endif. endloop. endform. |
将子例程“form tc_col_hide”加在PBO中,或在响应PAI时也可以调用.
逻辑流:
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN : sc_0112_1 INCLUDING sy-repid sub_sl1 , sc_0112_2 including sy-repid sub_screen4, sc_0112_3 including sy-repid sub_sl2, sc_0112_4 including sy-repid sub_sl3, sc_0112_5 including sy-repid sub_sl4, sc_0112_6 including sy-repid sub_sl5.
PROCESS AFTER INPUT.
CALL SUBSCREEN : sc_0112_1 , sc_0112_2 , sc_0112_3 , sc_0112_4 , sc_0112_5 , sc_0112_6 .
field F_LIFNS MODULE GT_NO .
MODULE USER_COMMAND_0111.
PROCESS ON VALUE-REQUEST. FIELD F_LIFNS MODULE F_HELP . * FIELD F_LIFNR MODULE F_HELP . |
阅读(2705) | 评论(0) | 转发(0) |