cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh Issue with the ALV

Former Member
0 Kudos

I am working with SAP supplied "Event Management" application (/saptrx/em_wd_ui). When users choose a record to update, a popup opens with the timestamp details. By clicking on the 'Send' button, status gets upadted in the backend. But this won't refresh the underlying ALV table. There is an 'Apply' button which needs to be clicked to refresh the ALV table.

There is a new requirement to refresh the ALV table when ever the user cilcks the 'Send' button from the popup.Component which contains the ALV table is < 

WD_CPIFC_EM_LIST_ALV_USAGE

>. Added this component inside componentcontroller. Using code wizard generated the following code

 

 

DATA

 

lo_interfacecontroller TYPE REF TO

iwci_salv_wd_table .
lo_interfacecontroller = wd_this->WD_CPIFC_EM_LIST_ALV_USAGE( ).
lo_interfacecontroller->refresh( ).

>

While trying to activate getting the following message.
< The result type of functional method cannot be converted to lo_interface controller >

Saw some earlier threads on this issue. ALV table is there in the compcontroller as well as in the view I am trying to add the code. What could be the issue?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you for your responses. Could you please provide me some code snippets to bind the table and in which method this binding need to be addressed. Just one month old in webdynpro ABAP so requesting even basic stuff.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Once the data is changed in the internal table, just provide nodename->bind_table( internal table name ).

Former Member
0 Kudos

This is already there

 

node->bind_table( lt_navtab ).

Still refresh doesn't work

chengalarayulu
Active Contributor
0 Kudos

Nag,

select query should be executed before bind_table..

and there, initial_elements should be abap_true.

bind_table( new_items = lt_navtab set_initial_elements = abap_true ).

chengalarayulu
Active Contributor
0 Kudos

did you found the key.

Former Member
0 Kudos

Sorry for the delay. I was down with fever and not able to login. The issue still persists.

I want some help to try out an alternative way.

As explained in my first post, there is an Apply button in the main screen which is able to refresh the screen, Is it possible to trigger that action when I click on the button in the popup screen?

If so please let me know

Thank you!

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Just try to call the relevant code written for Apply button in the pop up screen button.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

If you want to use standard refresh method, you need to pass value for the parameter in.

   DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).

  lo_interfacecontroller->refresh(
    in =                                " if_salv_wd_table=>s_type_param_refresh_in

  ).

It has the following fields in the structure:

    action             type salv_wd_constant,
      list_type          type salv_wd_constant,
      view               type wdr_pers_variant,
      config_key         type wdy_config_key,
      is_model_requested type wdy_boolean,
      default_model      type s_type_default_model,

Former Member
0 Kudos

I am using the same only. Here is my code

 

DATA

lo_interfacecontroller TYPE REF TO IWCI_SALV_WD_TABLE .
lo_interfacecontroller ?= wd_this->WD_CPIFC_EM_LIST_ALV_USAGE( ).
DATA: ls_in TYPE if_salv_wd_table=>s_type_param_refresh_in.
ls_in-dummy =
'01'.
lo_interfacecontroller->refresh(
in

= ls_in ).

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

I am not getting any error if I use the code. But I am not using ?=. I am able to activate and execute.

  

DATA

 

lo_interfacecontroller TYPE REF TO IWCI_SALV_WD_TABLE .
lo_interfacecontroller = wd_this->WD_CPIFC_EM_LIST_ALV_USAGE( ).
DATA: ls_in TYPE if_salv_wd_table=>s_type_param_refresh_in.
ls_in-dummy =
'01'.
lo_interfacecontroller->refresh(
in

= ls_in ).

Former Member
0 Kudos

When I remove ?=, I am facing the following error at the time of activation.

The result type of the functional method cannot be converted into the type of LO_INTERFACECONTROLLER

Former Member
0 Kudos

Jayaraman,

I am currently using 7.02 version. Are you using same version? I checked with other people who are using 7.01 version, they are also not facing any issues with my code. I am trying to enhance SRM components.

Former Member
0 Kudos

Jayanthi,

Here is my code, now error is gone, but still refresh is not working.

 

DATA

lo_INTERFACECONTROLLER TYPE REF TO /SAPTRX/IWCI_EM_LIST_ALV_CPT .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_em_list_alv_usage( ).

DATA lv_rcl_emalv_cmp TYPE ref to iwci_salv_wd_table.
lv_rcl_emalv_cmp = lo_interfacecontroller->get_emalv_cmp( ).

DATA: ls_in TYPE IF_SALV_WD_TABLE=>s_type_param_refresh_in.
ls_in-dummy =
'01'.
lv_rcl_emalv_cmp->refresh(
in

= ls_in ).

Could you please help me out

chengalarayulu
Active Contributor
0 Kudos

Nag,

so, as per my understanding, you are triggering an event/action on ALV right?

then, just re-perform the data binding to the ALV node. Means somewhere you are binding the values to the ALV table right.. this code might be in your one of methods. recall that method. it will be auto refreshed.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Just bind the table again after the changed data to the context.

chengalarayulu
Active Contributor
0 Kudos

use this correction.

lo_interfacecontroller ?= wd_this->WD_CPIFC_EM_LIST_ALV_USAGE( ).

Former Member
0 Kudos

The compile time error was fixed. I am now getting the following error at runtime

Dynamic Type conflicts when assigning References

Could you please help me out what the issue can be

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

I hope you have a method called refresh in component controller. You want to call that in your SEND button which may be in view.

Error seems to that in the way it is called.

Use Code wizard to select the method refresh from the component controller. I hope it will be ok then.