on 2022 Nov 04 9:00 AM
Hi Experts,
I'm currently working on a UI5-project (oData version 4), where I want to read the content of two different tables from the Backend and display them in one table in the Frontend. Reading the content of one table and displaying it in the Frontend works fine but I can't find a solution on how to read the content of both and merge them into one big table.
E.g. I've got table1 (database table) with veggies and table2 (also database table) with fruits. They've got both the same properties like weight, price, expiration date but also have got some different properties.
In the Frontend I now want to display all the fruits and veggies in a singular table that only has the shared properties as columns (weight, price, expiration date).
Thanks in advance
Request clarification before answering.
Hi,
You will need to select the two tables with same properties and use APPENDING TABLE to combine the two tables whose properties are same. APPENDING TABLE works the same way as UNION in SQL.
e.g.
statement 1: SELECT * FROM TABLE1 INTO itab_veg_fruit.
statement 2: SELECT * FROM TABLE2 APPENDING TABLE itab_veg_fruit.
Regards,
Dominic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank for very much for your response! Although it was not quite the solution I was asking for, you showed me that I might have been thinking about my problem the wrong way around trying to find a solution in the frontend and not in the backend.
Still I wonder if there is no way to actually combine the two tables in the *frontend*...
Cheers
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.