on 06-18-2008 8:03 AM
In my Context I have a node and under the node one attribute type string.
In my coding I have lt_mailstring as a stringtable.
I bind lt_mailstring to the context node.
Executing it, I get a dynamic typeconflict between references..
Below my coding....
DATA:
l_mailstring TYPE string.
lt_mailstring like table of l_mailstring.
CONCATENATE 'mailto:' stru_node_data-smtp_addr into l_mailstring.
CONDENSE l_mailstring NO-GAPS.
APPEND l_mailstring to lt_mailstring.
navigate from <CONTEXT> to <NODE_SEARCH_DATA>
node_node_data = wd_context->get_child_node( name = `MAIL` ).
node_node_data->invalidate( ).
*fill context node
node_node_data->bind_table( lt_mailstring ).
Ok, I found out, that i have to declare a table type first.
I can't bind a string to a context I have first to make a structure...
I don't know really why i have to buld a structure but ok..
Here the new coding:
TYPES:
BEGIN OF ty_mail,
MAILADDR TYPE STRING,
END OF ty_mail.
DATA:
node_node_data TYPE REF TO if_wd_context_node,
node_node_data_tab TYPE REF TO if_wd_context_node,
elem_node_data TYPE REF TO if_wd_context_element,
stru_node_data TYPE if_componentcontroller=>element_data,
ls_mailstring TYPE ty_mail,
lt_mailstring LIKE TABLE OF ls_mailstring.
navigate from <CONTEXT> to <NODE_DATA> via lead selection
node_node_data_tab = wd_context->get_child_node( name = 'DATA' ).
node_node_data_tab->get_elements( ).
get element via lead selection
elem_node_data = node_node_data_tab->get_element( ).
get all declared attributes
elem_node_data->get_static_attributes(
IMPORTING
static_attributes = stru_node_data ).
CONCATENATE 'mailto:' stru_node_data-smtp_addr into ls_mailstring-mailaddr.
CONDENSE ls_mailstring-mailaddr NO-GAPS.
APPEND ls_mailstring to lt_mailstring.
navigate from <CONTEXT> to <NODE_SEARCH_DATA>
node_node_data = wd_context->get_child_node( name = `MAIL` ).
node_node_data->invalidate( ).
*fill context node
node_node_data->bind_table( lt_mailstring ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.