on 08-04-2008 10:02 AM
Hi,
I have created an attribute (type: string) called "ACTION" directly under the context root node which I want to set dynamically. But all my tries failed and now I don't know if it is possible at all.
My current solution is
lo_el_context = wd_context->get_element( ).
lo_el_context->set_attribute(
name = `ACTION`
value = lv_action ).
It has a default value which I try to change by this code.
Any ideas?
Best regards, Steffen
Edited by: Steffen Weber on Aug 4, 2008 11:03 AM
you can use
wd_context->set_attribute( name = 'ACTION' value = '<value>' ).
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi steffen,
The thing which you are doing is possible (u can have an attribute directly under context node whose value u can change dynamically).
And the way which you are doing it is also correct .
I tried the same way and i think i am getting it.
Please see the below code its working for me and it may work for u also.
data lo_el_context type ref to if_wd_context_element.
data ls_context type wd_this->element_context.
data lv_test like ls_context-test.
lo_el_context = wd_context->get_element( ).
lo_el_context->get_attribute( exporting name = `TEST` importing value = lv_test ).
lv_test = 10.
lo_el_context->set_attribute( exporting name = 'TEST' value = lv_test ).
clear lv_test.
lo_el_context->get_attribute( exporting name = `TEST` importing value = lv_test ).
just try to understand why i want to show(u can debug this code). Here i have created an attribute TEST under context node and which didnt have any value...i am storing a value in in and trying to get it (and i am getting it).
So i think u r trying to do the right thing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's it, thanks a lot!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.