on 10-28-2010 12:40 PM
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
hi ,
You can try decalring ls_create as ,
DATA ls_create LIKE LINE OF lt_create .
This would be a safer option.
Thanks,.
aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.