cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh ALV View when action triggered using button

Former Member
0 Kudos

Hello Friends,

I am getting few records for one year by calling function module from wdoinit method (sy-datum - 360) as default records. I want to also give selection screen if user wants to limit to "Last 30 Days" or "Last 60 Days". (this they can select from drop down list in selection screen). So, to do this I want to refresh first the initial records that I get.

By using WebDynpro Code Wizard tool, I am getting below code to refresh alv. But, I don't know what to put after where it says "in = " Without putting anything after in = gives an error. Can anyone let me know if there is another way to refresh the alv or what should I put after in =. My Cotext node name is MY_PO_INV and the View name is MY_PO_INVOICES.

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

lo_interfacecontroller = wd_this->wd_cpifc_pres_alv( ).

lo_interfacecontroller->refresh(

in = " if_salv_wd_table=>s_type_param_refresh_in

).

Thks & Rgds,

Hemal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
lo_interfacecontroller->refresh(
in = " if_salv_wd_table=>s_type_param_refresh_in
).

Can anyone let me know if there is another way to refresh the alv or what should I put after in = 

Parameter in is of type SALV_WD_CONSTANT and can be set to any of the following values

00 -> SCOPE
01 -> ALL . 
02 -> ACTUAL  
03 -> BYNAME 
04 -> LIST 
05 -> SET  
06 -> KEY  
07 -> LOAD 
08 -> STATE . 
09 -> MAP

Note: you cannot directly pass these values, as *'in ='01'*
Use the following code :

DATA: ls_in TYPE if_salv_wd_table=>s_type_param_refresh_in.
 ls_in-dummy = '01'.

lo_interfacecontroller->refresh(
    in  =     ls_in                         " if_salv_wd_table=>s_type_param_refresh_in
  ).

Not sure if this would refresh the ALV contents, but this was just to asnwer your query regarding what does"in" hold.

But, you can definately use invalidate( ) method, which will clear the contents of your node, after which you can refill/bind it with new values.

Regards,

Radhika.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

Why do u want to approach the other methods for refreshing it.

For an instance if you want to refesh particular table or the drop down values which may be binded to the node then Simply use lo_nd_"nodename"->Invalidate( ). This will refresh your table or any thing which u want to refersh it .

Try this .

GoodDay!.

Regards,

Sana.

Former Member
0 Kudos

hi,

One way to achieve the same is invalidate the Node which is binded to ALV on the click of Action.

ln_node type ref to if_wd_contex_node.

ln_node = wd_context->get_child_node( 'MY_PO_INV' ).

lo_node->invalidate( ).

May be it helps you.

Refer following threads too for Refreshing ALV :

Thanks.

Saurav.