‎2011 Sep 13 6:32 PM
Hi experts,
I want add new column dynamically (code abap) to table control
How can i do?
Thanks
‎2011 Sep 14 6:41 AM
Hi,
As far I know it is not possible to add columns to table control dynamically, Instead first Add all columns to table control and hide them . At runtime you can show the columns of table control.
Else,
If you want to add dynamically only then.,
Use OO ALV. build a dynamic internal table and pass it to ALV ..
hope this helps u.,
Thanks & Regards,
Kiran
‎2011 Sep 14 9:07 AM
Hi,
declare as many columns as u like initially. u can hide the display of the columns as and when u wish..
it is possible with the use of TYPE-POOLS cxtab.
declare TYPE-POOLS cxtab.
DATA v_tccols TYPE cxtab_column .
FIELD-SYMBOLS: <tc_cols> TYPE cxtab_control .
data tcname(25) type c.
assign table control name to tcname and assign tcname to tc_cols.
with this u can manipulate what ever columns u want to display or hide
‎2011 Sep 14 9:08 AM
Hi,
declare as many columns as u like initially. u can hide the display of the columns as and when u wish..
it is possible with the use of TYPE-POOLS cxtab.
declare TYPE-POOLS cxtab.
DATA v_tccols TYPE cxtab_column .
FIELD-SYMBOLS: <tc_cols> TYPE cxtab_control .
data tcname(25) type c.
assign table control name to tcname and assign tcname to tc_cols.
with this u can manipulate what ever columns u want to display or hide
Edited by: sapabap403 on Sep 14, 2011 10:09 AM