‎2007 Jul 05 3:31 PM
Is it possible to hide a table control based on some conditions? If so, how?
Thanks in advance!
‎2007 Jul 05 3:43 PM
data cols like line of itab-cols.
loop at itab-cols into cols.
if cols-screen-group1 = 'G1' or cols-screen-group1 = 'G2'.
cols-screen-input = '0'.
else.
cols-screen-input = '1'.
endif.
modify itab-cols from cols index sy-tabix.
endloop.
try to use the above code in PBO event
Hope it will be help
don't forget reward points if helpful
‎2007 Jul 05 3:45 PM
Hi
U can hide the colunms only, not the table control.
If you want to hide the table control you should use a two subscreens, one with the table control and one empty; when you want to hide the tc you call the empty subscreen instead of the subscreen with tc.
If you want to hide the colunms:
TYPE-POOLS: CXTAB.
DATA: COL LIKE CXTAB_COLUMN.
LOOP AT <TABLE CONTROL>-COLS INTO COL.
IF COL-SCREEN-NAME = . ......
COL-SCREEN-INVISIBLE = 'X'.
MODIFY <TABLE CONTROL>-COLS FROM COL.
ENDIF.
ENDLOOP.Place a code like above in PBO before the loop of table control.
Max
‎2007 Oct 06 11:24 AM
Please try following code .
<table control>-invisible = 'X'.
If helpful this answer please award neccessary points.
Rgds,
Ranjith
‎2007 Oct 06 12:27 PM
hi,
make one button in status.
and write in USER_COMMAND_9000 module of PAI.
<b>MODULE user_command_9000 INPUT.</b>
CASE sy-ucomm.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
<b> WHEN 'HIDE'.
tab1-invisible = 'X'.</b>
ENDCASE.
<b>ENDMODULE. " USER_COMMAND_9000 INPUT</b>
reward if useful.