Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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.

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question