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: 

how to make special field editable or diseditable in table control?

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

There's another example at:

Jonathan