08-02-2007 9:25 AM
hi
Can anyone tell me how do I hide a column in a table control at runtime?
regards.
08-02-2007 9:28 AM
Try the following steps
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.
loop at tbl_ctrl-cols into wa.
if wa-screen-group1 = <group defined for the column>
wa-invisible = 1.
modify tbl_ctrl-cols from wa
endif
endloop
Award pts if helpful
Ankit
08-02-2007 9:27 AM
Hi,
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.
loop at tbl_ctrl-cols into wa.
if wa-screen-group1 = <group defined for the column>
wa-invisible = 1.
modify tbl_ctrl-cols from wa
endif
endloop
Hope this helps.
08-02-2007 9:28 AM
Try the following steps
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.
loop at tbl_ctrl-cols into wa.
if wa-screen-group1 = <group defined for the column>
wa-invisible = 1.
modify tbl_ctrl-cols from wa
endif
endloop
Award pts if helpful
Ankit
08-02-2007 9:30 AM
Create a <b>new module in PBO</b>... and in the module do coding as below:
DATA:cols TYPE cxtab_column.
LOOP AT TABC_200-cols INTO cols WHERE SCREEN-NAME = <i>'field u want to hide'</i>.
cols-invisible = 'X'.
MODIFY TABC_200-cols FROM cols.
ENDLOOP.
<b>In TOP include:</b>
CONTROLS:TABC_200 TYPE TABLEVIEW USING SCREEN 200.
where TABC_200 is the table control name & 200 is the Screen Number
Regards,
Anish Thomas
<i>Pls reward all useful answers</i>