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: 

To make TABLE CONTROL fields INVISBLE based on condition.

Former Member
0 Kudos

Hello Experts,

My problem is with the fields of table control in Module Pool. I have 7 fields designed in SE51 for the table control. The display of these 7 fields on the table control varies based on certain conditions written in PBO modules.

For one condition in the PBO module, I should have only 4 fields to be displayed in the table control. The remaining 3 should NOT be VISIBLE on the table control.

I can make them inactive (VISIBLE) but cannot make them INVISIBLE. In SCREEN structure INVISIBLE field is there. But it is not working.

Please suggest me a way to make the table control fields invisible for a condition specified.

Regards.

1 ACCEPTED SOLUTION

Former Member

PBO:

DATA COLS LIKE LINE OF TABLE_CONTROL-COLS.

loop at TABLE_CONCTROL-COLS into COLS.

if COLS-SCREEN-NAME = 'HIDE FIELD'.

COLS-INVISIBLE = 'X'. "HIDE THIS COLUMN

MODIF TABLE_CONCTROL-COLS

FROM COLS

TRANSPORTING INVISIBLE

endif.

endloop.

4 REPLIES 4

Former Member
0 Kudos

IT may be help you

table_control-cols-INVISIBLE = 'X'

Former Member
0 Kudos

4 fields: FIELD1,FIELD2,FIELD3,FIELD4

IF table_control-COLS-screen-name = 'FIELD1'.

table_control-COLS-INVISIBLE = 'X'.

ENDIF.

IF table_control-COLS-screen-name = 'FIELD2.

table_control-COLS-INVISIBLE = SPACE.

ENDIF.

.......

................

Former Member

PBO:

DATA COLS LIKE LINE OF TABLE_CONTROL-COLS.

loop at TABLE_CONCTROL-COLS into COLS.

if COLS-SCREEN-NAME = 'HIDE FIELD'.

COLS-INVISIBLE = 'X'. "HIDE THIS COLUMN

MODIF TABLE_CONCTROL-COLS

FROM COLS

TRANSPORTING INVISIBLE

endif.

endloop.

0 Kudos

Hello Jeffpan,

Thankyou very much for your inputs. It really helped me and solved the problem.

Regards.