You are on page 1of 3

How to develop a new form for Oracle Applications

POSTED BY ABHIJIT RAY AUGUST 15, 2012 3 COMMENTS


FILED
UNDER APPCORE_PROPERTIES, APP_CUSTOM, APP_WINDOW, AU_TOP, BLOCKNA
ME, CLOSE_FIRST_WINDOW, F60GEN, FIRST NAVIGATION
BLOCK, FRMCMP_BATCH, PRE-FORM, SET_WINDOW_POSITION, TEMPLATE.FMB
To develop a new custom form for Oracle Applications the following steps have to be followed.

Step 1: Open TEMPLATE.fmb


Open Forms Builder (For Oracle Apps 11i it is Forms 6i and for Oracle Apps r12 it is Forms 10g)
If the Forms Builder library path is set as the previous article, open the file TEMPLATE.fmb.
This file will reside in the same directory as the library files if you have downloaded all the
library files from the server.

Step 2: Change the form name and Title


Open the properties of the form. Double click on the form name to bring up the properties.
Change the Name and Title properties.

Step 3: Change the form name in PRE-FORM trigger


We shall first add the version, author name and date of the form by changing,
1FND_STANDARD.FORM_INFO('$Revision: 115.12
2 '$Date: 2003/12/19 11:02 $', '$Author: appldev $');
to
1FND_STANDARD.FORM_INFO('$Revision: 115.12
2 '$Date: 2012/08/13 11:02 $', '$Author: Ray $');
This is done so that we can get this information by using the strings <form
name>.fmb command in unix to view the form creation/modification information.
Change the following line,
1 app_window.set_window_position('BLOCKNAME', 'BLOCKNAME');
to
1 app_window.set_window_position('NEW_WINDOW', 'FIRST_WINDOW');

Step 4: Create a new data block


Create a new data block either manually adding or by using the wizard

Step 5: Create a new canvas.


You can use the wizard or create the canvas manually. The canvas we created is named

The canvas looks like this,

If you created the canvas using the wizard you might want to rename it.

Step 6: Create a new window


Create a new window manually with only the basic details

Window properties

Step 7: Attach the window to the canvas


Now check the properties of the canvas created

The value of property Window is set to APPCORE_PROPERTIES by default as we had used


the wizard to create the canvas.
We shall set it to the new window named, NEW_WINDOW.

Step 8: Add the window in the package, APP_CUSTOM


Go to Program Units within the form.

Double click on APP_CUSTOM package body. Locate the following section within the
package,
1 if (wnd = '') then
2 app_window.close_first_window;
3 elsif (wnd = '') then
4 --defer relations
5 --close related windows
6 null;
7 elsif (wnd = '') then
8 --defer relations
9 --close related windows
10 null;
11 end if;

Add the name of the window you have created now to this section. It will look like the following,
1 IF (wnd = 'NEW_WINDOW')
2 THEN
3 app_window.close_first_window;
4 ELSIF (wnd = '')
5 THEN
6 --defer relations
7 --close related windows
8 NULL;
9 ELSIF (wnd = '')
10 THEN
11 --defer relations
12 --close related windows
13 NULL;
14 END IF;

Step 9: Change First Navigation Block Name


We shall change the First Navigation Block name for the form so that the first block it picks up
will be the data block we have created
Click on Form name

View the properties

As you can see the First Navigation Data Block is set to BLOCKNAME by default. Change
this to the data block we have created, i.e.XX_SUPPLIER_BLACKLIST.

Step 10: Set the correct subclass information


Set the subclass information for all the form objects, like data block, canvas, window, items, etc.
It will be set like the following,
We shall set the subclass for the data block we have created,

Open the properties of the block

Click on Subclass and the subclass popup window will open. Set the correct class name to it.

Click on OK.

The subclass will be set. Close the properties window.

Now notice the arrow on the block. It means that the subclass is set.

Step 11: Save and transfer the file to the server


Now you can save the file and transfer it in binary mode to the server. The fmb file should reside
in $AU_TOP/forms/US directory.

Step 12: Compile the form


Connect to the server and execute the following command to compile the form.
In Oracle 11i the command will be,
1 f60gen userid=apps/ module_type=form module=$AU_TOP/forms/US/</pre>
2 <form name="">.fmb output_file=/</form><form name="">.fmx compile_all=special
In Oracle r12 the command will be,
1 frmcmp_batch userid=apps/ module=<$AU_TOP/forms/US/</pre>
2 <form name="">.fmb output_file=/</form><form name="">.fmx compile_all=special
Now the form is ready to be used.
Appendix:
To display debug messages in forms
Use the API, FND_MESSAGE.DEBUG. In the following example we have used this API in
a PRE-UPDATE trigger.

When we update the data in the form we get a popup message like the following

You might also like