47
Development of CALL_FORM in Oracle Applicatons :- The following topics will be discussed in this article: 1. Overview of CALL_FORM.(Instead of call_form, we use fnd_function.execute in oracle apps) 2. Steps for Development of Calling Form(XXPO_VENDORS.fmb). 3. Steps for Development of Called Form(XXPO_VENDOR_SITES.fmb). 4. Called Form Registration in Oracle Applications 11i (XXPO_VENDOR_SITES.fmb). 5. Calling Form Registration in Oracle Applications 11i(XXPO_VENDORS.fmb). 1. Overview of CALL_FORM :- (Instead of call_form, we use fnd_function.execute in oracle apps) For Creating “Multiple Form Applications” we use CALL_FORM,OPEN_FORM,NEW_FORM Built-ins. This built-in is used to invoke more than one form in single session. i.e, if one form is invoking other form then invoking form is called as “Calling Form”. The invoked form is called as “Called Form”. This built–in is incompatible with OPEN_FORM,which is used by Oracle Applications routines.You should use FND_FUNCTION.EXECUTE instead of either CALL_FORM or

Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Embed Size (px)

Citation preview

Page 1: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Development of CALL_FORM in Oracle Applicatons:-

The following topics will be discussed in this article:

1. Overview of CALL_FORM.(Instead of call_form, we use fnd_function.execute in oracle apps)

2. Steps for Development of Calling Form(XXPO_VENDORS.fmb).

3. Steps for Development of Called Form(XXPO_VENDOR_SITES.fmb).

4. Called Form Registration in Oracle Applications 11i (XXPO_VENDOR_SITES.fmb).

5. Calling Form Registration in Oracle Applications 11i(XXPO_VENDORS.fmb).

1. Overview of CALL_FORM:- (Instead of call_form, we use fnd_function.execute in oracle apps)

For Creating “Multiple Form Applications” we use CALL_FORM,OPEN_FORM,NEW_FORM Built-ins.

This built-in is used to invoke more than one form in single session.

i.e, if one form is invoking other form then invoking form is called as “Calling Form”.The invoked form is called as “Called Form”.

This built–in is incompatible with OPEN_FORM,which is used by Oracle Applications routines.You should use FND_FUNCTION.EXECUTE instead of either CALL_FORM or OPEN_FORM whenever you need to open a form programatically. Using FND_FUNCTION.EXECUTE allows you to open forms without bypassing Oracle Applications security, and takes care of finding the correct directory path for the form.

Syntax:-

FND_FUNCTION.EXECUTE(function_name IN varchar2,open_flag IN varchar2 default ’Y’,session_flag IN varchar2 default ’SESSION’,other_params IN varchar2 default NULL,activate IN varchar2 default ’ACTIVATE’,browser_target IN varchar2 default NULL);

Page 2: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Description:- Executes the specified form function. Only executes functions that have a form attached. Displays a message to the end user if the function is not accessible.

Arguments:-

Function_Name: The developer name of the form function to execute. Open_flag: ’Y’ indicates that OPEN_FORM should be used; ’N’ indicates that NEW_FORM should be used.You should always pass ’Y’ for open_flag, which means to execute the function using the Oracle Forms OPEN_FORM built–in rather than the NEW_FORM built–in. Session_flag: Passing ’NO_SESSION’ or ’N’ opens the form in the same session as the existing form; passing anything else opens your form in a new database session (including ’SESSION’, the default). Other_params: An additional parameter string that is appended to any parameters defined for the function in the Parameters field of the Form Functions form. Youcan use other_params to set some parameters dynamically. It can take any number ofparameters.

Example:-From Vendor Details Form(XXPO_VENDORS.fmb) call the Vendor Site Details Form (XXPO_VENDOR_SITES.fmb) when I click on the Button Called “Sites”

Page 3: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

2.Steps for Development of Calling Form(XXPO_VENDORS.fmb). :-

Step1:- Open Template.fmb with form builder save it with another name(XXPO_VENDORS.fmb).Step2:- Delete “BLOCKNAME” from Window,Canvas and Data Block and delete “DETAILBLOCK” from Data Block.

Page 4: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 3:- Create Window (XXPOWINDOW) apply subclass information as “WINDOW” and give the title.

Page 5: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 4:- Give this window name in PRE-FORM trigger (Form Level) and give this window name in APP_CUSTOM body Program_Unit (in place of window name).

Compile and Close the window.

Next go to Program Units(APP_CUSTOM body) give the window name in 2 places as shown in below and Compile the Program Unit.

Page 6: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be
Page 7: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 5:- Create Canvas(DEPT_CANVAS) apply subclass information as Canvas.

Here Window is attached automatically.

Page 8: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 6:- Now Create Data block (PO_VENDORS) with Wizard or Manual, apply subclass information to the block as “BLOCK”   and also apply subclass information to the items as “TEXT_ITEM”.

Page 9: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Click on Next

Click on Next. Next…Finish.

