‎2009 Aug 20 11:54 AM
hi all
In my module pool program i am displaying the data in table control
I done like this
In PBO
TC-invisible = 'X'.
In PAI
when 'DISP'.
TC-invisible = ' '.
In this when a user press the (DISP) command butto then the table control will display the data.
But for this coding it is not dispalying the data
How to dispaly the TC when user press the command button?
Thanks
Dharma
‎2009 Aug 20 12:06 PM
Hi,
Are you by any chance trying to make your table control go invisible and then make it visible when you click on the DISPLAY button?
Or your problem is only with the data not being displayed on the table control.
If you want to display the data then,
PROCESS BEFORE OUTPUT.
module fill_internaltable. "fill your internal table
LOOP AT t_header INTO wa_header WITH CONTROL tabcontrol.
MODULE display_data.
ENDLOOP.
module display_data.
if sy-ucomm eq 'DISP'.
screen-field1 = wa_header-field1.
screen-field2 = wa_header-field2.
endif.
endmodule.
If you want to make your table control to go invisible on display, write this in a module before loop...endloop in the PBO.
LOOP AT tabcontrol1-cols[] INTO wa_control1.
wa_control1-invisible = '1'.
MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
ENDLOOP.
To make it visible.
if sy-ucomm eq 'DISP'
LOOP AT tabcontrol1-cols[] INTO wa_control1.
CLEAR wa_control1-invisible.
MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
ENDLOOP.
endif.
‎2009 Aug 20 12:23 PM
hi nitwick
Are you by any chance trying to make your table control go invisible and then make it visible when you click on the DISPLAY button?
Yes
The dats are populated in Table control ,
First am invisible the TC and the press the display button the TC will display
how do to?
Thanks
‎2009 Aug 20 12:25 PM
Hi,
Then use the code that I gave you previously. That should work. Write the portion of code inside a module in PBO outside of LOOP...ENDLOOP.
‎2009 Aug 20 12:28 PM
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
* SET TITLEBAR 'xxx'.
IF sy-ucomm EQ space.
LOOP AT tabcontrol1-cols[] INTO wa_control1.
wa_control1-invisible = '1'.
MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
ENDLOOP.
ELSEif sy-ucomm eq 'DISP'.
LOOP AT tabcontrol1-cols[] INTO wa_control1.
CLEAR wa_control1-invisible.
MODIFY tabcontrol1-cols[] FROM wa_control1 INDEX sy-tabix.
ENDLOOP.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
‎2009 Aug 20 12:34 PM