on 05-28-2011 12:45 AM
Hi
I am creating a date field wich must appears in screen with default value.
In COMPONENTCONTROLER i created a node GLOBAL_DATA with attribute DATE (DATE is type date).
In WDDOINIT i try to set the default value:
DATA: lo_nd_global_data TYPE REF TO if_wd_context_node,
lo_el_global_data TYPE REF TO if_wd_context_element,
lv_date TYPE wd_this->Element_global_data-date.
lv_date = sy-datum.
lo_nd_global_data = wd_context->get_child_node( name = wd_this->wdctx_GLOBAL_DATA ).
lo_el_global_data = lo_nd_global_data->get_element( ).
lo_el_global_data->set_attribute( name = `DATE`
value = lv_date ).
But lo_el_global_data receives NULL , so the set_attribute fails (abort).
Is this the right way to set the value to attribute node ?
Note: if i create the DATE directly (not inside Node) it works , but i need to create it in node because that data is going to send to Flash Island , and if i use an attribute the value is not transfered, but the nodes works ok.
Regards
Frank
Done, i was checking and i made a mistake when i created the node with cardinality 0..n , instead 1..1.
Best regards
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.