Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Download Template.fmb & Appstand.fmb into our local machine from


/v02/oracle/apps/apps/apps_st/appl/au/12.0.0/forms/US ($AU_TOP/forms/US) using winSCP tool.
Check whether form60 path has all the standard Plls & fmbs ,if not down load All the plls from
/v02/oracle/apps/apps/apps_st/appl/au/12.0.0/resource ($AU_TOP/resource) location and fmbs from
location /v02/oracle/apps/apps/apps_st/appl/au/12.0.0/forms/US ($AU_TOP/forms/US) into local
machine and set the FORMS_PATH
Setting Oracle 10g forms FORMS_PATH in REGEDIT(Registry Editor)
Start Run REGEDIT HKEY_LOCAL_MACHINE SOFTWARE ORACLE
KEY_DevSuiteHome1 FORMS_PATH

Open the TEMPLATE.fmb using form builder.


Change the module name to your required form name.
GoTo File SaveAs the form as same as the module name (i.e Form name & module name should be the
same).
Module Name : XXAA_MASTER_DETAIL_FORM
Title : XXAA Master Details Form

Oracle 10g Forms Development Training Manual

Delete the default blocks, windows, canvases (ex: BLOCKNAME).

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

0
Create a window and assign window property class to windows.
Window Name : XXAA_MASTER_DETAIL_FORM

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Create a canvas assign the canvas property class to Canvas.

Assign windows to canvas

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Assign canvas to window.

Create the Master and Details tables in apps schema, Create a master table with primary key and detail table with
foreign key

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

CREATE TABLE XXAA_MASTER_TABLE


(
DEPTNO
NUMBER (2),
DNAME
VARCHAR2 (14),
LOC
VARCHAR2 (13),
CONSTRAINT PK_MASTER_DEPTNO PRIMARY KEY (DEPTNO)
);
CREATE TABLE XXAA_DETAIL_TABLE
(
EMPNO
NUMBER (4) NOT NULL,
ENAME
VARCHAR2 (10),
JOB
VARCHAR2 (9),
MGR
NUMBER (4),
HIREDATE
DATE,
SAL
NUMBER (7, 2),
COMM
NUMBER (7, 2),
DEPTNO
NUMBER (2),
CONSTRAINT PK_DETAIL_EMPNO PRIMARY KEY (EMPNO),
CONSTRAINT FK_DETAIL_DEPTNO FOREIGN KEY (DEPTNO) REFERENCES XXAA_MASTER_TABLE (DEPTNO)
);

Create a data block using wizard based on a required table.(MASTER)

Oracle 10g Forms Development Training Manual

Select the master table and move the columns to right side and click on next button

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Click on Next button

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Enter the master block name and click on next

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Create the convas with wizard based on the datamodel by selecting the option

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Select the Convas and move the required fields to right side and click on next

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Change the fields height and width and click on next

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Select the form for we can arrange the values based on the requirement.

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Enter the master block frame if required and click on next

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Click on finish

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Create a data block using wizard based on a required table.(DETAIL)


Click on Master block and click on new button

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Select Detail table and move the required columns to right side click on next

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Click on Create Relationship and sect Auto join

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Enter the Detail block name

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Move the required fields to right side and click on next

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Enter the fields size and prompt.

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Select the tabular option to show the fields on table type

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Enter the records to displayed on the forms and select the scroll bar

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

Assign all text item property class to all items in the data block.

Modify PRE_FORM trigger at the form level.


Ex:- app_window.set_window_position ('WINDOW NAME', 'FIRST_WINDOW');
As Ex:- app_window.set_window_position('XXAA_MASTER_DETAIL_FORM', 'FIRST_WINDOW');

Modify the app_custom package Body in the program unit.

Oracle 10g Forms Development Training Manual

Code : sample

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

package body app_custom is


PROCEDURE close_window (wnd IN VARCHAR2)
IS
BEGIN
IF (wnd = 'XXAA_MASTER_DETAIL_FORM')
THEN
app_window.close_first_window;
END IF;
END close_window;
PROCEDURE open_window (wnd IN VARCHAR2)
IS
BEGIN
IF (wnd = 'XXAA_MASTER_DETAIL_FORM')
THEN
GO_BLOCK ('XXAA_DETAIL_BLOCK');
END IF;
END open_window;
end app_custom;

Modify the module level properties .


Consol window: give your window name.(XXAA_MASTER_DETAIL_FORM).

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

First_navigation data block : your block_name(XXAA_MASTER_BLOCK).

Save and compile the form(.fmb).


Move the form(XXAA_MASTER_DETAIL_FORM.fmb) to the $AU_ TOP/forms/US using WINSCP.
Compile the forms in the $AU_TOP/forms/US by frmcmp command using WINSCP.
EX:
cd $AU_TOP/forms/US
frmcmp_batch module=XXAA_MASTER_DETAIL_FORM.fmb userid=APPS/APPS
output_file=$CUSTOM_TOP/forms/US/XXAA_MASTER_DETAIL_FORM.fmx
cp XXAA_MASTER_DETAIL_FORM.fmb $CUSTOM_TOP/forms/US/XXAA_MASTER_DETAIL_FORM.fmb
chmod 777 $CUSTOM_TOP/forms/US/XXAA_MASTER_DETAIL_FORM.fmb
chmod 777 $CUSTOM_TOP/forms/US/XXAA_MASTER_DETAIL_FORM.fmx
cd $CUSTOM_TOP/forms/US

Oracle 10g Forms Development Training Manual


Now open the apps front-end and open the Forms Form in below Navigation.
Nav : Application Developer Application Form

Form Name
Application
User Form Name
Description

: XXAA_MASTER_DETAIL_FORM
: CUSTOM APPLICATION
: XXAA_MASTER_DETAIL_FORM
: XXAA Master Details Form

Register the forms to the form function


-->Description
Function
: XXAA_MASTER_DETAIL_FORM
User Function Name
: XXAA_MASTER_DETAIL_FORM

Raju Chinthapatla

Oracle 10g Forms Development Training Manual


Description
-->Properties
Type
-->Form
Form

: XXAA Master Details Form


: Form
: XXAA_MASTER_DETAIL_FORM

Nav: Application Developer application Function

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Query the menu and attach the Form function to the Menu.
Nav : Application Developer Application Menu
Menu
User Menu Name
Seq
Prompt
Function
Description

: FND_DEVNAVIGATE4.0
: Navigator Menu - Application Developer GUI

: 119
: XXAA Master Details Form
: XXAA_MASTER_DETAIL_FORM
: XXAA Master Details Form

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

This Menu FND_DEVNAVIGATE4.0 (User Menu Name : Navigator Menu - Application Developer GUI)
is attached to Application Developer Responsibility.

Oracle 10g Forms Development Training Manual


Open the form by clicking XXAA Master Details Form

Query the form.

Raju Chinthapatla

Oracle 10g Forms Development Training Manual

Raju Chinthapatla

You might also like