2006 Jan 18 4:28 AM
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
2006 Jan 18 4:56 AM
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
2006 Jan 18 6:10 AM
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[].
2006 Jan 18 8:20 AM
HI BALA,
when the number of rows are dynamic, its always best to use custom control.
use alv objects concept for that