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

Display or Editable mode in table control cellwise?

Former Member
0 Likes
744

Hi,

Can we make particular cells in a table control display mode or editable mode depending upon the conditions?.

Can we give colors to cells in a table control depending on conditions?

Thanks,

Somi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
688

hi,

ya u can make one cell editable...

do like this

in PBO between LOOP ENDLOOP make one module..

PROCESS BEFORE OUTPUT.

TABLECONTROL 'MYTAB1'

MODULE get_data.

MODULE mytab1_change_tc_attr.

LOOP AT mytab

INTO mytab

WITH CONTROL mytab1

CURSOR mytab1-current_line.

MODULE disable.

MODULE mytab1_get_lines.

ENDLOOP.

MODULE disable OUTPUT.

LOOP AT SCREEN.

IF mytab1-current_line = 1 AND screen-name = 'MYTAB-KUNNR'. "OR screen-name = 'MYTAB-KUNNR') .

screen-input = 1.

ELSEIF mytab1-current_line = 1 AND screen-name = 'MYTAB-KUNNR'.

screen-input = 0.

ELSEIF mytab1-current_line <> 1. " AND ( screen-name = 'MYTAB-NAME1' OR screen-name = 'MYTAB-KUNNR') .

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE. " disable OUTPUT

here mytab1 is my table control name and mytab is internal table from which i have created table control.... KUNNR and NAME1 are my internal table fields.....

i dont know about coloring cell in module pool.....

reward if usefull.....

Hi,

Can we make particular cells in a table control display mode or editable mode depending upon the conditions?.

Can we give colors to cells in a table control depending on conditions?

Thanks,

Somi.

3 REPLIES 3
Read only

Former Member
0 Likes
689

hi,

ya u can make one cell editable...

do like this

in PBO between LOOP ENDLOOP make one module..

PROCESS BEFORE OUTPUT.

TABLECONTROL 'MYTAB1'

MODULE get_data.

MODULE mytab1_change_tc_attr.

LOOP AT mytab

INTO mytab

WITH CONTROL mytab1

CURSOR mytab1-current_line.

MODULE disable.

MODULE mytab1_get_lines.

ENDLOOP.

MODULE disable OUTPUT.

LOOP AT SCREEN.

IF mytab1-current_line = 1 AND screen-name = 'MYTAB-KUNNR'. "OR screen-name = 'MYTAB-KUNNR') .

screen-input = 1.

ELSEIF mytab1-current_line = 1 AND screen-name = 'MYTAB-KUNNR'.

screen-input = 0.

ELSEIF mytab1-current_line <> 1. " AND ( screen-name = 'MYTAB-NAME1' OR screen-name = 'MYTAB-KUNNR') .

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE. " disable OUTPUT

here mytab1 is my table control name and mytab is internal table from which i have created table control.... KUNNR and NAME1 are my internal table fields.....

i dont know about coloring cell in module pool.....

reward if usefull.....

Read only

Former Member
0 Likes
688

Hi,

U can not do it in cell wise, but u can do it in column wise.

If u want to that stuff means just mail me [email protected]

Read only

Former Member
0 Likes
688

Thank u very much for giving such valuable information. Bcz I was facing this problem and

finally i had solved.

Regards,

Dilip