0
votes

I want to create an OData service to fetch details from two tables of SAP and fit it using Master detail template in UI5. The first table contains only the product Id and description , while the second table contains the Product Id and product details like manufacturer address,cost , exp date etc

Currently two RFC are created writing the SELECT query on the tables to generate OData service from RFC. Shall i create One Entity set and use both RFC from Read and Query each at Map to Data Source ? or create two entity sets to map one RFC for each Entity set ?

How should be the Odata service query look to develop a master detail application in ui5 fetching data from two tables ? As well as how will make a local master table in UI5 using both table which are fetched.

1

1 Answers

0
votes

Well, it depends :)

It looks like you have a 1:1 association between the product header and the details.

So you could model header and details as separate entities and define a 1:1 association between them or you could simplify you model and merge both header and detail attributes into one entity. With the information i have, i would prefer the single entity. You can use ODatas $select parameter to request only specific properties. Your DPC implementation could make use of $select and call only the header RFC if only header fields are requested.

I'm not shure if the master detail template can be used with 1:1 associations. Normally they are used with 1:n as the detail page displays a list of detail items. But you can of course leave the details unbounded in the wizard and bind additional fields later in the object header of the detail page.