Application Development and Automation 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: 
Read only

Shading rows in TABLEWIEV object

Former Member
0 Likes
486

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
Read only

RaymondGiuseppi
Active Contributor
0 Likes
466

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

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 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
467

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