on 02-12-2014 9:50 AM
Hi experts,
is it possible to modify/update the config parameters of static context attribute.
I searched the web and looked at the methods of the context_node interface etc. but found no solution.
I can read the values in this way:
Data:
lo_nd_info TYPE REF TO if_wd_context_node_info,
lo_nd_project TYPE REF TO if_wd_context_node.
FIELD-SYMBOLS:
<ls_attribute> TYPE wdr_context_attribute_info.
.....
lo_nd_info = lo_nd_project->get_node_info( ).
lt_attributes = lo_nd_info->get_attributes( ).
read table lt_attributes assigning <ls_attribute>
with key name = 'PROJECT_NO'.
.....
But I found no way to set it. Is it not possible to modify it on runtime?
Thanks in advance
Florian
Hi,
There is no provision to set the attribute/ to set read only of the attribute. However you can set the nullable property of attribute.
so, use remove attribute method to delete the attribute and add it back using add attribute method and pass the is_read_only value ( or enhance the class CL_WDR_CONTEXT_NODE_INFO and add method set_read_only and write your logic as like in set_nullable method ).
Hope this helps u,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
thanks for your quick response.
I had this idea also, but it doesnt't work to remove "not dynamic" attributes. 😉
The reason why I tried to do the modification of this parameter was, because I create a form with the following method. But all fields on the form will be editable unless I changed the parameter of the context attribute to read_only.
cl_wd_dynamic_tool=>create_form_from_node(
ui_parent = lo_container
node = lo_nd_project
).
If the modification of the attribute doesn't work, I will copy the method and set the read_only parameter inside the method, when creating the input field.
Regards,
Florian
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.