Skip to Content
author's profile photo Former Member
Former Member

How to hide the table control column in module pool

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 02, 2009 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2009 at 05:12 AM

    hi,

    check this thread

    how-to-hide-a-entire-column-in-a-table-control

    hope it helps you.

    thanks

    Sachin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2009 at 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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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...

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 03: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.