04-06-2006 8:52 PM
Hello,
I understand how to disable entire columns in the table control but can anyone demonstrate how I would disable individual fields/cells?
How would it vary from this:
constants:
c_disable type char1 value '0'.
*
data:
l_column type cxtab_column.
*
loop at ret_unit_tab-cols into l_column.
l_column-screen-input = c_disable.
modify ret_unit_tab-cols from l_column.
endloop.
Thank you in advance.
Brett
04-06-2006 9:11 PM
In the PBO:
process before output.
* Set screen attributes for table control
loop at zzhb6_0100 with control zhb6ctl
cursor zhb6ctl-top_line.
module modify_screen_0100.
endloop.
Then:
module modify_screen_0100 output.
loop at screen.
if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT'.
if zzhb6_sal_phase2_s-zzself_funded = 'X' or
zzhb6_sal_phase2_s-zzmed_rec = 'X' or
zzhb6_sal_phase2_s-zztr = 'X'.
screen-input = '0'. "Display
modify screen.
endif.
endif.
if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT_SP'.
if zzhb6_sal_phase2_s-zzself_funded = 'X'.
screen-input = '0'. "Display
modify screen.
endif.
endif.
endloop.
Rob
04-06-2006 9:11 PM
In the PBO:
process before output.
* Set screen attributes for table control
loop at zzhb6_0100 with control zhb6ctl
cursor zhb6ctl-top_line.
module modify_screen_0100.
endloop.
Then:
module modify_screen_0100 output.
loop at screen.
if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT'.
if zzhb6_sal_phase2_s-zzself_funded = 'X' or
zzhb6_sal_phase2_s-zzmed_rec = 'X' or
zzhb6_sal_phase2_s-zztr = 'X'.
screen-input = '0'. "Display
modify screen.
endif.
endif.
if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT_SP'.
if zzhb6_sal_phase2_s-zzself_funded = 'X'.
screen-input = '0'. "Display
modify screen.
endif.
endif.
endloop.
Rob
04-06-2006 10:23 PM
04-06-2006 10:26 PM
Glad to help - I remember when I had to do this the first time. It almost drove me crazy.
Rob
04-06-2006 9:13 PM
In the PBO inside looping of table control you need a rotuine with:
If conditions for line are enough.
LOOP AT SCREEN.
IF screen-name EQ 'name of column'.
screen-input = 1. "or 0
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.