2008 Mar 28 9:32 AM
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.
2008 Mar 28 11:35 AM
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.
2008 Mar 28 11:35 AM
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.....
2008 Mar 28 3:41 PM
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]
2008 Jun 20 9:20 AM
Thank u very much for giving such valuable information. Bcz I was facing this problem and
finally i had solved.
Regards,
Dilip
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |