cancel
Showing results for 
Search instead for 
Did you mean: 

Read values from an internal table in component controller

Former Member
0 Kudos

Hi All,

I am binding an internal table in view1 to a node which is in component controller.

Now i want to read the internal table in view1 in another internal table of the same type in view2.

Using the code wizard am getting the following code

lo_el_n_table->get_static_attributes(

IMPORTING

static_attributes = ls_n_table ).

How can i read these values into my internal table?

Thanks in advance

Edited by: Mohamed Aslam on Feb 11, 2010 10:31 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think you have mapped Node1 in View1 with your component controller.

Now to access the value of internal table which is binded to Node1 , make a similar node in View2.

Map comp controller node with Node2 of view2.

Now just read the node2 in your view2. This way you will be able to access internal table data of View1 into View2.

Code to read node data into internal table :

DATA lo_nd_cn_table TYPE REF TO if_wd_context_node.
DATA it_table  TYPE wd_this->elements_cn_table.
    lo_nd_cn_table = wd_context->get_child_node( name = wd_this->wdctx_cn_table ).
    lo_nd_cn_table->get_static_attributes_table( IMPORTING table = it_table).

it_table has all data.

Edited by: Saurav Mago on Feb 11, 2010 3:05 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

thanks