11-02-2007 4:53 AM
hi
i have a table control, suppose the line record like this
field1 field2
A 1
B 2
if field1 = A,the field2 should not be editable
and if field1 = B ,the field2 should be editable.
and field1 is always cann't be editable.
how to do that? hunger for your advice,thanks.
11-02-2007 4:57 AM
Hi,
have a module within the LOOP AT ..ENDLOOP of the PBO..
check this example..
PROCESS BEFORE OUTPUT.
LOOP AT ITAB WITH CONTROL TC.
MODULE disable_columns.
ENDLOOP.
MODULE disable_columns OUTPUT.
LOOP AT SCREEN.
***ALways disable the first column.
IF SCREEN-NAME = 'column one name'.
SCREEN-INPUT = 0. "disable for input.
ENDIF.
***Display the second column if field1 is A.
IF itab-field1 = 'A'.
SCREEN-INPUT = 0. " disable for input.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.
Thanks
Naren
11-02-2007 4:57 AM
Hi,
have a module within the LOOP AT ..ENDLOOP of the PBO..
check this example..
PROCESS BEFORE OUTPUT.
LOOP AT ITAB WITH CONTROL TC.
MODULE disable_columns.
ENDLOOP.
MODULE disable_columns OUTPUT.
LOOP AT SCREEN.
***ALways disable the first column.
IF SCREEN-NAME = 'column one name'.
SCREEN-INPUT = 0. "disable for input.
ENDIF.
***Display the second column if field1 is A.
IF itab-field1 = 'A'.
SCREEN-INPUT = 0. " disable for input.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.
Thanks
Naren
11-02-2007 5:32 AM