Вы находитесь на странице: 1из 16

Customizing Oracle Forms for Oracle Applications

1 Basic Steps for Customizing Oracle Forms for


Oracle Applications
The basic steps to be followed to customize Oracle Forms for Oracle Applications
1. Obtain the TEMPLATE.fmb form from $AU_TOP/forms/US directory from
the server and place the form in the PLSQLLIB directory of the local
machine.
2. Obtain the APPSTAND.fmb form from $AU_TOP/forms/US directory from
the server and place the form in the PLSQLLIB directory of the local
machine.
3. Obtain the Oracle libraries (PLL file extension) attached to the
TEMPLATE.fmb form from the directory $AU_TOP/resource and
place the libraries also in the PLSQLLIB directory of the local
machine.
NOTE: Please refer the Appendix A for the list of libraries and
form module that are attached to the TEMPLATE.fmb
4. Create a copy of the TEMPLATE.fmb and put the new copy in a
working directory and rename the file to a customized name
as per the standards.
TIP: As a recommended standard across Infosys® the file name
would always be 8 characters long with the first three characters
would be the short name of the application where the form is
registered and the next two characters would be a sub module
name and the last three characters would be a short brief name of
the customization.
5. Open the new form in Oracle Forms Developer, the form
should open in the Forms Developer without any errors.
NOTE: The errors that might arise are due to the libraries and
the APPSTAND.fmb form and the other Form Libraries (Refer
Appendix A for the list of Form libraries) not present in the
PLSQLLIB directory.
6. Rename the Module Name to a customized name; the usual convention is
renaming the module name to the file name of the form itself.
7. Rename the Window Name of the form, from BLOCKNAME to the an
appropriate window name according to the Window naming standards
8. Change the Window Title, the title can be changed in the properties sheet of
the Window.
9. Rename the Canvas name of the form, from BLOCKNAME to
an appropriate name according to the Canvas naming
standards.
CHECK: Ensure that the view name of the canvas in the
WINDOW property of the form is also reflecting the canvas
name that has been changed.

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

2 Using the basic features of Oracle Applications


