cancel
Showing results for 
Search instead for 
Did you mean: 

Change data before data binding to table

Former Member
0 Kudos

Hello colleagues,

Now I have a request to delete some rows before the data displayed in table, how can I make it?

My idea is first fetching the data to be displayed, and delete, the rebind it to table manually.

But I have no idea about detail approach, e.g. which method I can call?

Do you have any similar experience, please share with me.

Many Thanks,

Emily

Accepted Solutions (0)

Answers (1)

Answers (1)

saurabh_vakil
Active Contributor
0 Kudos

Hi Emily,

You mean before displaying the records in your table, you need to delete some records just from the table display and not from the database itself? Or do you want to delete these records from the back end and then display the remaining records in your table?

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh,

Thanks for your reply.

Based on our business scenario we can't avoid duplicated records in CDS View, so that we can support some complicated filter and search function.

Then the idea is before we display data in table, we want to delete the duplicates just for UI display, not delete from db because the duplicates is caused by some table association and join. Data in database is totally correct.


Thank you and regards,

Emily

Patrick_vN
Active Contributor
0 Kudos

Have you considered the UNION statement? (cfr CDS View Syntax Options - SAP HANA Developer Guide for SAP HANA Studio - SAP Library)

If not, SORT and DELETE ADJACENT DUPLICATES in the oData service I guess.

Former Member
0 Kudos

Hi Patrick,

Yes, now our approach is, sort and delete adjacent duplicates in the oData service. Performance is not so good but acceptable.

Thank you very much.

Regards,

Emily