05-09-2016 10:29 AM
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
05-09-2016 10:52 AM
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.
05-09-2016 11:06 AM
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!
05-09-2016 12:18 PM
Hi Frank,
Sorry about code.
Outline Procedure flow like below.
Dispay (ALV).
{
Delete (
{
Updated internal Table
Display
}
}
Regards,
MSB.
07-22-2016 1:45 PM
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).
01-13-2021 3:15 PM
Yaaay, thanks! Worked like a charm. I would not have thought of this way.