2007 Aug 02 9:25 AM
hi
Can anyone tell me how do I hide a column in a table control at runtime?
regards.
2007 Aug 02 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
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
2007 Aug 02 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.
2007 Aug 02 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
2007 Aug 02 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>
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |