You are on page 1of 20

Calling one form to another form

1) Develop both forms and register in application.


2) Place the Button in first from
3) Write the following code in WHEN-BUTTON-PRESSED Trigger.

Fnd_FunCtion.execute(function_name => 'Second form function Name',


            open_flag     => 'Y'    ,        
                     OTHER_PARAMS  => 'P1 = '||:PO_VENDORS.VENDOR_ID);

P1 is Second form parameter

4) Open the Second foRm and define the Parmaeter called P1

5) goto PRE-QUERY trigger and write the following code to change the query dynamically.

 :PO_VENDOR_SITES_ALL.VENDOR_ID  := :PARAMETER.P1;


 --:Blockname  .fieldname          := :PARAMETER.Parametername

6) Goto the WHEN-NEW-FORM-INSTANCE Trigger at form level. write the following code
    GO_BLOCK('PO_VENDOR_SITES_ALL');
EXECUTE_QUERY;

queryig form:

1)Develop the form


2)Register the form
3)Create Two functions for the same form.
  first function without parameters
  second function is with parameter called 'QUERY_0NLY="YES" '
enter the paraneter in the field called Parameter field.

SubMenu Creations:

1)Copy the Functions whatever we would like to define as submenu


  delete from the main menu.
2)Create new menu and attach the functions whatever we have copied.
3)Copy the menu whatever we have created attach to the main menu by selecting the
  field called submenu.

Hiding the forms and Menus at Responsibility level:

1) Open the Responsibility Form attach the menu


2) By default we will get all the forms and as well we menus will be displayed.
3) Select the Tab called Menu Exclusions Tab
  Select the type = Function to hide the function.
  Select the type = Menu name to hide the menu.

Calling SRS Window from Menu:

1) Create the Function for the User form name called "Run Reports"
2) Attach the Function to the menu.
3) Attach the menu to the responsibility
  so that user can call the form from the menu.

Attach the Request group to the SRS Function:

1)Create the Request group in System administrator by specifying the request group
  code
  Copy the Request group name
  application short name
           request group code
2)Goto the Appllication developer create the fucntion for the user form name called
  " Run Reports"

3)Pass the follwoing Parameters while creation of the function.


REQUEST_GROUP_CODE="CUSTOMERCODE1"
REQUEST_GROUP_APPL_SHORT_NAME="AR"
TITLE="23CUSTOMERS"

4)Attch the function to the Menu , Menu to Responsibility , Responsibility to user

5)when we open the form we can get the programs which are there in the request
  group.

note: We will follow this prcocedure to attach the multiple request groups to the  
      single Responsibility.

Display the Message Boxes in the Forms:

1)Create the Message in Application Developer


2)Run the Concurrent Program called "Generate Messages"
  by passing  language code and as well as application name
3)Call the message from form triggers by using FND_MESSAGE API's.

begin
FND_MESSAGE.SET_NAME ('PO', 'NEW MESSAGE');
fnd_message.show();
end;

Libraries:

APPDAYPK:  This Library will support for all the Date and Time functionality in the
           application.

FNDSQF  : This Library will support for all the flexfield,Curency,WHO Coluns,Log File
          Message functionalities.

APPCORE : It will support for all the Menu and Tool Bar functionality in the application.

CUSTOM  : Will be used to make small customizations in the standard forms without
          downloading the (.fmb)

Note: 1)We can download all these libraries from the AU_TOP\11.5.0\Resource Folder
        where we will find all the Libraries  both (.pll) and (.plx).
   .pll  = Program Link Library
   .plx  = Program link Executable

2)we are not suppose to customize any of these libraries we can utilize the existing
  API's
3)We can Customize only one Library that is CUSTOM.pll

Attach Calendar:
----------------------
1) Select the Field properties and select the property called
  List of Values : ENABLE_LIST_LAMP
2)Goto the Item level Trigger called KEY-LIST-VAL trigger call the following API
  CAlendar.Show();

Attach the LOV:


---------------------
1)Define the Record Group Either Static Values or By using the Query
2)Create LOV and attach the Record Group
3)Attach the LOV to field in the property called list of Values.

Implement WHO Columns:


-----------------------------------

1)Select All the WHO Columns in the Datablock


