à 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
à Delete the default blocks, windows, canvases (ex: BLOCKNAME).
à Create a window and assign window property class to windows.
Window Name : XXAA_MASTER_DETAIL_FORM
à Create a canvas assign the canvas property class to Canvas.
à Assign windows to canvas
à 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
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)


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

à Click on Next button

à Enter the master block name and click on next

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



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

à Change the fields height and width and click on next

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

à Enter the master block frame if required and click on next

à Click on finish



à Create a data block using wizard based on a required
table.(DETAIL)
Click on Master block and click on new button

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

à Click on Create Relationship and sect Auto join



à Enter the Detail block name

à Move the required fields to right side and click on next

à Enter the fields size and prompt.

à Select the tabular option to show the fields on table type

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


à 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.

Code : sample

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).
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
à Now open the apps front-end and open the Forms Form in below
Navigation.
Nav : Application Developer àApplication àForm

Form
Name
: XXAA_MASTER_DETAIL_FORM
Application
: CUSTOM APPLICATION
User Form
Name : XXAA_MASTER_DETAIL_FORM
Description
: XXAA Master Details Form
à Register the forms to the form function
-->Description
Function
: XXAA_MASTER_DETAIL_FORM
User Function
Name :
XXAA_MASTER_DETAIL_FORM
Description
: XXAA Master Details Form
-->Properties
Type
: Form
-->Form
Form
: XXAA_MASTER_DETAIL_FORM
Nav: Application Developer àapplication àFunction



à Query the menu and attach the Form function to the Menu.
Nav : Application Developer àApplication àMenu
Menu
: FND_DEVNAVIGATE4.0
User Menu Name : Navigator Menu -
Application Developer GUI
Seq
: 119
Prompt
: XXAA Master Details Form
Function :
XXAA_MASTER_DETAIL_FORM
Description : XXAA Master Details Form

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

à Open the form by clicking ‘XXAA Master Details Form’
à Query the form.

No comments:
Post a Comment