1 Basic Steps For Customizing Oracle Forms For Oracle Applications
1 Basic Steps For Customizing Oracle Forms For Oracle Applications
Page 1
Customizing Oracle Forms for Oracle Applications
10. The *.fmb would contain a master block ’BLOCKNAME’ and a detail block
‘DETAILBLOCK’. Give appropriate names to the same depending upon the
customization (whether it is a master/detail block or tabular form or data entry
form) and discard the blocks which is not required.
11. Rename the Block Name of TEMPLATE.fmb from BLOCKNAME
or DETAILBLOCK to an appropriate name.
CHECK: Ensure that the first navigational block in the
MODULE property of the form is also reflecting the block name
that has been changed.
12. Change the code in APP_CUSTOM package, change the
window name in the APP_WINDOW.CLOSE_FIRST_WINDOW
WARNING: Ignoring this step results in the window not closing
when the window is tried closing by clicking the X symbol or
trying to close the window from FILE → CLOSE FORM menu
option or by pressing F4.
13. Change the code in the PRE-FORM trigger, change the Window
name from BLOCKNAME to the Window Name in
APP_WINDOW. SET_WINDOW_POSITION call.
WARNING: Ignoring this step results in a Developer Error
message popping up saying that invalid window name passed to
the form while opening the form every time.
14. Change the arguments that have been passed to the
FND_STANDARD.FORM_INFO call in the PRE-FORM trigger.
Ensure that the application short name, form description and
the version arguments are changed.
WARNING: This step is important, as FORM_INFO call
informs the Oracle Applications Help utility to look for the help
files in the appropriate custom application.
NOTE: The version that has been mentioned in the
FORM_INFO call would be displayed in the when the Help →
About Oracle Applications menu option is selected.
TIP: Ensure that the every version change of the form has a log
of changes in the PRE-FORM trigger itself.
15. Change argument in the FDRCSID call in the WHEN-NEW-FORM-
INSTANCE trigger with the appropriate form name, form version, etc.
16. Compile the form, copy the *.fmb file to the $PROD_TOP/US/forms
directory and generate the *.fmx file in the same directory using “f60gen”,
where the PROD_TOP is the custom Application top directory.
17. Register the Form, in Oracle Applications, open the Forms Registration
window (Navigational path : Oracle Applications → Responsibility:
Application Developer→ Application → Form) and enter the Form
name, Application name and the User form name.
NOTE: The Form name is the file name of the form, and the
Application name is the custom application where the executable
of the form is kept.
Page 2
Customizing Oracle Forms for Oracle Applications
18. Register the Form function, in Oracle Applications, open the Functions
Registration window (Navigational path : Oracle Applications →
Responsibility: Application Developer→ Application → Function) and enter
the Function name, the User Function name, the Form type as FORM and
the User form name as the name given in the previous step.
TIP: The function name is usually kept as the
“<PROD>_<FORMNAME>” where PROD is the custom
application short name and FORMNAME is the name of the
form file.
NOTE: There is a provision for entering parameters that can be
passed to the form. Please refer the below section for using for
form functions.
19. Add the Form function to a menu, in Oracle Applications, open the Menus
window (Navigational path : Oracle Applications → Responsibility: System
Administrator→ Application → Menu) , query the menu where the form
should appear and add the User form function name to the menu in the detail
block.
Page 3
Customizing Oracle Forms for Oracle Applications
Page 4
Customizing Oracle Forms for Oracle Applications
Page 5
Customizing Oracle Forms for Oracle Applications
A. Copy the QUERY_FIND object group from APPSTAND, please note that
the object group has to copied and not referenced. The
QUERY_FIND comes with a QF block, canvas and window.
NOTE: The Query Find block has the following buttons FIND,
NEW, CLEAR. The Find button has the pre-written code for
Finding the records and similarly New and Clear Buttons.
B. Rename the block, canvas and window to an appropriate name.
C. Edit the WHEN-BUTTON-PRESSED trigger in the NEW button, mention
the result block name in the APP_FIND.NEW call.
E.g: APP_FIND.NEW (‘MYBLOCK’);
CHECK: The New button itself should be deleted if the block
for which the query behavior required is a read-only block (The
block does not allow the Insert operation).
There might be certain customizations where the Find window
does not require a NEW button also.
D. Edit the WHEN-BUTTON-PRESSED trigger in the FIND button, mention
the result block name in the APP_FIND.FIND call.
E.g: APP_FIND.FIND (‘MYBLOCK’);
E. Edit the KEY-NXTBLK trigger of the Find block, mention the result block
name in the APP_FIND.FIND call.
E.g: APP_FIND.FIND (‘MYBLOCK’);
F. Modify the Block navigation properties of the Find block appropriately to
the result block. Typically the previous navigation block would be the
result block.
G. Create the necessary items in the Find block and the
respective Item level validations and the List of Values for
the Items added.
CHECK: The Items that have been created should not be
database items and the required property must be set to NO.
H. Code the PRE-QUERY trigger for the result block, the logic would be to
copy the values from the Find block items to the result block items if the
Find button is pressed. The parameter Q_query_find is checked against the
value ‘TRUE’ (The parameter Q_query_find is set to the value ‘TRUE’
when the APP_FIND.QUERY_FIND call is made) and then the values are
copied to the result block items.
E.g: IF :parameter.G_query_find = ’TRUE’ THEN
COPY ( name_in (‘MYFINDBLK.MYFINDITEM’),
’MYRESULTBLK.RESULTITEM’);
:parameter.G_query_find := ’FALSE’;
END IF;
TIP: Use the std. QF call APP_FIND.QUERY_RANGE to
query on a ranges of numbers, dates and characters.
I. Create a user defined trigger QUERY_FIND in the results block, the
trigger would have the QF call to find the
Page 6
Customizing Oracle Forms for Oracle Applications
Page 7
Customizing Oracle Forms for Oracle Applications
There are various needs to disable the dates of the calendar, so that the user
doesn’t select certain dates. This is achieved by the SETUP calendar procedure.
Given below are certain examples of the SETUP standard calls.
Examples:
1. Start date and End date validation:
There are 2 fields Start date and End date in the form and the user cannot
select a start date more than the End date and vice versa. The following
code would enable the Developer to achieve that.
In the KEY-LISTVAL trigger of the Start date, code the following call
followed by the calendar.show call.
calendar.setup('STARTDATE', NVL( <block_name.end_date>,
TO_DATE ('31-DEC-4712', 'DD-MON-YYYY')), TO_DATE('31-DEC-
4712', 'DD-MON-YYYY'));
In the KEY-LISTVAL trigger of the End date, code the following call
followed by the calendar.show call.
calendar.setup('ENDDATE', TO_DATE('01-JAN-0001', 'DD-MON-
YYYY'), NVL( <block_name.start_date>, TO_DATE('01-JAN-0001',
'DD-MON-YYYY')));
Page 8
Customizing Oracle Forms for Oracle Applications
The user may wish to select the date along with the timestamp. Use the call
calendar.setup('CHAR_DATETIME') before the Calendar.show call.
Page 9
Customizing Oracle Forms for Oracle Applications
WARNING: The developer must ensure that all the Functions like
Buttons/Menus and all the other navigational blocks must be disabled
while coding the Query only forms.
a.
Page 10
Customizing Oracle Forms for Oracle Applications
Page 11
Customizing Oracle Forms for Oracle Applications
7. Add the following code in the triggers in form as shown in the table.
Block Level
Of KEY-PREV-ITEM App_folder.event('KEY-PREV-ITEM');
MY_BLOCK
Block Level
Of POST-BLOCK App_folder.event('POST-BLOCK');
MY_BLOCK
Block Level
Of PRE-BLOCK App_folder.event('PRE-BLOCK');
MY_BLOCK
8. There is a trigger called FOLDER_RETURN_ACTION in the template form.
The Oracle application developer and the Oracle application designer can
code their custom code in the trigger based on the actions done by the End
user who uses the Customized form. The following actions are supported in
folder form.
ADD-FIELD, ALLOW-INCLUDE-WHERE-CLAUSE, CONFIRM-AUTOQUERY,
AUTOQUERY, CONFIRM-HIDE-FIELD, DELETE-FOLDER, HIDE-FIELD, NEW-
CONTEXT, NEXT-BLOCK, OPEN-FOLDER, RESET-WHERE-CLAUSE, SAVE-
FOLDER, SET-WHERE-CLAUSE, SHOW-FIELD and VIEW-SIZE.
TIP: The folder items can be verified using the call
“APP_FOLDER.EVENT(‘VERIFY’)”, essentially this verifies the
Page 12
Customizing Oracle Forms for Oracle Applications
fields of the Folder block and the prompt block are properly
placed in the layout.
TIP: The Oracle Application developer can disable the some
folder functionality like Hide field, show field etc. This can be
done by passing the disabled functions argument in the call
app_folder.define_folder_block(
object_name ,
folder_block_name ,
prompt_block_name ,
folder_canvas_name ,
folder_window_name ,
<disabled_functions> ,
tab_canvas_name ,
fixed_canvas_name
);
Example:
app_folder.define_folder_block (
'<FOLDER_OBJECT_NAME>',
'<FOLDER_BLOCK>',
'<PROMPT_BLOCK>,
'<STACKED_CANVAS>',
'<FOLDER_WINDOW>',
'AUTOQUERY,SHRINK,AUTOSIZE,SHRINK'
);
Page 13
Customizing Oracle Forms for Oracle Applications
Page 14
Customizing Oracle Forms for Oracle Applications
Page 15
Customizing Oracle Forms for Oracle Applications
g. Select the privileges that are required to for the block that can be
anything like Insert, Update, and Delete etc.
h. In the Primary key fields tab, provide the primary field. I.e.
CUSTBLOCK.NAMEFIELD.
B. Add an existing attachment of a standard form to the
“custom/standard” form
a. Navigate to the Document categories window (Navigational path:
Oracle Applications → Responsibility: Application Developer→
Attachments →Attachment Functions) to define the attachments.
b. Query for the Type, Name, a User name and the Session Context in the
Attachment Functions window.
c. Query the blocks for the standard form by navigating to the Block
Declarations window. Query the block name and the method of the
attachment implementation.
d. Choose Organization, Set of Books, Business Unit, or None,
depending on how the form and its data (attached documents) are
secured. Typically this feature is used for security of the documents
attached. Specifying an Organization or SOB or a BU for the
documents would secure the attachments for the corresponding
Organization or SOB or BU.
e. The context fields are used to display the Window Title of the
attachment window. Typically the context field values are derived
from the calling form with the syntax of block_name.field_name. If
more than one context field is mentioned, the window title would be
the first field value and the second field value separated by comma.
f. Enter the entities for the attachment in the Entities Declaration
window by navigating to the same. The Entities Declaration window
has the Entities, Display method which has two options Main window
and the related window. Select any one of the options.
g. Select the privileges that are required to for the block that can be
anything like Insert, Update, and Delete etc.
h. In the Primary key fields tab, provide the primary field.
Page 16