To Customize a forms for Oracle Apps Environment.
Take the template (base form) from $AU_TOP (Application Utility Area)
Open the template in Forms6i environment, and rename it.
Keep the new form (renamed) in $ AU_TOP/forms/US using FTP.
Compile & generate the form at $ AU_TOP/forms/US using Telnet.
To compile & generate the form , use following command
i. <f60gen module=Form.fmb userid=apps/apps
Move this fmb file to $ your_top/forms/US
Launch Oracle Apps Environment
Log in as Application Developer Responsibility , to register the form ( name of the Form must match with the fmb file name)go application ->form
Create a function and assign the form to the function.
Create a menu and assign the function to it
Assign this to main menu.
Create a table and register it
Launch Form Builder (Forms 6i)
Triggers to be Modified on Form Level WHEN-NEW-FORM-INSTANCE (Form Level)
FDRCSID('$Header: C21_FORM.fmb 115.11 2000/05/25 17:27:44 pkm ship $');
APP_STANDARD.EVENT('WHEN-NEW-FORM-INSTANCE');
PRE-FORM TRIGGER (FORM LEVEL)
FND_STANDARD.FORM_INFO('$Revision: 115.11$', 'Form_Name', 'Application Short Name','$Date: 2000/05/25 17:20 $', '$Author: appldev $');
app_standard.event('PRE-FORM');
app_window.set_window_position('Window_Name', 'FIRST_WINDOW');
Create a window, canvas and create a block using Wizard . Inherit the property classes as required for different fields.
To add calendar to Date item:
subclass and inherit the text_item_date value from thre list
Set the list of value to ‘ENABLE_LIST_LAMP’ (Validate_From_List = No)
Add trigger Key-Listval (CODE- >CALAENDAR.SHOW) To add the calendar to this field.
Set Fire-Enter-Query Mode – NO
Execution Hierarchy – Override.
Event Handler Procedures
Create Pkg Specification PACKAGE EVNT_HND_PKG IS
PROCEDURE PRE_UPDATE;
PROCEDURE PRE_INSERT;
PROCEDURE PRE_FORM;
END C11_PKG;
Create Pkg Body PACKAGE BODY EVNT_HND_PKG IS PROCEDURE PRE_UPDATE IS BEGIN FND_STANDARD.SET_WHO; END PRE_UPDATE; PROCEDURE PRE_INSERT IS BEGIN FND_STANDARD.SET_WHO; END PRE_INSERT; END;
Call these Event Handlers at Block Level Using Pre-Insert and Pre-Update triggers
Block Level Post Query Trigger add following code set_record_property(:system.trigger_record,:system.trigger_block,STATUS,QUERY_STATUS);
To add DFF (Descriptive Flex Fields)
Log in as Application Developer Responsibility
Create DFF and assign the Segments
Create a non data base item (NDBItem) and subclass it to text_item_desc_flex
Required -> NO
Set LOV to ‘Enable_List_Lamp’
Validate from List ->No
Create Program Unit
PROCEDURE DFF_DESC(EVENT VARCHAR2) IS
BEGIN
IF (EVENT='WHEN-NEW-FORM-INSTANCE') OR (EVENT='WHEN-VALIDATE-ITEM') THEN
FND_DESCR_FLEX.DEFINE(BLOCK=>'Block_Name',
FIELD=>'NDBItem',
APPL_SHORT_NAME=>'Application_Short_Name',
DESC_FLEX_NAME=>'DFF_NAME');
ELSE
NULL;
END IF;
END;
Call this Program Unit at Form Level using When-New-Form-Instance
DFF_DESC(When-New-Form-Instance)
At Block Level
FND_FLEX.event('WHEN-NEW-ITEM-INSTANCE'); (Execution Hierarchy- > After)
FND_FLEX.event('WHEN-VALIDATE-ITEM');
App_Custom Program Unit
Customize the following code:>
*****if (wnd = 'Window Nmae’') then
app_window.close_first_window;
elsif (wnd = '<another window>') then
--defer relations
--close related windows
null;
elsif (wnd = '<yet another window>') then
--defer relations
--close related windows
null;
end if; *******************
To set the Window Title
PROCEDURE Proc_Win_Title (EVENT VARCHAR2) IS
BEGIN
IF (EVENT = 'WHEN-VALIDATE-ITEM') OR (EVENT='PRE-RECORD')
THEN APP_WINDOW.SET_TITLE('C17_CHN_REP_W','',:C17_CHN_REP_B.CHN_REP_CODE);
END IF; END;
To Call Proc_Win_Title Procedure use following trigger at Block Level
Pre-Record
To add Query window
Open APPSTAND Form , Copy it from $AU_TOP.
Copy QUERY_FIND Object Group from APPSTAND Object Group to Forms Object Group Library .
It will copy it at 4 places , Canvas,Window,Block and Object group level,
Delete it from Object group library.
Rename Canvas_Q,Window_Q and Block_Q.
Set Previous navigation_Block property of Block_Q. as Std_Block (Main Block’)
Add one text field in Query Block
Required No, Database No,Intial Value => Null;
Add KEY-NEXTBLK at Block Level
:parameter.G_query_find := 'TRUE';
app_find.find('Std_Block');
:parameter.G_query_find := 'FALSE';
Create Triggers Pre-Query & QUERY_FIND (User Defined) at Std_Block
At Pre-Query
BEGIN
if :parameter.G_query_find = 'TRUE' THEN
COPY(:C11_QUERY_FIND_BLK.qf_chn_rep_code,'C11_CHN_REP.chn_rep_code');
-- we can add more fields here which is there in the query find block
:parameter.G_query_find := 'FALSE';
end if;
END;
At QUERY_FIND
/* RESULT WINDOW, QUERY WINDOW, QUERY BLK */
app_find.query_find('Std_Window','Window_Q','Block_Q');
To add Special Menu
Write in Pre-Form trigger at Form Level app_special.instantiate('SPECIAL1','&LaunchWF','bkord');
At Block Level Pre-Block app_special.instantiate('SPECIAL1','&LaunchWF','bkord');
Create a User Defined Trigger ‘SPECIAL1’ at Block Level
fnd_message.set_string('This is for launching the workflow');
fnd_message.show;
Note - Using SPECIAL1 Trigger we can launch any concurrent request.
To populate a hidden menu item
Register a function as subfunction , add it to them menu without Prompt.
Modify the form logic at Pre-Form Program Unit
PROCEDURE PRE_FORM IS
BEGIN
if fnd_function.test(‘New Registered Function ') then
fnd_message.set_string('Inside Pre-Form to check special1-TRUE');
fnd_message.show;
app_special.instantiate('SPECIAL1','&Run TEST','DLRPT');
app_special.enable('SPECIAL',PROPERTY_ON);
else
fnd_message.set_string('Inside Pre-Form to check special1-NOT TRUE');
fnd_message.show;
fnd_message.debug('The special function is not available');
null;
end if;
end PRE_FORM;
Call it at Pre-Form Trigger
To add Zoom (Using Custom Library)
To call a from Your Form
Open Customm.pll in Form Builder , get it from $AU_TOP/resources and put it into the D2K/Form60.
Modify Procedure ‘EVENT’ in Custom,pll
Change the Procedure named ZOOM AVAILABLE , Return ‘TRUE’
Save and close PLL ,
Transfer it to $AU_TOP/forms/US
Generate PLX file using f60gen module_type=library module=custom userid=apps/apps
Transfer the PLX at $AU_TOP/resources
Take the template (base form) from $AU_TOP (Application Utility Area)
Open the template in Forms6i environment, and rename it.
Keep the new form (renamed) in $ AU_TOP/forms/US using FTP.
Compile & generate the form at $ AU_TOP/forms/US using Telnet.
To compile & generate the form , use following command
i. <f60gen module=Form.fmb userid=apps/apps
Move this fmb file to $ your_top/forms/US
Launch Oracle Apps Environment
Log in as Application Developer Responsibility , to register the form ( name of the Form must match with the fmb file name)go application ->form
Create a function and assign the form to the function.
Create a menu and assign the function to it
Assign this to main menu.
Create a table and register it
Launch Form Builder (Forms 6i)
Triggers to be Modified on Form Level WHEN-NEW-FORM-INSTANCE (Form Level)
FDRCSID('$Header: C21_FORM.fmb 115.11 2000/05/25 17:27:44 pkm ship $');
APP_STANDARD.EVENT('WHEN-NEW-FORM-INSTANCE');
PRE-FORM TRIGGER (FORM LEVEL)
FND_STANDARD.FORM_INFO('$Revision: 115.11$', 'Form_Name', 'Application Short Name','$Date: 2000/05/25 17:20 $', '$Author: appldev $');
app_standard.event('PRE-FORM');
app_window.set_window_position('Window_Name', 'FIRST_WINDOW');
Create a window, canvas and create a block using Wizard . Inherit the property classes as required for different fields.
To add calendar to Date item:
subclass and inherit the text_item_date value from thre list
Set the list of value to ‘ENABLE_LIST_LAMP’ (Validate_From_List = No)
Add trigger Key-Listval (CODE- >CALAENDAR.SHOW) To add the calendar to this field.
Set Fire-Enter-Query Mode – NO
Execution Hierarchy – Override.
Event Handler Procedures
Create Pkg Specification PACKAGE EVNT_HND_PKG IS
PROCEDURE PRE_UPDATE;
PROCEDURE PRE_INSERT;
PROCEDURE PRE_FORM;
END C11_PKG;
Create Pkg Body PACKAGE BODY EVNT_HND_PKG IS PROCEDURE PRE_UPDATE IS BEGIN FND_STANDARD.SET_WHO; END PRE_UPDATE; PROCEDURE PRE_INSERT IS BEGIN FND_STANDARD.SET_WHO; END PRE_INSERT; END;
Call these Event Handlers at Block Level Using Pre-Insert and Pre-Update triggers
Block Level Post Query Trigger add following code set_record_property(:system.trigger_record,:system.trigger_block,STATUS,QUERY_STATUS);
To add DFF (Descriptive Flex Fields)
Log in as Application Developer Responsibility
Create DFF and assign the Segments
Create a non data base item (NDBItem) and subclass it to text_item_desc_flex
Required -> NO
Set LOV to ‘Enable_List_Lamp’
Validate from List ->No
Create Program Unit
PROCEDURE DFF_DESC(EVENT VARCHAR2) IS
BEGIN
IF (EVENT='WHEN-NEW-FORM-INSTANCE') OR (EVENT='WHEN-VALIDATE-ITEM') THEN
FND_DESCR_FLEX.DEFINE(BLOCK=>'Block_Name',
FIELD=>'NDBItem',
APPL_SHORT_NAME=>'Application_Short_Name',
DESC_FLEX_NAME=>'DFF_NAME');
ELSE
NULL;
END IF;
END;
Call this Program Unit at Form Level using When-New-Form-Instance
DFF_DESC(When-New-Form-Instance)
At Block Level
FND_FLEX.event('WHEN-NEW-ITEM-INSTANCE'); (Execution Hierarchy- > After)
FND_FLEX.event('WHEN-VALIDATE-ITEM');
App_Custom Program Unit
Customize the following code:>
*****if (wnd = 'Window Nmae’') then
app_window.close_first_window;
elsif (wnd = '<another window>') then
--defer relations
--close related windows
null;
elsif (wnd = '<yet another window>') then
--defer relations
--close related windows
null;
end if; *******************
To set the Window Title
PROCEDURE Proc_Win_Title (EVENT VARCHAR2) IS
BEGIN
IF (EVENT = 'WHEN-VALIDATE-ITEM') OR (EVENT='PRE-RECORD')
THEN APP_WINDOW.SET_TITLE('C17_CHN_REP_W','',:C17_CHN_REP_B.CHN_REP_CODE);
END IF; END;
To Call Proc_Win_Title Procedure use following trigger at Block Level
Pre-Record
To add Query window
Open APPSTAND Form , Copy it from $AU_TOP.
Copy QUERY_FIND Object Group from APPSTAND Object Group to Forms Object Group Library .
It will copy it at 4 places , Canvas,Window,Block and Object group level,
Delete it from Object group library.
Rename Canvas_Q,Window_Q and Block_Q.
Set Previous navigation_Block property of Block_Q. as Std_Block (Main Block’)
Add one text field in Query Block
Required No, Database No,Intial Value => Null;
Add KEY-NEXTBLK at Block Level
:parameter.G_query_find := 'TRUE';
app_find.find('Std_Block');
:parameter.G_query_find := 'FALSE';
Create Triggers Pre-Query & QUERY_FIND (User Defined) at Std_Block
At Pre-Query
BEGIN
if :parameter.G_query_find = 'TRUE' THEN
COPY(:C11_QUERY_FIND_BLK.qf_chn_rep_code,'C11_CHN_REP.chn_rep_code');
-- we can add more fields here which is there in the query find block
:parameter.G_query_find := 'FALSE';
end if;
END;
At QUERY_FIND
/* RESULT WINDOW, QUERY WINDOW, QUERY BLK */
app_find.query_find('Std_Window','Window_Q','Block_Q');
To add Special Menu
Write in Pre-Form trigger at Form Level app_special.instantiate('SPECIAL1','&LaunchWF','bkord');
At Block Level Pre-Block app_special.instantiate('SPECIAL1','&LaunchWF','bkord');
Create a User Defined Trigger ‘SPECIAL1’ at Block Level
fnd_message.set_string('This is for launching the workflow');
fnd_message.show;
Note - Using SPECIAL1 Trigger we can launch any concurrent request.
To populate a hidden menu item
Register a function as subfunction , add it to them menu without Prompt.
Modify the form logic at Pre-Form Program Unit
PROCEDURE PRE_FORM IS
BEGIN
if fnd_function.test(‘New Registered Function ') then
fnd_message.set_string('Inside Pre-Form to check special1-TRUE');
fnd_message.show;
app_special.instantiate('SPECIAL1','&Run TEST','DLRPT');
app_special.enable('SPECIAL',PROPERTY_ON);
else
fnd_message.set_string('Inside Pre-Form to check special1-NOT TRUE');
fnd_message.show;
fnd_message.debug('The special function is not available');
null;
end if;
end PRE_FORM;
Call it at Pre-Form Trigger
To add Zoom (Using Custom Library)
To call a from Your Form
Open Customm.pll in Form Builder , get it from $AU_TOP/resources and put it into the D2K/Form60.
Modify Procedure ‘EVENT’ in Custom,pll
Change the Procedure named ZOOM AVAILABLE , Return ‘TRUE’
Save and close PLL ,
Transfer it to $AU_TOP/forms/US
Generate PLX file using f60gen module_type=library module=custom userid=apps/apps
Transfer the PLX at $AU_TOP/resources
WOW..indeed, incredible post. It is great to know more on forms personalization. I just tried it and it worked great for me. Thank you very much!
ReplyDeletesap support pack upgrade