on 07-26-2007 3:42 PM
Hi, experts,
action:
1.Create a table with name " A_TABLE" in the layout in a view.
2.Binding some fields from a structure to the table.
3.Field "Checkbox" is a checkbox type and field "input" is a inputfield type with readonly in the table "A_TABLE" .
4.I hope: When selecting a checkbox in the "Checkbox" colume in a row in the table, the field "input" corresponding will be changed readonly.
The follow is my code: When select Field "Checkbox" , the method is invoked.
method ONACTIONCLICK4DISDESC .
data view type ref to if_wd_view.
DATA input_desc TYPE REF TO CL_WD_INPUT_FIELD.
data tab type if_BIDDING_LIST_VIEW=>elements_ONSURVEY.
data struct type if_BIDDING_LIST_VIEW=>element_ONSURVEY.
I have set "wd_this->m_view = view" in the method wddomodify and add m_view to the attribute of the
"viewBIDDING_LIST_VIEW" .
view ?= wd_this->m_view.
input_desc ?= view->GET_ELEMENT( `TABLE_INPUT_EDITOR` ).
input_desc->SET_READ_ONLY( EXPORTING value = abap_false ).
endmethod.
result:
when I select a checkbox in the "Checkbox" colume in a row in the table, all field "input" is read and write.
How can I do it ?
Best regards,
tao
Hello Wang,
You need to bind the readOnly attribute of the input field to a newly to created attribute beneath the dataSource node of the table within the context. That way, each input field of each row of the table can have a different value for readOnly.
Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.