Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh ALV IDA with CDS

frankgutknecht
Participant
0 Kudos

Hello,

I'm using the SAP Listviewer with Integrated Data Access (ALV with IDA) with a core data service. I implemented a toolbar function to delete purchase order sets. After the user deleted a purchase order set I want to refresh the ALV to display the updated data.

How does it work?

Thanks!

Best Regards

Frank

5 REPLIES 5

Former Member
0 Kudos


Hi Frank,


I am not sure this is right answer for your requirements.


Previously i am faced same issue. I resolved in below manner.


After deleting purchasing order, update ALV with in new internal table & calling display function with the new internal table again.


Result came, worked fine.



Hope it is useful for you.


Thanks,

MSB.


0 Kudos

Hello,

I'm not using a internal table, I'm using a Core Data Service. Can you provide me your code? Maybe I can adapt it for my requirements.

Thanks!

0 Kudos

Hi Frank,

Sorry about code.

Outline Procedure flow like below.

Dispay (ALV).

{

Delete (

     {   

          Updated internal Table

          Display

     }

}

Regards,

MSB.

conny
Newcomer

This might be too late for you but maybe it helps someone else.

I was searching for a way to refresh the ALV display (IDA + CDS view). Scrolling seems to read only from buffer as new entries added in the meantime on the database are not displayed. And I don't want the user to sort/filter columns only to have an update on the displayed entries.

So I added a new refresh button to the application toolbar.

In the SAP report SALV_IDA_TOOLBAR_FUNCTION you can see how to do this.


If my refresh button is pushed, an event method will be called.


In this method when the import parameter ev_fcode has the function code for my refresh button, all I do is give the table with the collected select options tables (from selection screen) again:

   go_alv->set_select_options( it_ranges = t_collected[] ).


This triggers a new DB select and new entries are displayed.


In report SALV_IDA_TOOLBAR_FUNCTION this is done too (see method  set_selection_from_toggle_stat).

0 Kudos

Yaaay, thanks! Worked like a charm. I would not have thought of this way.