Application Development 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: 

make column invisible in table control

former_member637921
Participant
0 Kudos

Hello,

I need to make certain rows in a table control invisble on a certain condition.

I've tried to LOOP AT SCREEN at the table control loop using the screen-invisible = 1 and screen-active = 0, but it only disables the column and does not make it disapear.

Help anyone?

1 ACCEPTED SOLUTION

former_member1245113
Active Contributor
0 Kudos

Hi

In PBO

LOOP AT ITAB.
module disable_column.
endloop.

in program

module disable_column.
" You can your conditions here like if  itab-field = 'ABC' Etc
LOOP AT tc-cols INTO cols." WHERE selected = 'X'.
    IF cols-selected = 'X'.
      cols-invisible = 1.
      MODIFY  tc-cols FROM cols INDEX sy-tabix.
    ELSE.
      CLEAR cols-selected.
      cols-invisible = 0.
      MODIFY tc-cols FROM cols INDEX sy-tabix.
    ENDIF.
  ENDLOOP.
endmodule

Also check this thread.

2 REPLIES 2

former_member1245113
Active Contributor
0 Kudos

Hi

In PBO

LOOP AT ITAB.
module disable_column.
endloop.

in program

module disable_column.
" You can your conditions here like if  itab-field = 'ABC' Etc
LOOP AT tc-cols INTO cols." WHERE selected = 'X'.
    IF cols-selected = 'X'.
      cols-invisible = 1.
      MODIFY  tc-cols FROM cols INDEX sy-tabix.
    ELSE.
      CLEAR cols-selected.
      cols-invisible = 0.
      MODIFY tc-cols FROM cols INDEX sy-tabix.
    ENDIF.
  ENDLOOP.
endmodule

Also check this thread.

0 Kudos

Thanks.

I also found it in