on 10-02-2014 7:17 AM
Hi All,
I have a declared a node ABC cardinality 1:1 under the context of my view and under this node ABC i have an Attribute MARK type boolian.
in the layout, I have a UI element check box for which I have binded the attribute MARK.
Now I want to set the read_only property dynamically to this check box.
LO_ND_ABC = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ABC ).
LO_EL_ABC = LO_ND_TRAVEL_DATA->GET_ELEMENT( ).
CALL METHOD LO_EL_ABC->SET_ATTRIBUTE_PROPERTY
EXPORTING
ATTRIBUTE_NAME = 'MARK'
PROPERTY = 3
VALUE = 'X'.
But the check box was not set with read_only property.
I have searched many threads and after which i am raising this problem here.
I have also tried SET_ATTRIBUTE_PROPS_FOR_ELEM and SET_ATTRIBUTE_PROPS_FOR_NODE aswel.. but nothing worked out..
Please help.
I don't want to create an attribute and bind it to read_only property of the check box in the layout.
Hi,
Try the below code in wddomodifyview( ) method of your view
data lo_check_box type ref to cl_wd_checkbox.
lo_check_box ?= view->get_element( 'CHECK_BOX_NAME' ).
if lo_check_box is bound.
lo_check_box->set_read_only( value = abap_true ).
endif.
Based on your requirement modify the above code,
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All
if you are facing the same situation and
If you want to make SET_ATTRIBUTE_PROPERTY to work follow the below additional steps
along with the points i mentioned in my initial question
1. goto checkbox in the layout
2. bind MARK againest to read_only property,
when you are binding a popup opens which shows all the context nodes and attributes
in the same popup you have a radio button
"Bind to the Property of the selected Attribute" -- set it to read_only from the drop down
After this step SET_ATTRIBUTE_PROPERTY is working fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.