Application Development 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: 

Table Control

Former Member
0 Kudos

Hi All,

I have to create a table control where the number of columns are going to be dynamic. I am able to make it disable not invisible.

The scenario is When ever i am executing the report depeding upon the number of days left in that month I have display the days as columns.

Example: If i execute on 2/1/2006 i should have 30 column staring from 2/1/1006 to 31/1/2006.

If i execute on 18/1/2006 i should have 14 column staring from 18/1/1006 to 31/1/2006.

Kindly let me know if anybody haave worked on this scenario.

regards,

Bala

3 REPLIES 3

Former Member
0 Kudos

Instead of a table control, I think you can achieve this with an ALV in a custom control. Define a custom control on your screen and display your dynamic internal table in the ALV grid in this control.

Srinivas

0 Kudos

hope you find this useful

tab_ctrl(control table) type cxtab_control.
* code to hide starts here.

data cols  type <b>cxtab_column</b>. 
data col_tab type <b>cxtab_column</b> occurs 10.
col_tab = tab_ctrl-cols[]. 

loop at col_tab  into cols. 
  check cols-screen-name = col_name. "column name to hide 
  cols-invisible = 'X'.
  modify col_tab from cols. 
endloop. 

tab_ctrl-cols[] = col_tab[].

hymavathi_oruganti
Active Contributor
0 Kudos

HI BALA,

when the number of rows are dynamic, its always best to use custom control.

use alv objects concept for that