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: 

Shading rows in TABLEWIEV object

Former Member
0 Kudos

Hi. I've got a TABLEWIEV object on my subscreen. I'd like to determine if particular row can be editable. I'd like to set those rows which cannot be edited shaded. The editable rows should be set to white color. Could You give me a tip how to reach that? Greetings. P.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

In the PBO when LOOPing on internal table with table control, do something like

LOOP AT itab

WITH CONTROL ctrl

CURSOR ctrl-current_line.

MODULE itab_map_fields.

MODULE itab_line_attr.

MODULE itab_get_lines.

ENDLOOP.

In MODULE itab_line_attr set read-only attributes

MODULE itab_line_attr OUTPUT.

LOOP AT SCREEN.

IF <your test on itab-fields>

screen-input = 0.

ELSE.

screen-input = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE.

Regards

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos

In the PBO when LOOPing on internal table with table control, do something like

LOOP AT itab

WITH CONTROL ctrl

CURSOR ctrl-current_line.

MODULE itab_map_fields.

MODULE itab_line_attr.

MODULE itab_get_lines.

ENDLOOP.

In MODULE itab_line_attr set read-only attributes

MODULE itab_line_attr OUTPUT.

LOOP AT SCREEN.

IF <your test on itab-fields>

screen-input = 0.

ELSE.

screen-input = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE.

Regards