Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table control

Former Member
0 Likes
484

hi

Can anyone tell me how do I hide a column in a table control at runtime?

regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
452

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

3 REPLIES 3
Read only

Former Member
0 Likes
452

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.

Read only

Former Member
0 Likes
453

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

Read only

former_member150733
Contributor
0 Likes
452

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>