Page 10: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Move Available Items to Display Items.(So, These items will be display on the “XXPOVENDORS” Canvas.

Page 11: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Click on Next.Here give the Form title.

Page 12: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be
Page 13: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Go to Object Navigator(F3) Place cursor on the data block(PO_VENDOERS) apply sub class information as “BLOCK”

Page 14: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

And apply subclass information to all items (as “TEXT_ITEM”) which exists in the block (PO_VENDORS).

Page 15: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 7:-Now create one button in the Canvas and give the name as “Sites”.

Page 16: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Now my Requirement is ,When I Click on the Sites button a new form(XX_PO_VENDOR_SITES) will be displayed with data based on vendor_id.

So we have to write code in the “WHEN-BUTTON-PRESSED” trigger of “Sites “Button.

:Global.vendor:=:po_vendors.vendor_id;fnd_function.execute(FUNCTION_NAME=>'XXPO_VENDOR_SITES', OPEN_FLAG=>'Y', SESSION_FLAG=>'N',other_params=>:Global.vendor);

Here we need to give called form function name so we have to develop a form(XXPO_VENDOR_SITES.fmb) and register this form in apps with function” 'XXPO_VENDOR_SITES”.

other_params => here it is used to pass vendor_id from vendor details form to vendor site details form.

Compile and Close the window, and save the changes.

Page 17: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 8: Move this form from Local Machine to the Custom TOP(xxmz) using WINSCP Tool

Page 18: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 9: Compile the Form using f60gen in Unix Environment.(Putty or WINSCP Console)

$f60gen XXPO_VENDORS.fmb apps/apps

Page 19: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

3. Steps for Development of Called Form(XXPO_VENDOR_SITES.fmb):-

Step1 : Open Template.fmb with form builder save it with another name(XXPO_VENDOR_SITES.fmb).

Step 2: Delete the block name from window, canvas ,data block and delete the detail block from data block.

Page 20: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 3: Now create a window and apply subclass information as “WINDOW”.

Page 21: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 4 : Give this window name in PRE-FORM trigger (Form Level) and give this window name in APP_CUSTOM body Program_Unit (in place of window name).

Compile and Close the window.

Page 22: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Compile and Close the Window.

Page 23: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 5 : Now create a canvas and apply subclass information as “CANVAS”.

Step 6 : Now create a data block for vendor sites.

Page 24: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Click on Next..finish

Page 25: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Click on Finish button

Page 26: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Now go to Object Navigator(f3) Click on the block apply subclass information as “BLOCK” and apply sub class information as”TEXT_ITM” for all items that exists in the block.

Page 27: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be
Page 28: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

In “WHEN-NEW-FORM-INSTANCE” trigger give

Execute_query;

And go to Property Palette of “PO_VENDOR_SITES_ALL” data block

Give vendor_id=: Global.Vendor in the “WHERE Clause” Property.

Close and Save the changes.

Page 29: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Step 7 : Move the form(XXPO_VENDOR_DETAILS.fmb) from local machine to the custom top

Step 8 : Compile the form Using f60gen

$f60gen XXPO_VENDOR_SITES.fmb apps/apps

Page 30: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

4.Called Form Registration in Oracle Applications 11i XXPO_VENDOR_SITES.fmb).

I . Cerate a Form.(Navigation:-Application Developer->Application-> Form)

Here give the Following Details:-

Form:-XXPO_VENDOR_SITESApplication: Custom Top Application Name(xxmz Custom)User Form Name: any name(Vendor Site Details Form)Description:any(Vendor Site Details Form)

Save and Close the form

Page 31: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

II. Create a function (Navigation: Application->function)

Here give the following Details

Function:-any (XXPO_VENDOR_SITES)

Note:-“XXPO_VENDOR_SITES” is called form function name. So you have to give this function name in Calling Form (XXPO_VENDORS.fmb) “WHEN-BUTTON-PRESSED” trigger FND_FUCTION.EXECUTE(function=> XXPO_VENDOR_SITES)

User Function Name: any name(Vendor Site Details form Function)Description: Any (Vendor Site Details form Function)

Page 32: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Go to “Properties” tab give the type as “Form”Next Go to “Form” tab attach our user function form name here (i.e Vendor Site Details form).

Save and Close the form.

Page 33: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

III . Attach that function to the Custom TOP menu(Navigation: Application->Menu)

We can get Menu name from “Responsibility” Window of System Administrator.(System Administrator->Security->Responsibility->Define)

Query with particular application name and responsibility name you will get “MENU NAME”

Copy that menu name, Query with that name in Application Developer Menu Window.

Here give the following Details:

Seq: Any Unique NumberPrompt: any (Vendor Site Details)Function: Attach the User function Name (Vendor Site Details Form Function)

Page 34: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

5.Calling Form Registration in Oracle Applications 11i(XXPO_VENDORS.fmb):-

I.Create a Form.(Navigation:-Application Developer->Application-> Form)

Here give the Following Details:-

Form:-XXPO_VENDORSApplication: Custom Top Application Name(xxmz Custom)User Form Name: any name(Vendor Details Form)Description:any(Vendor Details Form)

Save and Close the form

Page 35: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

II. Create a function (Navigation: Application->function)

Here give the following Details

Function:-any (XXPO_VENDORS)User Function Name: any name(Vendor Details Form Function)Description: Any (Vendor Details form Function)

Page 36: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Go to “Properties” tab give the type as “Form”

Next Go to “Form” tab attach our user function form name here (i.e Vendor Details form).

Save and Close the form.

Page 37: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

III.Attach that function to the Custom TOP menu(Navigation: Application->Menu)

We can get Menu name from “Responsibility” Window of System Administrator.(System Administrator->Security->Responsibility->Define)

Query with particular application name and responsibility name you will get “MENU NAME”

Copy that menu name, Query with that name in Application Developer Menu Window.

Here give the following Details:

Seq: Any Unique NumberPrompt: any (Vendor sub Form)Function: Attach the User function Name (Vendor Details Form Function)

Page 38: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Switch responsibility to Custom TOP Application Responsibility.

Page 39: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

Click on Menu Prompt (Vendor sub Form)

Page 40: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

If you click on the “Sites” button the called form(XXPO_VENDOR_SITES.fmb) will be opened .(shown in below)

Page 41: Development of CALL_FORM in Oracle Applicatons:The Following Topics Will Be

*****FINISH*****