2)define following Two Triggers at DataBlock level 1)Pre-Insert
  2)Pre-Update
3)Call the following API from both the Triggers
FND_STANDARD.SET_WHO():

Standard Libraries Contains all these API's.


we can download all these Libraries from Resource folder in AU_TOP.

APPDAYPK : It will Support for All CAlendar and Date time Functions
FNDSQF   : It Will support for al the Flexfield,profile,WHO Columns functionality.

CANVAS_FORM

2)CREATE ANOTHER CANVAS ,OPEN PROPERTY PALLET OF IT


NAME   ==SCAN
CANVAS TYPE==STACKED
VIEW X POSITION  -100
VIEW Y POSITION-100

===============================================
3)CREATE ANOTHER DATA BLOCK

SELECT * FROM AP_INVOICES_ALL

VENDOR_ID,INVOICE_NUM,INVOICE_AMOUNT,AMOUNT_PAID,DISCOUNT_AMOUNT_TAKEN,INVO
ICE_DATE

ALONG WITH RELATION OF EXISTING BLOCK OF COOMON COLUMN OF VENDOR_ID OF SCAN


CANVAS

4)Place a buttuon in STACKED CANVAS====NAME AND LABLE AS  SCAN


=======================================================
WRITE- WHEN BUTTON PRESSED-TRIGGER OF  STACKED CANVAS
=======================================================

HIDE_VIEW('SCAN');
GO_ITEM('PO_VENDORS.VENDOR_ID');

OPEN KEY NEXT ITEM TRIGGER OF VENDOR_NAME IN CCNA CANVAS


==========================================================

IF :PO_VENDORS.VENDOR_NAME IS NOT NULL THEN


SHOW_VIEW('SCAN');
GO_ITEM('AP_INVOICES_ALL.INVOICE_NUM');
ELSE
NEXT_ITEM;
END IF;

5)CREATE ANOTHER DATA BLOCK


===============================
(RCV_SHIPMENT_HEADERS)

vendor_id,receipt_num,ship_to_org_id,shipped_date,invoice_date

ALONG WITH RELATION OF EXISTING BLOCK OF COOMON COLUMN OF VENDOR_ID OF SCAN1


CANVAS

CANVAS GETS CREATED NAME IT AS  CCAN

2)CREATE ANOTHER CANVAS ,OPEN PROPERTY PALLET OF IT


NAME   ==SCAN1
CANVAS TYPE==STACKED
VIEW X POSITION  -100
VIEW Y POSITION-100

4)Place a buttuon in STACKED CANVAS====NAME AND LABLE AS  HIDE

HIDE_VIEW('SCAN1');
GO_ITEM('AP_INVOICES_ALL.VENDOR_ID');

OPEN KEY NEXT ITEM TRIGGER OF INVOICE_NUM


===========================================

if :ap_invoices_all.invoice_num is not null then


show_view('SCAN1');
GO_ITEM('RCV_SHIPMENT_HEADERS.RECEIPT_NUM');
ELSE
NEXT_ITEM;
END IF;
Using DFF Process in Forms

DFF Process:

1)define the field in the Canvas


change the field property database items as "no"

2)Define the Package like follows.

Package Specification:
----------------------
PACKAGE DFF_PKG IS
  PROCEDURE DFF_PROC(EVENT VARCHAR2);
END;
Package Body:
-------------
PACKAGE BODY DFF_PKG IS
    PROCEDURE DFF_PROC(EVENT VARCHAR2) AS
    BEGIN
IF (EVENT = 'WHEN-NEW-FORM-INSTANCE'   ) THEN

FND_DESCR_FLEX.DEFINE( BLOCK =>  'WIP_ITEMS10',


  FIELD             =>  'DFF_TEXT',
  APPL_SHORT_NAME   =>  'WIP',
           DESC_FLEX_NAME   => 'WIPDFF');
 
END IF;
END DFF_PROC;

END;

3)Call this Package from WHEN-NEW-FORM-INSTANCE Trigger


   packagename.Procedure name('WHEN-NEW-FORM-INSTANCE');
   DFF_PKG.DFF_PROC('WHEN-NEW-FORM-INSTANCE');
