Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Visible Table Control

Former Member
0 Likes
2,472

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

5 REPLIES 5
Read only

Former Member
971

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.

Read only

0 Likes
971

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

Read only

0 Likes
971

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.

Read only

0 Likes
971


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

Read only

Former Member
0 Likes
971

THANKS