features
2.1 Special Menus
The special menus in Oracle Applications are used for
performing some special tasks. The special menus that appear
in the Tools option of the Toolbar of the Oracle Applications can
be used either at Form level, Block level or the individual item
level. These are the basic steps to use the special menus
NOTE: The Oracle Application developer can use up to 45
Special Menus in Oracle Applications; the first 15 special menus
(SPECIAL1 to SPECIAL15) will be available under tools menu.
For using the other special menus (SPECIAL16 to SPECIAL45)
please refer the step 5.
NOTE: To use checkboxes in the special menus please refer to
step 6.
1. In the PRE-FORM trigger, call the INSTANTIATE standard call to enable
the special menu and to assign a label to the special menu.
APP_SPECIAL.INSTANTIATE ('SPECIALn', '&My Special Menu');
where in the first argument ‘n’ in the SPECIALn has ranges
from 1 to 45 and the second argument is the label of the
special menu.
TIP: Using a ‘&’ (ampersand) character in the second argument
(hint) will enable the shortcut keys for the form.
2. Write a user defined trigger named SPECIALn at the form level and code
the corresponding logic behind the usage of the special menu.
3. Enable the special menu by using the APP_SPECIAL.ENABLE call at the
any level.
E.g.: At the PRE-BLOCK trigger of the corresponding block where the
special menu is going to work, call the enable procedure.
APP_SPECIAL.ENABLE ('SPECIALn', PROPERTY_ON);
4. Disable the special menu by using the APP_SPECIAL.DISABLE.
E.g.: At the POST-BLOCK trigger of the corresponding block where
the special menu is going to work, call the disable procedure.
APP_SPECIAL.ENABLE ('SPECIALn', PROPERTY_OFF);
5. For using the menus 16 to 45 we have to enable the SPECIAL_B and
SPECIAL_C menus (actually it is the Toolbar Items) before we call the
instantiate call for the special menus 16 to 45. Use the following call to do
the same
APP_SPECIAL.INSTANTIATE ('SPECIAL_B', 'My Action Menu');
or
APP_SPECIAL.INSTANTIATE ('SPECIAL_C', 'My Report
Menu');

Page 4
Customizing Oracle Forms for Oracle Applications

NOTE: The SPECIAL_B and the SPECIAL_C menus appear


on the Tool bar of Oracle Applications window.
TIP: Use of APP_SPECIAL.ENABLE(‘SPECIAL_X’,
PROPERTY_ON) or APP_SPECIAL.ENABLE(‘SPECIAL_X’,
PROPERTY_OFF) would enable/disable the whole menu under
SPECIAL_X tool bar item.
6. For using the checkbox in the special menus, call the instantiate
procedure with the SPECIALn menu suffixed with ‘_CHECKBOX’.
E.g. APP_SPECIAL.INSTANTIATE
('SPECIALn_CHECKBOX', '&My Special Menu');
NOTE: Use the call APP_SPECIAL.SET_CHECKBOX
(‘SPECIALn_CHECKBOX’, ‘TRUE’) or APP_SPECIAL.
SET_CHECKBOX (‘SPECIALn_CHECKBOX’, ‘FALSE’) to
set the value of the checkbox to checked or unchecked.
NOTE: Use the call APP_SPECIAL.GET_CHECKBOX
(‘SPECIALn_CHECKBOX’) to get the value of the checkbox,
the call returns a Boolean value.

2.2 Popup Menus


With the introduction of popup menus (right click menus) in
Oracle Forms 6, subsequently the feature was also
incorporated in Oracle Applications 11i. The following steps
would describe how to use the features of popup menus.
NOTE: To add a submenu under the popup menus, make
appropriate changes in the popup menu POPUP menu, which
comes along with the TEMPLATE.fmb
1. In the PRE-POPUP-MENU trigger of the Item, instantiate the popup
menu using the APP_POPUP.INSTANTIATE call.
E.g.: APP_POPUP.INSTANTIATE (‘POPUPn’, ’My Popup
Menu’);
NOTE: Up to 15 popup menus for Oracle Applications can be
customized.
2. Write an Item level trigger POPUPn and code the appropriate handler
logic for the popup menu.

2.3 Enabling query behavior


Oracle Applications allows the Query Find behavior to be implemented in the
forms. There are two implementations for the Query Find, using Find windows
and using Row-Lov’s.

2.3.1 Implementing Query Find window


The Query Find window would be based on a result block, where the
customization demands the find window. The following steps would describe
how to implement the Query find window.

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

E.g: APP_FIND.QUERY_FIND ( ‘MYRESULTBLK’,


‘MYFINDBLK’,
‘MYFINDWINDOW’);
TIP: To enable the Query Find window to appear first when the
form opens, call the trigger QUERY_FIND in the WHEN-NEW-
BLOCK-INSTANCE trigger.
E.g: execute_trigger (‘QUERY_FIND’ );

2.3.2 Implementing ROW-LOV


The ROW-LOV implementation would also be based on the result block, the
following steps describe the same.
A. Create a parameter to hold the value of the primary key of the result block.
E.g. create a parameter P_PRIMARY_KEY in the form
B. Create a LOV (E.g. MYROWLOV) for the identifying the
desired record. The LOV should contain the description
columns where the user would want to filter the records
and the primary key field of the result block as a column.
NOTE: The return value of the LOV should be the parameter
created in the previous step.
TIP: Enabling the long list in the LOV for the ROW-LOV is
always recommended.
C. Code a PRE-QUERY trigger in the result block, and copy the value of the
parameter to the result blocks primary key item.
E.g: IF :parameter.G_query_find = ’TRUE’ THEN
COPY ( name_in (‘PARAMETER.P_PRIMARY_KEY’),
’MYRESULTBLK.PRIMARYKEY’);
:parameter.G_query_find := ’FALSE’;
END IF;
D. Create a user defined trigger EXECUTE_QUERY in the results block,
code a call to the QF call.
E.g: APP_FIND.QUERY_FIND ( ‘MYROWLOV’ );

2.4 Coding the Calendar


The Calendar is a form object that allows the user to select the date and time
values from a Calendar. Some special validation rules ensuring that only valid
dates can be selected can also be coded.
The following tables shows the standard calendar procedures that can are used
extensively.

S. No Calendar Calls Description


1. CALENDAR.SHOW(<first_date
The Calendar can be invoked by the call.
>)
2.
CALENDAR.SETUP Disables the Dates in the calendar
3. The calendar event procedure, this is used
CALENDAR.EVENT
internally by the Calendar procedures.

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')));

2. Disable the weekends in the Calendar:


Use the call CALENDAR.SETUP (‘WEEKEND’) to suppress the Saturdays
and the Sundays.
NOTE: The Weekend would disable only Saturdays and
Sundays.
TIP: To disable the other dates (for Eg. Fridays & Saturdays)
use the SQL statement argument in the CALENDAR.SETUP
standard call.

3. Advanced Option in Calendar.Setup:


The developer can use the SQL Statement in the
CALENDAR.SETUP call & dynamically the dates can be
disabled.
NOTE: The SQL statement should select 2 date columns with
alias as LOW_DATE and HIGH_DATE respectively. This is
mandatory.

Other features in Calendar:


1. Title:
The developer can provide custom titles to the Calendar block. Use the call
calendar.setup('TITLE',NULL,NULL,'<custom title>') to provide the title.
2. Display Only calendar:
The developer can display only the calendar depriving the select feature in
the calendar. Use the call calendar.setup ( ‘DISPLAY’) for the same.
3. Display Time along with the calendar:

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.

NOTE: If the Data type of date field in which the Calendar is


attached is “Datetime” then automatically the Time part would
be painted in the Calendar invoked.

2.5 Using Multiple Form functions in Oracle Applications


Multiple form functions are a very potential feature in Oracle Applications
where most of the customizations don’t completely utilize. Typical examples
would be disabling buttons/menus for certain responsibilities/access rights for
certain responsibilities etc. This section may provide only couple of examples
only but the Oracle Applications designer and the developer is free to
implement multiple form functions features to the maximum creativity.
Examples:
1. Requirement: The Deletion property entry of the form is limited to certain
responsibilities and not for all the responsibilities.
Implementation: For this requirement we can create an additional form
function and assign this form function to the responsibilities who are
allowed to delete the records in the form. The following steps would explain
how to achieve the functionality.
A. Create the custom form from the template form and customize the
required blocks and windows.
B. The default delete allowed property of the block (name of the block
is say MYBLOCK) have to be set to No.
C. Create a custom form function; say the name of the form function is
MYFORM_DELETEALLOWED.
D. In the PRE-FORM form level trigger of the form, add the following
piece of code.
IF fnd_function.test (‘MYFORM_DELETEALLOWED’)
THEN
Set_block_property ( ‘MYBLOCK’, DELETE_ALLOWED,
PROPERTY_ON );
END IF;
E. Assign the MYFORM_DELETEALLOWED property to the
responsibilities who can delete the records from the custom form.
2. Requirement: There are certain special menus on the custom form that needs
to be disabled for certain responsibilities.
Implementation: For this requirement also we can create an additional form
function and assign this form function to the responsibilities who are
allowed access the menu. The following steps would explain how to achieve
the functionality.
A. Create the custom form from the template form and customize the
required blocks and windows.
B. Create a custom form function; say the name of the form function is
MYFORM_MENU_DISABLED.
C. In the PRE-FORM form level trigger of the form code, that enables
the Special menu.

Page 9
Customizing Oracle Forms for Oracle Applications

IF NOT fnd_function.test (‘MYFORM_MENU_DISABLED’)


THEN
APP_SPECIAL.INSTANTIATE (<..........>);
END IF;
D. Assign the MYFORM_DELETEALLOWED property to the
responsibilities that cannot access the special menu.

2.6 Implementing Query only forms using Form functions


In most of the custom developments in Oracle Applications forms where there
is a data entry, the end user would also prefer to have a view only form with the
same layout and the Query source. In this case the developer need not duplicate
the form & change the properties of the blocks in the form. The developer can
create a Form function with the parameter “QUERY_ONLY” with the value
passed as “Yes”.
The following steps explain how to implement the Query only forms.
A. Create a form function with the parameter as ‘QUERY_ONLY=“Yes”’.
B. In the PRE-FORM of the form, disable the INSERT, UPDATE and the
DELETE property of the blocks. Also disable any associated buttons and
the menus.
The following example code is shows how to disable the Properties of the
block and the other associated items.
IF name_in ('PARAMETER.QUERY_ONLY') = 'Yes'
THEN
--
-- <Custom block name> Block
--
set_block_property ( '<Custom Block>',
INSERT_ALLOWED, PROPERTY_OFF );
set_block_property ('<Custom Block>',
UPDATE_ALLOWED, PROPERTY_OFF );
set_block_property ('<Custom Block>',
DELETE_ALLOWED, PROPERTY_OFF );
--
-- Disable Items
--
app_item_property.set_property ('<control block>.<items>',
DISPLAYED, PROPERTY_OFF);
END IF;

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

3 Enabling the Folders feature in Oracle Applications


Forms
Customizing forms with folder feature or Folder forms as it is called provides the
end user to “customize” the fields at a desired position and at desired width. To
enable this feature the Oracle Application developer needs to follow these steps
1. Customize the form from the TEMPLATE file and create the
required windows and canvases.
NOTE: Only the items (fields) placed in a stacked canvas
can be ‘movable’, hence place all such items in a stacked
canvas.
2. Attach the library APPFLDR.pll to customization, while attaching the Forms
builder would ask whether to remove a non-portable directory for the form
library, select yes.
3. Also open the APPSTAND.fmb in the forms builder along with the file and
make a reference to the STANDARD_FOLDER object group available in the
APPSTAND form. (Drag and drop the STANDARD_FOLDER object group
from the APPSTAND.fmb to customized form’s object group).
NOTE: In this step just reference the object group, do not
copy. (i.e. in the Popup select reference and do not select
copy).
4. Identify the block that needs to be folder enabled (say
CUSTOM_BLOCK). Make necessary changes in the layout.

CHECK: No headings “Prompts” are required for the columns.

5. Create a “Prompt” block (say CUSTOM_BLOCK_PROMPT) to


hold the column headings and the standard folder items and
add the following standard items in the Prompt block.
Field Class Note
To be placed on the left top corner of the
FOLDER_OPEN FOLDER_OPEN
content canvas
To be placed on the left top corner of the
FOLDER_TITL DYNAMIC_TIT
content canvas next to the item
E LE
FOLDER_OPEN
FOLDER_DUM FOLDER_DUM
-
MY MY
FOLDER_ORD
ORDER_BY1 Place beneath all fields in the content canvas
ERBY
FOLDER_ORD
ORDER_BY2 Place beneath all fields in the stacked canvas
ERBY
6. Add all Prompt fields 'to be displayed' in the Prompt block
TIP: The developer can copy and paste the fields from the main
block to Prompt block and change the class property of all these
fields to “DYNAMIC_PROMPT”.
CHECK: For each Prompt field set the Initial value properties to
the default column heading required for the corresponding field.

Page 11
Customizing Oracle Forms for Oracle Applications

7. Add the following code in the triggers in form as shown in the table.

Trigger Type Trigger Name Code


app_folder.event (
FOLDER_ACTIO
Form Level :global.folder_action
N );
IF (:global.folder_action
= 'SHOW-FIELD')
THEN
app_item_property.set_property(
FOLDER_RETU '<block_name>' || '.' ||
Form Level NAME_IN('GLOBAL.
RN_ACTION
FOLDER_FIELD'),
ALTERABLE,
PROPERTY_ON );
END IF;
app_folder.define_folder_block (
'<FOLDER_OBJECT_NAME>',
'<F_BLOCK>', -- folder block
WHEN-NEW- '<P_BLOCK>, -- prompt block
'<STACKED_CANVAS>',
Form Level FORM_INSTAN '<FOLDER_WINDOW>'
CE );
app_folder.event(
'WHEN-NEW-BLOCK-INSTANCE'
);
Block Level
Of PRE-QUERY App_folder.event('PRE-QUERY');
MY_BLOCK
Block Level
KEY-NEXT-
Of App_folder.event('KEY-NEXT-ITEM');
ITEM
MY_BLOCK
Block Level
Of KEY-EXEQRY App_folder.event('KEY-EXEQRY');
MY_BLOCK
Block Level WHEN-NEW- app_folder.event(
Of BLOCK- 'WHEN-NEW-BLOCK-INSTANCE'
MY_BLOCK INSTANCE' );

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
);

The standard events that can be disabled are :


AUTOQUERY, PUBLIC, DEFAULT, ORDERBY, NEW, SAVE,
DELETE, ADD, SHOW, CUT, HIDE, SWAP, MOVE, BIGGER,
WIDEN, SMALLER, SHRINK, AUTOSIZE, PROMPT, CONTENTS,
QUERY, RESET

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

4 Using the Attachment feature of Oracle


Applications
The attachments feature enables users to link unstructured data, such as images,
word processing documents, spreadsheets, or text to their application data. The
following steps would help the developers to enable the attachments for the
entities, so that the end users can attach the documents to the entities.
The attachments can be enabled at form level and form functions level. If the
attachments were enabled at form level and the form function level, the form
function attachments would override since the form function level is the lowest
level. Please refer to Oracle Applications Developers guide for more details.
The attachments can be implemented in the following two ways:
A. Defining a new attachment to a new custom form.
B. Add an existing attachment of a standard form to the
“custom/standard” form.

A. Defining a new attachment to a new custom form.


The following three steps would help the developers to define an attachment
to a new custom form.
 Define your document entities using the Document Entities window
 Define your document categories using the Document Categories
window
 Define your attachment functions using the Attachment Functions
window
The following section would be more legible when explained with an
example. A simple example would be attaching a note (A short text file) to the
custom form CUSTFORM which is registered in the custom application
MYAPPLICATION. The primary key of the table on which the CUSTFORM is
based is PRIMKEY, the block where the field PRIMKEY is present is
CUSTBLOCK.
i. Define document entities
a. Navigate to the Document entities window (Navigational path: Oracle
Applications → Responsibility: Application Developer→ Attachments
→Document Entities) and define the entities in the document entities
block.
b. Enter the Table name, a unique Entity name and Entity Id, an entity
prompt and the application where the table is registered.
NOTE: The table is where the entity is stored and a primary key
should always identify the entity record.
E.g: Enter the Table name, Entity name, Entity Id, Prompt and
application as CUSTFORM, Custom Form Attachment Demo,
DEM_CUSTFORM, Attachment Demo and MYAPPLICATION
respectively.
ii. Define document categories

Page 14
Customizing Oracle Forms for Oracle Applications

a. Navigate to the Document categories window (Navigational path:


Oracle Applications → Responsibility: Application Developer→
Attachments →Document Categories) and define the categories with
the default data type in the document categories block.
E.g: Define the category as Attachment Demo – Short File, with the
data type as “Short Text”.
b. The assignments button would lead to the forms and functions that are
enabled to the category, enable the new category to the ‘Form’
‘CUSTFORM’.
TIP: Alternatively the categories attached to the form can be
defined in the “Attachment Functions” form. Please refer the
next step for the same.
iii. Define attachment functions
a. Navigate to the Document categories window (Navigational path:
Oracle Applications → Responsibility: Application Developer→
Attachments →Attachment Functions) to define the attachments.
b. Enter the Type, Name, a User name and the Session Context in the
Attachment Functions window.
E.g: Enter the Type, Name and the User name as Form, CUSTFORM
and Attachment Demo – Custom Form.
c. Define the blocks in the custom form by navigating to the Block
Declarations window. Key in the block name and the method of the
attachment implementation. There are methods currently used, viz.
Allow Control, Query Only.
E.g: Enter the Block name as CUSTBLOCK and the method as ‘Allow
Control’.
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.
E.g: Enter one of the fields “NAMEFIELD” of the form CUSTFORM
as the context field for the attachment. The syntax would be
CUSTBLOCK.NAMEFIELD. Here NAMEFIELD is another field in the
form.
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.

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

Вам также может понравиться