4)Call another API from WHEN-NEW-ITEM-ISNATCE Trigger
fnd_flex.event('WHEN-NEW-ITEM-INSTANCE');
-It will Populate the DFF in the Form.

Oracle From Questions

1) What is Data Block?


Ans) Data Block contains the Table and Columns. Will be used to INSERT/UPDATE/DELETE the records from the
Form.

2) Types of Canvases?
Ans) a canvas is a surface inside a window. Where we can place the Layout objects like (Text, Radio button, Check
box)
1) Content (Default)
2) Stacked
3) Vertical Tool bar
4) Horizontal Tool Bar
5) Tab
Content:  
A content canvas is the "base" view that occupies the entire content pane of the window in which it is displayed.
 You must define at least one content canvas for each window you create.

Stacked Canvas:
A stacked canvas is displayed on the content canvas assigned to the current window.
 It takes some part of content canvas.
We can hide this canvas programmatically   .
We can display more than one canvas at time in the window.

Tab Canvas
A tab canvas made up of one or more tab pages
Allows you to group and display a large amount of related information on a single dynamic Form Builder canvas
object.

Ex: we want to display Customer information, sites, tax, and bank account …..
We can use Tab canvas.

Tab canvases are displayed on top of a content canvas

Toolbar Canvas
A toolbar canvas often is used to create toolbars for individual windows.

1. Horizontal toolbar canvases are displayed at the top of a window,


2. Vertical toolbars are displayed along the far left edge of a window.

Window:

A window is a container for all visual objects that make up a Form Builder application, including canvases.

A single form can include any number of windows.


Windows also can be displayed and closed programmatically.

1) Model Windows.
2) Modeless Windows.

A modal window (often a dialog) requires the end user to respond before continuing to work in the current
application.

Modeless window requires no such response.


You can display multiple modeless windows at the same time

Modal property to Yes or No   No: Modeless Yes: Model

4) Types of Blocks?

1) Data block: Data blocks are associated with data (table columns) within a database.
2) Control Block: a control block is not associated with the database.
                         The items in a control block do not relate to table columns within a database.

Data blocks can also be Master Block and Detail Block

All blocks are either single-record or multi-record blocks


5) What are Master-detail Relation ship types?

1) Isolated
2) Non-Isolated (Default)
3) Cascade

Cascading          The master record can be deleted, and any associated detail records are automatically
deleted from the database at commit time. 

Isolated The master record can be deleted, but the associated detail records are not deleted from the database.

Non-Isolated      The default setting.  The master record cannot be deleted if associated detail records exist in the
database.

On-Check-Delete-Master (Block Level)


On-Clear-Details              (Form Level)
On-Populate-Details        (Block Level)
 
Deferred:  (Yes) we have to execute detail block manually.
Automatic Query: No

(Deferred = Yes, Automatic Query = Yes)

Form Builder defers fetching the associated detail records until the end user navigates to the detail block.

Prevent Master less operation:  Specifies whether end users should be allowed to query or insert records in a block
that is a detail block in a master-detail relation.
When set to Yes, Form Builder does not allow records to be inserted in the detail block

Record Group:

A record group is an internal Form Builder data structure that has a column/row framework similar to a database
table.

2 types of record groups we have

1)      Static
2)      Query based

LOV: An LOV is a scrollable popup window that provides the end user with either a single or multi-column
selection list.

5) How to set the block as Control Block?


Create Data Block
Change the property Database Data block: No
Q. Have you heard about Zoom function in Oracle Apps Forms?
Yes. It is CUSTOM.ZOOM_AVAILABLE function

Q. What is the use?


Generally the function CUSTOM.ZOOM_AVAILABLE was used for navigation from a block to
another and it by default returns BOOLEAN value; False. It was used in earlier time in Oracle
Apps. Now we are using Open_Form, Call_Form etc.
Ex: If Zoom is available for this block, then return TRUE; otherwise FALSE.Always test for the form and
block name. Refer to the SYSTEM variables for form name and block name in your code and branch
accordingly. The module name of your form must match the form file name.

By default this routine must return FALSE.


