2010 Sep 10 10:25 AM
Hi All
I have a table control and i want to make a single cell as input disabled.
Please suggest.
ex in table control i have 5 rows and 5 columns.
I want to make input disabled cell at 3rd column and 2nd row.
Thanks in advance.
Aditya
Hi All
I have a table control and i want to make a single cell as input disabled.
Please suggest.
ex in table control i have 5 rows and 5 columns.
I want to make input disabled cell at 3rd column and 2nd row.
Thanks in advance.
Aditya
2010 Sep 10 10:44 AM
you have to make the loop at screen internally to the loop of table control:
in pbo:
loop at xxx with control yyy
loop at screen.
endloop.
endloop.
2010 Sep 10 2:33 PM
See [Dynamic Setting of Field Attributes in Table Controls|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11651] [original link is broken] [original link is broken] [original link is broken];.
Rob
2010 Sep 10 3:23 PM
Hi Aditya...
there are 2 ways to control the field properties on the column and row label...
1) first one is data oriented and is waht is mentioned in the link by Rob...i.e to set the attributes based on the data of the relevant field
2) the second step is basically a hard coded scenario which I think would never happend in a real time scenario.....this is only to provide an explanation to your question...Please have a look at the pseudo code...
Consider my table control with following structure
Field1 Feild2 Feild3 Feild4 Feild5 Feild6
Row1
Row2
Row3
Row4
In the PBO I'll write the following code...
LOOP AT TC1.
MODULE change_tc_cell_property.
ENDLOOP.
MODULE change_tc_cell_property.
lv-loopc = sy-loopc. (would give me he currrent table control row)
LOOP AT tc-cols INTO ls_columns.
IF lv_loopc = 3
AND ls_coulmns-screen-name = 'FIELD3'.
ls_coulmns-input = 0.
ENDIF.
MODIFY tc_clos from ls_columns index .....
ENDLOOP.
ENDMODULE.
This code should set the cell corresponding to Row3 and Field3 in disabled mode...
I have never tried this but am sure this should work...If it doesnot then also it should not be a problem coz this would not be a real time scenario and a real time scenario would correspond more to Rob's link...:)
CXTAB is the data type pool in case u need...
Regards,
Sitakant
Edited by: Sitakant Tripathy on Sep 10, 2010 4:24 PM
Edited by: Sitakant Tripathy on Sep 10, 2010 4:25 PM
2015 Apr 28 8:14 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |