Skip to Content

Refresh ALV in WebDynpro

Hi experts,

I inserted a button on a standard screen, with the purpose of selecting all the checkboxes of the ALV display column. But clicking on it does not.

DATA lo_componentcontroller TYPE REF TO ig_componentcontroller,
     lr_node                TYPE REF TO if_wd_context_node,
     tl_nuli_nutr           TYPE STANDARD TABLE OF wd_this->element_nuli_nutr, 
     vl_checkbox            TYPE wdy_boolean VALUE 'X'.

FIELD-SYMBOLS: <wl_nuli_nutri> TYPE /plmb/s_lbl_nuli_nutr_ui.

lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).

lr_node = wd_context->path_get_node( path =  'NULI.NULI_NUTR' ).

    table = tl_nuli_nutr ).

LOOP AT tl_nuli_nutr ASSIGNING <wl_nuli_nutri>.
  <wl_nuli_nutri>-flg_show_item = vl_checkbox.

lr_node->invalidate( ).

    new_items            = tl_nuli_nutr 
    set_initial_elements = abap_true  

I searched and found some content here, but I still have not got the solution.




img1.png (96.3 kB)
img2.png (214.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Nov 22, 2018 at 08:18 PM

    You are invalidating the node before you bind the table. Try commenting lr_invalidate. One more thing I believe you need not declare that vl_chekbox, a simple <wl_nuli_nutri>-flg_show_item = abap_true should suffice.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 23, 2018 at 01:17 PM

    Hmm, It's a simple requirement.

    Here is my analysis on where it could go wrong:

    Check the mapping between component controller and view controller.

    Instead of getting the component controller reference, read the context node from the view controller and update the binding. Please check if there is another event handler or hook method(WDDOMODIFY) that is getting triggered after your change which might modify the binding.

    Unfortunately, as I cannot know the sequence of methods that get called all I can make is assumptions. I'm confident this will work and you will be able to figure out the fix.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Sai,
      Thanks for reply. Unfortunately we could not sort it out as we would have liked. We ended up using another standard class method (UPDATE), less performative, but refresh the ALV.