The following example enables Zooms in the following places:
Form: FNDSCAUS, Block USER and
Form: FNDCPMCP, Block PROCESS
FUNCTION zoom_available RETURN BOOLEAN IS
form_name  VARCHAR2(30)  := NAME_IN(‘system.current_form’);
block_name VARCHAR2(30)  := NAME_IN(‘system.cursor_block’);
BEGIN
IF (form_name = ’FNDSCAUS’ AND block_name = ’USER’) OR
       (form_name = ’FNDCPMCP’ AND block_name = ’PROCESS’)
THEN
    RETURN TRUE;
ELSE
    RETURN FALSE;
END IF;

                    END zoom_available;

Q. What is the sequence of Trigger firing in Form?


                     a) Pre-Form

b) Pre-Block
c) Pre-Record
d) Pre-Text-Item
e) When-New-Form-Instance
f) When-New-Block-Instance
g) When-New-Record-Instance

                     h) When-New-Item-Instance

i) Post-Text-Item
j) Post-Record
k) Post-Block
l) Post-Form
Q. What is the process of Form registration in Oracle Apps?

 Send the file through FTP in binary mode to …/forms/US


 Generate *.fmx by running the fmx script
 f60gen module= userid=APPS/adm1n output_file= module_type=form batch=no
compile_all=special

Q. What is the default directory of Forms in Oracle Apps?


Application top(autop)/forms/US

Q. How can we disable a form from the menu?


System Administrator (Responsibility) > Security > Responsibility -> Define (at Menu) > Find
Responsibility Name & The Menu attached to it >  Exclusion > Exclude the Function of the
Form

Q. How can you call DFF from Form?


By using a procedure called fnd_descr_flex.define
Ex: FND_DESCR_FLEX.DEFINE(BLOCK=>’ORDER_DETAIL’,  FIELD=>’DESCFF’,
                                                 APPL_SHORT_NAME=>’FND’,
                                                 DESC_FLEX_NAME=>’MYDESC’)

In Brief,
We need to follow the following steps in your form:
a) Create a displayed field to hold your concatenated segment values (the [ ] field).
b) Create fields (normally hidden) for each of the flexfield columns in your table (the
      one used for your flex).
c) In the form-level WHEN-NEW-FORM-INSTANCE,
call FND_DESCR_FLEX.DEFINE,
setting BLOCK parameter to the name of the block containing your [ ] field,
the FIELD parameter to the name of your [ ] field,
the APPL_SHORT_NAME parameter to the short name of your application and the
DESC_FLEX_NAME parameter to the name of your descriptive flex.

In the form-level WHEN-NEW-ITEM-INSTANCE,

WHEN-VALIDATE-ITEM,
PRE-INSERT,
PRE-UPDATE,
POST-QUERY and
PRE-QUERY triggers place a call to FND_FLEX.EVENT as follows:
         FND_FLEX.EVENT ( ‘TRIGGER_NAME’);
where TRIGGER_NAME is the name of the trigger,

e.g. in the PRE-QUERY trigger …. FND_FLEX.EVENT(‘PRE-QUERY’);


Form Personalization
Oracle has provided a simple and easy feature to implement the customer specific requirements
without modifying the underlying forms code or CUSTOM library. Although CUSTOM library still can be
used for forms customization to implement the complex business logic, the personalization feature
provided in the latest release is easy, faster and requires minimum development effort.

If user needs to personalize any details in a form like changing field names, adding some validations, etc,
then Form Personalization can provide the way out in few simple steps.

Please follow here to go through Steps with example

Steps:

Step – 1:
Go to the specific form where you need the changes

Then we need to note down the block and field name which is needed in next steps.

So keep the cursor on the required field and then Go to Help  Diagnostics  Examine
Note down the Block and Field value.

Step -2:
Now the step to do the personalization

Follow this navigation

Help  Diagnostics  Custom Code  Personalize


This will show the Form Personalization window

Here you need to do the customization as per the requirement.

As you can see in this form, there are mainly 4 sections

1.       Rule

2.       Condition

3.       Actions

4.       Context

Step – 3:

Rule:
This is the section where you need to create the rules how your requirement is going to be executed.
This section contains 4 segments, Seq, description, Level and Enabled flag.

Seq : Need to give the Sequence how the rule will execute (a number)

Description: Write a sort description of the rule which you are going to create

Level: Select the level where you want the rule to execute

Enabled: This is the flag which will enable or disable the rule.

Example:
Step – 4:

