As I mentioned, you can find examples of using non-persistent entities in Timesheets sample application.
Look at fillExistingTimeEntries() method of the ApproveScreen class. It fills up the datasource with instances of non-persistent WeeklyReportEntry entity.
The first thought which came to my mind is to create a database view with “select … union …” and map it to an entity. Then use standard platform facilities to show the entity in UI. Probably this is too rigid and doesn’t solve your problem.
More flexible way would be to create two identical persistent entities and map them to your tables. Then create a non-persistent entity with the same set of attributes.
In your screen, define a datasource for the non-persistent entity and set refreshMode=“NEVER” for it (see for example approve-screen.xml in Timesheets sample application). In the screen controller, fill up the datasource using its addItem() or includeItem() methods. The non-persistent entity instances can be created either right in the screen, or in a middleware service. In the former case, you can use standard datasources for your persistent entities to load.
I created 2 persistent entity and one non persistent entity. then created a screen"Master data" that extends LookupWindow and added datasource for non-persistent entiry. But I don’t see link to new screen in main application. where do we link new screen?