cancel
Showing results for 
Search instead for 
Did you mean: 

Details data in ALV screen not refresh to new data from Master

Former Member
0 Kudos

Hi,

I  create an fpm oif application with 4 views:

- View 1:  Initial screen for input selection
- View 2 : Header View to display Sales Order in ALV Table based on input selection.
- View 3: Customer view to display Customer Data  corresponding to cursor on View 2. I use
supply function Get_customer  from parent  node in View2.  
- View 4: Details view to display Sales Item in ALV table corresponding to sale
document in View 2.  I use supply function Get_Details to populate items data based on parent node in Header
view.

I configured the application using FPM_OIF with Initial screen for input selection,
master tab for Header view 2 , 2 sub tabs for View 3 (Customer data) and View 4
(Details data).
In the layout, I have Master Tab on top of screen.  At the bottom, I have 2 sub tabs.

So when I am in top of screen (View2) , if I click on the sales order line, the
corresponding customer data is correctly display as a form layout in Sub Tab1
and if I change Header line, the supply function Get_customer is called to
populate new data and display correctly.

When I click on Sub Tab2,  at first time the data on the Details is correct. However if I move  my cursor on the master tab
to a new sales order, the details data in sub tab2 does not reflect new data.   I debug
and I see that the supply function ‘Get items”was not call to get the new parent
node data and populate item details.

If I do not display data in ALV but on the regular  table itself, I do not have this issue.  The supply function is executed everytime new data is changed.
What did I do wrong here?  I need the ALV so that I can display color,
and use Export functionality.

Below  is my code in Processing event method of Component Controller

case io_event->mv_event_id.

when if_fpm_constants=>gc_event-leave_initial_screen.

- Get all orders based on selection input into table lt_hdr
- Bind lt_hdr to header node
- Instantiate ALV usage component.
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.

lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).

lo_interfacecontroller->set_data(
        r_node_data = lo_nd_sd_hdr_doc ).

when
'FPM_TAB_CHANGE'.

Read header node via lead selection:
lo_nd_sd_hdr_doc =
 
wd_context->get_child_node( name = wd_this->wdctx_sd_hdr_doc).
    lo_el_sd_hdr_doc
->get_attribute(
      exporting name = ‘DOCNUM’ importing
value = lv_salesdoc ).
- Get_items( exporting lv_salesdoc importing lt_items).

- Bind lt_items to lo_nd_items.
- Instantiate the ALV and display item data on ALV

ENDCASE.

Your input is much appreciated.  Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


solved by myself.

Answers (0)