‎2006 Dec 05 10:40 AM
hi all,
i have an issue regarding table control.
i want to hide an entire column in a table control.
how can i do it.
please send me the code.
thanks .
‎2006 Dec 05 11:13 AM
Hi Sushant, As per my understanding u want to hide the couloumn after a button click is it??? You can do this in the User command of the screen control by reading the reading the column which was selected using the below syntax...
Read TABLE <TCNAME>-COLS INTO <WA_TC> WITH KEY SELECTED = X
(declare a work area of type <TCNAME>-COLS ). Now try use the invisble option of this work area. I hope this might help you in solving u r query...
Regards,
Swaroop
‎2006 Dec 05 10:52 AM
Hi,
try with abap command:
loop at screen.
..
screen-invisible = 1...
A.
‎2006 Dec 05 11:04 AM
Hi
U need to change the attribute of table control out of the loop of PBO:
- In the TOP
CONTROLS <TABLE CONTROL> TYPE TABLEVIEW USING SCREEN <SCREEN>.
DATA: BEGIN OF WA_CTRL,
SCREEN LIKE SCREEN, "Attributes struktur SCREEN
INDEX TYPE I, "Position of a column on the screen
SELECTED(1) TYPE C, "Indicator 'column selected'
VISLENGTH LIKE ICON-OLENG, "Visualised length of a column
INVISIBLE(1) TYPE C, "Indicator 'column invisible'
END OF WA_CTRL.
* In the PBO
MODULE CHANGE_TABLE_CONTROL.
LOOP..
ENDLOOP.
MODULE CHANGE_TABLE_CONTROL.
LOOP AT <TABLE CONTROL>-COLS INTO WA_CTRL.
IF WA_CTRL-SCREEN-NAME.
WA_CTRL-SCREEN-INPUT = 0.
WA_CTRL-INVISIBLE = 'X'.
MODIFY <TABLE CONTROL>-COLS FROM WA_CTRL.
ENDIF.
ENDLOOP.
ENDMODULE.Max
‎2006 Dec 05 11:09 AM
normally u can go to properties of table control and hide the column...or else in one scenario if u want then u have to loop at screen...and make the column invisible and modify screen...
‎2006 Dec 05 11:13 AM
Hi Sushant, As per my understanding u want to hide the couloumn after a button click is it??? You can do this in the User command of the screen control by reading the reading the column which was selected using the below syntax...
Read TABLE <TCNAME>-COLS INTO <WA_TC> WITH KEY SELECTED = X
(declare a work area of type <TCNAME>-COLS ). Now try use the invisble option of this work area. I hope this might help you in solving u r query...
Regards,
Swaroop