on 07-05-2012 11:16 AM
Guys,
how can we set value to dynamically created attribute.
Regards
Srinivas
Hi Srinivas,
Interface IF_WD_CONTEXT_NODE_INFO has method ADD_ATTRIBUTE which allows you to dynamically create an attribute and assign various properties like NAME and DEFAULT_VALUE at the time of creation.
If you have already created the attribute, you can later assign it a value by calling the method IF_WD_CONTEXT_ELEMENT->SET_ATTRIBUTE. e.g,
lo_context_element->set_attribute(
name = `ATTRIBUTE_NAME`
value = some_value
).
Can you give more information on the scenario in which you are setting its value?
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here the scenario is i have created an attribute dynamically in some method say wddoint method.
later, in some button action i want to assign the value to dynamically created attribute... here we cannot directly refer the attribute name because attribute will created during run time, so if we use pass attribute name in set_attribute method it will throw error.
hope you understand the scenario.
Regards
Srinivas sana
The following blog posts by Thomas Szücs might help.
Dynamic Programming in Web Dynpro ABAP:
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.