<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content



Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home arrow Technical Articles arrow Oracle Application Framework arrow Master Detail Screen In OA Framework Part-I
This website has now moved to http://apps2fusion.com

Master Detail Screen In OA Framework Part-I | Print |  E-mail
Written by Anil Passi   
Monday, 20 August 2007
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/view
In 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/regions

In 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 Instance
2. 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

Comments (15)add
written by thirumalai , August 22, 2007
hellow passi sir,
I am new in oracle apps now am joined in company like yantro s/w ltd before one month so how to develope in my apps knowledge from basic.
written by Aniket Mahajan , August 25, 2007
Dear Anil

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?


written by pb , August 29, 2007
Hi Anil,

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.

Thanks in advance

written by Anil Passi , August 30, 2007
Hi Puja

Not that I am aware of
You cant implement vertical scrollbars in OAF, as yet.

written by kishorem , September 01, 2007
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.

Kishore M.
written by Ramakrishna Kandula , September 09, 2007
Hi All,

I need some help on cash management - Bank Statement Inbound Interface


Payables outbound interface is populating bank statement related information into a custom table from there we are picking up the data and loading into open interface tables of cash management.

The data is getting inserted into open interface tables but when we run the bank statement import program the data is not getting loaded into base tables.


The statement number is still being show an "Negotiable" when i navigate to cash management super user ressponsibility and check in "Payments" function.

I need some information like:
> What is the mandatory data that is required to be passed to Bank Statement import program.
currently i am passing P_option,bank_branch_name and bank_branch_id

Please help regarding this...

written by Pravin , September 10, 2007
I find ur site very helpful...Thanks a lot.

Sir request you plz if we can get the next article on Master-detail Screen(detail article).

written by Pravin , September 11, 2007
Hi Anil,
Thanks for all your article.But i have one request....can u plz show one demo (say downloading one xml file and customizing it and uploading the same) using OA Framework.

Master-Detail in OAF
written by prudhvi , October 10, 2007
Hi Anil,

Thanks for the information on Master Detail relation ships in OAF.
But can you please clarify me a bit more on this.

Here is my requirement.
lets say we have two tables ( EMP , DEPT ) and deptno is the common column in both the tables.

Requirement is :

I need to build a OAF page that displays all employees of the same department in a single row as differnt columns.


DEPT table

deptno dname
10 comp
20 civil
30 testing

EMP table

empno ename deptno
101 mike 10
102 john 10
103 ram 20
104 krish 20
105 bal 20
106 gopi 30

Desired Output

Deptno empno ename empno1 empname1 empno2 empname2
10 101 mike 102 john
20 103 ram 104 krish 105 bal
30 106 gopi

Can you please help me on this ?
Is this kind of output is possible with OAF ?
if so can you please explain how we can acheive .

written by Anil Passi , October 11, 2007
Hi Krishna

You can create a view object on a SQL that returns records from a FUNCTION

For example, see the steps below

emp_id INTEGER,
emp_name VARCHAR2(100),
emp_id_1 INTEGER,
emp_name_1 VARCHAR2(100)

CREATE OR REPLACE TYPE xx_emp_tables AS TABLE OF xx_emp_records;

RETURN xx_emp_tables
loop_variable_emp_id INTEGER := 1000;
loop_variable_emp_name VARCHAR2(100) := 'Anil';
loop_variable_emp_id_1 INTEGER := 1001;
loop_variable_emp_name_1 VARCHAR2(100) := 'Passi';
--LOOP for specific dept id
PIPE ROW(xx_emp_records(loop_variable_emp_id, loop_variable_emp_name,loop_variable_emp_id_1, loop_variable_emp_name_1));
END xx_get_emp;

FROM TABLE (xx_get_emp(CURSOR (SELECT d.deptno, d.dname
FROM scott.dept d)))

Now your view object will be based on the above select statement.

You will haev to agree upfront for the number of records that you wish to display horizontally.

If you want to have unlimited[in theory] number of columns, then I suggest you create a RawText item, and programatically build HTML to create the desired columns.

Anil Passi
Thanks a lot
written by prudhvi , October 15, 2007
Thanks a lot anil.
Master-Detail OAFramework
written by Natraj , October 18, 2007
Hi Anil,
It would be nice,if you can post an Audio-Video version of Master-Detail screen.
written by tk , December 07, 2007
Hey, Anil,

I want to thank you for your session. It is very helpful. I have an opposite request from prudhvi's. Here is my assignment.

I have a master table like transaction and two detail tables, payment_method and transaction_fees. The record is as the following.

Transaction table
id, transaction key
1, 111
2, 112
3, 113

transaction_fk_key, method_name
1, visa
2, mastercard
3, cashcheck

transaction_fk_key, seller_fee, buyer_fee, shipping_fee
1, Y, N, Y
2, N, Y, Y
3, N, N, N

I need to display the master/detail with radio button to display the detail record by chosen master record as the following.

1 visa -- picked
2 master
3 cashcheck

detail ...
transaction id:1
buyer_fee Y/N (Message Choice)
seller_fee Y/N (Message Choice)
shipping_fee Y/N (Message Choice)

I am new to OA framework. I am not for sure if the detail record could be converting to an arry from a row record. Can you give me some direction? I shall very appreciate your helps.

Master Detail on the Same PG
written by ksivasan123 , December 15, 2007
Hi Anil,

Excellent Work.

Can you please tell us the Master Detail OA framework with Insert/Update/Delete using PPR.

master/detail report
written by james , February 22, 2008
any plans on posting an Audio-Video version of Master-Detail screen creation steps. your website and input is appreciated.
You must be logged in to a comment. Please register if you do not have an account yet.