2007 May 11 7:14 AM
Hi Folks,
I'm having a table control that with 10 columns. Basically these 10 columns is reporting monthly qty of a material. Since the processing period is supply by user at selection screen, thus the processing period is <b>dynamic</b>.
For eg: User key in date 01.01.2007 to 01.10.2007, then title for each column of the table control has to display with title "Period 01", "Period 02", "Period 03" until "Period 10".
As i have checked on system table <b>SCREEN</b>, it doesn't has any fields that containing the column's title. Thus i need your advice on how to change the column's title of a table control during runtime.
Thanks in advance.
2007 May 11 7:31 AM
HI,
you can achive this by first adding all the columns to the table, and then during run time hide the columns which are not required. Like you want to display the column from 1 to 5 then hide the rest of them by using.
DATA: waa LIKE LINE OF TAB_CONTROL-cols.
CLEAR waa.
LOOP AT TAB_CONTROL-cols INTO waa.
IF waa-index = 6 OR
waa-index = 7 OR
waa-index = 8 OR
waa-index = 9 OR
waa-index = 10.
waa-invisible = 'X'.
MODIFY TAB_CONTROL-cols FROM waa.
ENDIF.
ENDLOOP.Regards
2007 May 11 7:31 AM
HI,
you can achive this by first adding all the columns to the table, and then during run time hide the columns which are not required. Like you want to display the column from 1 to 5 then hide the rest of them by using.
DATA: waa LIKE LINE OF TAB_CONTROL-cols.
CLEAR waa.
LOOP AT TAB_CONTROL-cols INTO waa.
IF waa-index = 6 OR
waa-index = 7 OR
waa-index = 8 OR
waa-index = 9 OR
waa-index = 10.
waa-invisible = 'X'.
MODIFY TAB_CONTROL-cols FROM waa.
ENDIF.
ENDLOOP.Regards
2007 May 11 8:15 AM
Hi HRA,
Thanks for your reply, perhaps i think you misunderstood my question.
Im not intend to hide certain columns, but instead i need to change column's title during runtime.
Pls comment.
Thanks in advance.
2007 May 11 8:19 AM