Skip to Content
author's profile photo Former Member
Former Member

typeconflict while context binding string

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 ).

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 08:10 AM

    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 ).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.