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

Internal Table Data Process

Hi,

I am trying to move corresponding data of one context node data into another table context node

and getting the below error. could you pls let me know whts wrong with the below code.

Error:-LS_CREATE is not a structure or internal table with header line.

DATA lo_nd_create TYPE REF TO if_wd_context_node.

DATA lo_el_create TYPE REF TO if_wd_context_element.

DATA lt_create TYPE STANDARD TABLE OF wd_this->elements_create.

DATA ls_create TYPE wd_this->elements_create.

DATA lt_submit TYPE STANDARD TABLE OF wd_this->elements_submit.

DATA ls_submit TYPE wd_this->elements_submit.

*Get the inputs of the ALV Table.

lo_nd_create = wd_context->get_child_node( name = wd_this->wdctx_create ).

lo_nd_create->get_static_attributes_table(

importing

table = lt_create ).

LOOP AT lt_create INTO ls_create.

MOVE-CORRESPONDING ls_create TO ls_submit.

APPEND ls_submit TO lt_submit.

ENDLOOP.

Thanks,

vind

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 12:01 PM

    hi ,

    You can try decalring ls_create as ,

    DATA ls_create LIKE LINE OF lt_create .

    This would be a safer option.

    Thanks,.

    aditya.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 12:02 PM

    Hi Vind,

    First check the Cardinality of the Both Nodes,,Cardinality of both nodes should be 0..n or 1..n

    Copy the below Code

     DATA lo_nd_create TYPE REF TO if_wd_context_node.
    DATA lo_el_create TYPE REF TO if_wd_context_element.
    DATA lt_create TYPE wd_this->elements_create.  " Internal Table
    DATA ls_create TYPE wd_this->element_create.  " Work Area
    DATA lt_submit TYPE wd_this->elements_submit.  " Internal Table
    DATA ls_submit TYPE wd_this->element_submit.   " Work Area
    
    *Get the inputs of the ALV Table.
    lo_nd_create = wd_context->get_child_node( name = wd_this->wdctx_create ).
    lo_nd_create->get_static_attributes_table(
    importing
    table = lt_create ).
    
    LOOP AT lt_create INTO ls_create.
    MOVE-CORRESPONDING ls_create TO ls_submit.
    APPEND ls_submit TO lt_submit.
    ENDLOOP.
    

    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.