I would like to touch base upon an important topic "How to build Master Detail Screens in OA Framework?"Hence I will cover this topic in a series of articles. In this first part, lets do some comparison vis-a-vis D2K [Oracle Forms].

One of the most common data entry screens used in business is of type MASTER-DETAIL.
We know that is simple to build a master detail screen in D2K Forms or in Apex. It isn't too difficult in OA Framework either.

Lets begin with a high level comparison between Forms(D2k) and OA Framework, for a master detail screen.

Create the base table/viewIn case of D2k, the blocks are based either on tables or on Database Views.In case of OA Framework, both the master and the detail regions will be based on View Objects.Both these View Objects will be based on Entity Objects, if the data in both Master & Detail regions can be modified.

Oracle Forms D2K

OA Framework

Create a database view(or table) for master block and a detail block.

Create an entity object and view object for both master and detail region

Create a relation between the two blocks/regionsIn Oracle Forms, we create a relationship between the "two blocks". This relation gets created by means of a join.However in case of OA Framework, the relation does not exist between two regions. Instead the relationship exists between the two Entity Objects[Association] and also the two View Objects[via View Link]

Oracle Forms D2K

OA Framework

Create relation between the Master Block and the Detail Block

A) Create an Entity association between both entity objects.

B) Next create a view link between both the view objects (This view link can be based upon the Entity Association)

C) Attach these view objects to Application Modules

Note: In this case, by default 3 View Object instances will be created against the Application Module.1. Master VO Instance2. Detail VO Instance 3. "Detail VO Instance" attached to "Master VO Instance"The records in third View Object instance are always kept in sync with first View Object. This synchronization is managed automatically by OA Framework engine.You will find the details in Audio-Video presentation on this topic, in future parts of this article.

Commit Data

Oracle Forms D2K

OA Framework

You do not need to add a button to commit data.

"File Save" or Control-S will save changes to database.

You need to add a Submit Form button that submits the form, and then issues a commit call via AM.

How does OA Framework manage to keep child records in sync with Master record?Detail View Object keeps listening to the changes in master record navigation. At any given point in time, there can be only one single record in Master ViewObject, that will be flagged as CURRENT RECORD. Whenever the current record changes in Master Region, the Child/Detail view object gets Re-Queried. This is made possible by means of Observer Pattern, please see link for details

In D2K, we can use Key-UP or Key-DOWN to change the current Record in block. Is something similar possible in OA Framework?I am afraid not [at least for now]. To the master region, you will be adding a "Single Selection Item"."Single Selection Item" is nothing but a Radio Button against each record in Master Region.

Now to recap:-1. Master detail screens can be built using Advanced Table of OA Framework.2. You will create a radio button field on master region. 3. The record for which you select the radio button in Master Region, should be flagged as the Current Record.

In the next article, we will see how to create a. Entity Objects for both master and detail tables b. View Objects for the above Entity Objects c. Create associations between entity objects of Master and Detail d. Create link between Master & Detail view Objects

I liked your site. I would like to get a clearer picture of how to initiate an API for Order import. Should it happen from a form/report/PLSQL? Suppose I have the data which has to be entered in an Excel file, then how should I go about?

Is there any way to add frames in OAFramework? What I want to achieve is display some data in a region, which would cover just some portion of screen, and if the data is more, there would be scroll bars to scroll down , to see content of that frame region.

Hi Anil, I want to know is there any API to do adjustments to existing offer lines in Trade Management.As of now i am using ozf_offer_pub API to upadate existing offers. But not able to end date the existing offer less than the current date. Please advice.