Condition:
Now need to set the condition.

This is the section where you will define when the rule will be executed.

This section contains 4 segments, Trigger Event, Trigger Object, Condition and Processing mode.

Trigger Event: This specifies where the rule will be executed. There are mainly 5 types of event which
decided the trigger of the rule.

Trigger Object:  This is the Object in the form which decides at what level the rule will be executed.

The values can be “<Form Name>”, ‘<Block Name>” or “<Item Name>”

Condition: Here mention any SQL statement to control the execution of the rule when the mentioned
criterion is met.

Processing Mode: This is the mode where you want the rules to be executed.

Example:

Step – 5:

Actions:
This decides what will happen when the rule will execute.

This contains 2 sections.

Left sectionscontains Seq, Type, Description, Language, Enabled


Seq: Mention the Action sequence which this rule will execute

Type: This is of 4 types, Property, Message, Builtin, Menu.

This decides which type of action, the rule will perform.

According to this the right section will come and need to fill the detailed actions.

Description: Write a description on the action which this will perform.

Language: Select the language

Enabled: You can enable or disable the actions here.

Right Sectionis a dynamic section; it appears depending on the Type field value in Left section.

Action Types:
Property

The action type “Property” is used to set the properties of the objects. The various objects include

“Item, Window, and Block etc.”.  Actual object name defined in the form should be entered after
selecting the object type.

Property Name is the property to be changed

Value is the new desired value for the property.

The current value of the property will be displayed when clicked on the “Get Value” button.

Example:

Object Type = “Item”

Target Object = “:ORDER.ORDER_NUMBER”

Property Name = “PROMPT_TEXT”

Value = “Claim Number”

The value is interpreted at runtime, so you can use SQL functions and operators. Any value started with
“=” operator will be interpreted at runtime; otherwise the value is treated as is entered in the value field
Message:

The action type “Message” is used to display custom messages during runtime. Message Type and
Description should be entered after selecting the action type as “Message”. The available message types
are “Error, Warning, Hint, Question and Debug”. Depending on the response expected from the user,
the appropriate message type should be selected.

Example:

Message Type = “Hint”

Message Text = “Please Follow the Date format DD-MON-YYYY”

Builtin:

The action type “Builtin” is used to execute the form and AOL API’s. Depending on the API type selected,
the parameters should be entered.

Example:

Builtin Type = FND_UTILITIES.OPEN_URL

Argument = http://www.oracle.com
Menu:

The action type “Menu” is used to activate the available special menus on the Tools menu.

Oracle Applications provide 45 special menus under Tools menu which can be used by customers based
on their requirements.

Select the SPECIAL menu which is not used by the form. Menu label is the prompt which appears to the
users when Tools menu is invoked, block specifies the blocks for which the special menu should be
activated and Icon name is the .ico file name.

A separator can be created above the activated special menu by selecting the “Render line before
menu” checkbox.

Example:

Menu Entry = SPECIAL4

Menu Label = Additional Order Header Information

Enabled in Blocks(s) = ORDER

Icon Name = Flower.ico

Step – 6:

Context:
Context manages to whom the personalization should apply. This is similar to the concept of using
profile options in Oracle Applications. The various levels are Site, Responsibility, Industry and User.
During runtime, the values provided in the context are evaluated and personalization rules will be
applied. Usage of context is very vital in implementing the personalization to prevent the inappropriate
users accessing these customizations of the form.

Example:

Context = Responsibility

Value = Order Management Super User


Step by Step Analysis
Requirement: Don’t allow the user to use more than 1 qty in Order line Qty field during creation of a
sales order.

Solution:

Step -1:

Go to the specific form where you need the changes

Here in this case this will be the Sales Orders form and then Line Items tab.

Then we need to note down the block and field name which is needed in next steps.

So keep the cursor on the required field and then Go to Help  Diagnostics  Examine
Note down the Block and Field value.

Step -2:

Help –> Diagnostics –> Custom Code –> Personalize


Step – 3:

Fill the Rule section

Step – 4:

Fill the Condition section

Step – 5:

Fill the Actions section

Step – 6:

Fill the context As you need.

Save this.

Log out of the application and login again, then in Sales Order line item tab enter Qty field value as 1 and
try to save, you can see the message.

You might also like