09-08-2008 9:15 AM
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.
09-08-2008 10:00 AM
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.
09-08-2008 9:42 AM
09-08-2008 9:49 AM
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.
.......
................
09-08-2008 10:00 AM
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.
09-10-2008 12:52 PM
Hello Jeffpan,
Thankyou very much for your inputs. It really helped me and solved the problem.
Regards.