Skip to Content
avatar image
Former Member

How to refresh ALV Output?

Hi,

I am having selection field sales orderno and submit button, and alv control. when i select any sales orderno and click on submit button , i get relevant data in ALV . But again when i select new salesorderno in input field and click on submit button, it should refreshed ALV Output. But it shows me previous data only. I have output node calle op_node having no. of fields. when i click on submit button ,i filled internal table which i bind out node op_node . This table gets modified when i click on submit , it binds to op_node as well bt data in alv doesnt modified. so how to refresh ALV?

Thanks,

Saurin Shah

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 18, 2009 at 05:43 AM

    Hi Saurin,

    Try using 'Invalidate' method to refresh the node at the beginning of code in submit button

    lo_nd_op_node->invalidate( ).

    Regards,

    Deepthi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I have not used any refresh or invalidate statement, my ALV is getting refreshed. Here is the code -

      If you still find as not resolved, then delete the current alv and create it again and also map the DATA node of ALV again to the

      VBAK node of yours. This should work fine.

      On Submit button action -

      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      
        lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
        IF lo_cmp_usage->has_active_component( ) IS INITIAL.
          lo_cmp_usage->create_component( ).
        ENDIF.
      
        DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
        lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
        lv_value = lo_interfacecontroller->get_model(
        ).
      
        DATA lo_nd_node TYPE REF TO if_wd_context_node.
      
        DATA lo_el_node TYPE REF TO if_wd_context_element.
        DATA ls_node TYPE wd_this->element_node.
        DATA lv_vbeln TYPE wd_this->element_node-vbeln.
      
      * navigate from <CONTEXT> to <NODE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      
      * @TODO handle non existant child
      * IF lo_nd_node IS INITIAL.
      * ENDIF.
      
      * get element via lead selection
        lo_el_node = lo_nd_node->get_element( ).
      * @TODO handle not set lead selection
        IF lo_el_node IS INITIAL.
        ENDIF.
      
      * get single attribute
        lo_el_node->get_attribute(
          EXPORTING
            name =  `VBELN`
          IMPORTING
            value = lv_vbeln ).
      
      
        DATA lo_nd_vbak TYPE REF TO if_wd_context_node.
      
        DATA lt_vbak TYPE wd_this->elements_vbak.
      
      * navigate from <CONTEXT> to <VBAK> via lead selection
        lo_nd_vbak = wd_context->get_child_node( name = wd_this->wdctx_vbak ).
      
      
        SELECT * FROM vbak INTO CORRESPONDING FIELDS OF TABLE lt_vbak
        WHERE vbeln = lv_vbeln.
      
      * @TODO handle non existant child
       IF lo_nd_vbak IS not INITIAL.
       lo_nd_vbak->bind_table( lt_vbak ).
       ENDIF.

      Regards,

      Lekha.

  • avatar image
    Former Member
    Aug 18, 2009 at 05:21 AM

    Hi,

    Please write the context updation in domodify method and check. Please let me know if you are facing the problem again.

    Thanks,

    Sanjeev

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi ,

      when i click on submit, in action method, i update internal table which i binds to output table node . And that node is extended in DATA node in component usgage.

      thanks

      saurin shah

  • avatar image
    Former Member
    Aug 19, 2009 at 08:43 AM

    I sort out myself, using set_data method of ALV interface controller.

    Thanks,

    Saurin Shah

    Add comment
    10|10000 characters needed characters exceeded