01-02-2009 5:01 AM
Dear Experts,
Please help me on this
I have 2 screens 9000 and 9001 . In screen 9000 I have 2 radio buttons if I select the 2nd radiobutton then the screen 9001 should display inthat some column has to be hide inthe table control. I have used this code but still it is not hiding please help me on that
I used this code in PBO of 9001 screen
LOOP AT SCREEN.
IF wopr = 'X'.
IF screen-group2 = 'ABC'.
IF screen-name = 'ZMMT_EKKO-MATNR' or screen-name = 'ZMMT_EKKO-BANFN'.
screen-active = ''.
screen-invisible = '1'.
screen-input = ''.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
Even I tried this code also in the same screen 9001
loop at tbl_rfq-cols into cols.
IF wopr = 'X'.
IF screen-group2 = 'ABC'.
IF cols-screen-name = 'ZMMT_EKKO-MATNR' or cols-screen-name = 'ZMMT_EKKO-BANFN'.
cols-screen-input = '0'.
cols-invisible = '1'.
endif.
MODIFY tbl_rfq-cols FROM cols INDEX sy-tabix.
endif.
endif.
endloop.
01-02-2009 5:05 AM
Hi Balaji,
To hide a column in a table control on screen.
In the PBO of the screen, inside
loop with control <tab_ctrl_name>.
module modify_tab.
endloop.
Say for a column, you take group1 as 'ABC'.
In this module you can use the group for the input/output fields and the display/hide them as per your requirements.
if <condition>.
loop at screen.
if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
screen-invisible = 'X'. "hide a column
screen-active = ' '.
endif.
modify screen.
elseif <condition>.
loop at screen.
if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
screen-invisible = ' '. "display a column
screen-active = 'X'.
endif.
modify screen.
endif.
Similarly, you can use this code for other columns also.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
01-02-2009 5:12 AM
01-02-2009 12:51 PM
Try this for hiding colums in a table control :
DATA wa LIKE LINE OF tab_con-COLS.
loop at tc-cols into wa.
if wa-SCREEN-group1 = 'ABC'
wa-SCREEN-INVISIBLE = 1 .
modify tc-cols from wa.
endif.
endloop.
where tc is ur table control and
03-30-2009 4:10 PM
Hi,
I have tried this solution but it does'nt work:
In the PBO of IT 0027 ( dynpro 3000):
PROCESS BEFORE OUTPUT.
MODULE BEFORE_OUTPUT.
CALL SUBSCREEN subscreen_empl INCLUDING empl_prog empl_dynnr.
MODULE ASSIGN_TC3000. "generated
MODULE VARIATION_TC. "generated
module disable_column.
LOOP.
MODULE PSLIST_TC. "generated
MODULE P0027L.
ENDLOOP.
module disable_column.
DATA wa TYPE CXTAB_COLUMN .
LOOP at <tc3000>-COLS INTO wa.
if wa-SCREEN-group3 = '005'.
wa-SCREEN-INVISIBLE = 1 .
modify <tc3000>-cols from wa.
endif.
ENDLOOP.
ENDMODULE.
It generates some errors like : the table tc3000 is unknown...
03-30-2009 4:27 PM
HI,
try this way..
Loop at <TC>-COLS .
if <TC>-COLS-SCREEN-NAME CS <COLUMN NAME in upper case>.
<TC>-COL-INVISIBLE = 'X'.
MODIFY <TC>-COLS.
ENDIF.
endloop.
03-30-2009 4:50 PM
thank you for your response.
In fact, the problem is that the table control TC3000, used in LOOP is unknown. but when I debugg, TC3000 is recognized in the execution but not in the programm.
Any idea?
03-30-2009 6:50 PM
hi Balaji,
in the PBO...
HI,
PBO.
loop at tc_itab(table control name).
Module modify_table control.
endloop.
modify_table control.
loop at screen.
if SCREEN-NAME = itab-Fieldname(which you want to hide ).
screen-INVISIBLE = 'X'.
MODIFY screen.
ENDIF.
endloop.
endmodule.
Regards,
Prabhudas