cancel
Showing results for 
Search instead for 
Did you mean: 

moving an itab from one view to another

Former Member
0 Kudos

Hello,

I am having a similar problem like the following:

I followed the same procedure as described, but still i don't know for what reason i don't get any values in my second view. I followed the following procedure:

1. Create a class ZCL_WD_COMPONENT_ASSISTANCE derived from CL_WD_COMPONENT_ASSISTANCE with the following attribute:

Attribute: MY_RANGE_TABLE

Level: Instance Attribute

Visibility: Public

Typing: Type Ref To

Associated Type: DATA

Save and Activate this when done.

2. Next i assign this newly created class as an Assistance Class for my WDA application.

3. Next in my first view, WDDOINIT method i have entered the following code:

method wddoinit .
  data: lt_range_table type ref to data,
        rt_range_table type ref to data,
        read_only      type        abap_bool,
        typename       type        string.

  data: lr_componentcontroller type ref to ig_componentcontroller,
        l_ref_cmp_usage type ref to if_wd_component_usage.

  l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
  if l_ref_cmp_usage->has_active_component( ) is initial.
    l_ref_cmp_usage->create_component( ).
  endif.

   wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).

  wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).

  lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'S_CARR_ID' ).

  wd_this->m_handler->add_selection_field(
    i_id        = 'S_CARR_ID'
    it_result   = lt_range_table
    i_read_only = read_only ).

  lt_range_table = wd_this->m_handler->create_range_table(
      i_typename = 'S_CONN_ID' ).

  wd_this->m_handler->add_selection_field(
    i_id = 'S_CONN_ID'
    it_result = lt_range_table
    i_read_only = read_only ).

  wd_assist->my_range_table = lt_range_table.
endmethod.

4. Now in my second view, WDDOINIT method i have following code:

method wddoinit .
  DATA: lt_range_table type ref to data.
lt_range_table = wd_assist->my_range_table.
endmethod.

Here above in my second view when i do debug and try to check for the data in wd_assist->my_range_table, it shows 0. Why is it that i don't get the value passed to this attribute? Did i miss anything?

Also, where and when exactly does the data binding occur from Select-Options screen to lt_range_table?

Thanks and Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vasu,

For your case, You create M_handler attribute in Component controller instead of creating a same in that view itself. So you can get the selection fiedl informaion where ever you want by using the M_handler method.

I hope this will be clear.

Warm Regards,

Vijay

Answers (0)