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

To make TABLE CONTROL fields INVISBLE based on condition.

Former Member
0 Likes
918

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
Read only

Former Member
866

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.

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.

4 REPLIES 4
Read only

Former Member
0 Likes
866

IT may be help you

table_control-cols-INVISIBLE = 'X'

Read only

Former Member
0 Likes
866

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.

.......

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

Read only

Former Member
867

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.

Read only

0 Likes
866

Hello Jeffpan,

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

Regards.