Professional Documents
Culture Documents
An Oracle Whitepaper
March 2009
Summary…………….…………………….…………….………….…………..…………..2
Concepts..…………….……………….….………………….….…………….….…………2
Setup and demo………………………….…………….……….………….….….…………4
Code and functionality changes…….….………………………..……..…….…….………12
Security issues……………………….……………………………………….….………...14
Operations with attachments…………..…………………………………….…………….14
Attachment across entities…………………………………………………………………14
Summary
This paper addresses the Automatic Attachments functionality in Order Management
application, version 11.5.10 and release 12.
Attachments feature in Order Management allows to:
• Include attachments with orders and order lines
• Include attachments with order returns and order return lines
• Add free form text to the Sales Order Acknowledgement Report
• Quote header and lines include attachments
Concepts
The attachments feature enables users to link unstructured data, such as images, word
processing documents, spreadsheets, or text to their application data.
Attachment
A document associated with an entity is called an attachment.
Attachment function
A form or form function in your application cannot use attachments until the attachments
feature is set up for that form or function; that is, it must be defined as an ”attachment
function” in the Attachment Functions window.
Document
A document is any object that provides information to support another object or action.
Examples include images, word processing documents, spreadsheets, or text.
Document Category
A document category is a label that users apply to individual attachments and documents.
Document categories provide security by restricting the documents that can be viewed or
added via a specific form or form function.
When you set up the attachments feature, you assign document categories to particular forms
or form functions. When a user defines a document, the user assigns a category to the
document. The attachments form can query only those documents that are assigned to a
2
category to which the calling form or form function is associated. A ”Miscellaneous”
category is seeded to provide easy visibility of a document across forms.
Entity
An entity is an object within Oracle Applications data, such as an item, an order, or an order
line. The attachments feature must be enabled for an entity before users can link attachments
to the entity. In the context of attachments, an entity can be considered either a base entity or
a related entity. A base entity is the main entity of the block. A related entity is an entity that
is usually related to the block by a foreign–key relationship.
3
2. Define a document category
3. Assign document category to various entities types: Form, Report or Function
4. Define a document of type Standard or Template in the Documents form
5. Create Attachment Addition Rules
6. Create a Sales Order and check if the attachment document is applied automatically
Demonstration
1. Set the profile OM: Apply Automatic Attachments
(OE_APPLY_AUTOMATIC_ATCHMT) to Yes.
2. Define a document category if you haven’t already defined one and choose a default data
type (Figure 1).
Go to Order Management > Setup > Orders >Attachments > Document Categories
The Category defines the purpose of an attachment and controls which forms can access it.
Select the Default Data Type from the list of values (Long Text, Short Text, File or Web
page).
The default Datatype can be overridden when you create documents.
- Text – (short text or long text)Enter text that is less than 2000 characters. If the text you
want to attach is more than 2000 characters, upload it in a file.
- File - Launch the Upload a File window in your browser. Select the Browse button to
locate the file in your file system, or enter the file location in the File field.
File documents are external files such as Microsoft Word files, Microsoft Excel files, image
files such as .JPG files, or other types of files.
When File type documents are attached, they are loaded into the database in the location set
be the profile option Attachment File Directory (ATTACHMENT_FILE_DIRECTORY). When a
4
File document is selected, the lower half of the Attachments window displays an ”Open
Document” button that invokes a web browser and passes the file to the browser. The web
browser handles displaying the file as appropriate based on its filename extension.
The documents having Data Type: File cannot be saved as Template because they cannot be
edited.
- Web Page - Web Page documents are attached as URLs in the format
http://www.oracle.com (or the format www.oracle.com if your browsers can use that format).
When a user selects a Web Page document to view, the lower half of the Attachments window
displays an ”Open Document” button that invokes a web browser and passes the URL to the
browser.
Your cursor advances to the File or URL field on the Source tab of the window. Enter the
URL for the Web page.
Optionally, enter an effective date range for your attachment category.
Save the chages.
5
Figure 3 – Defining Documents having data type as Web Page
3. Assign document category to various entities types: Form, Report or Function using the
Assignments button (Figure 4).
Order Management enables Oracle Application Attachment functionality for the following
entities:
• The Sales Order and Order Organizer Window (form)
• The Sales Order Acknowledgement Report
If you choose to include an Attachment for printing on the Sales Order Acknowledgement
Report, you are currently limited to selecting a data type of Short or Long Text.
Additionally, order-level attachments print only at the order header or order footer within the
output, and order line-level attachments print only in the report body (within the body of each
record displayed).
You can associate as many reports as you need with a single category. If you customize your
own reports to include documents, you can specify your own as well as Order Management’s
default reports in this field. Only text documents can print on reports.
6
Oracle Shipping Execution enables Oracle Application Attachment functionality for entities
such as: Bill of Lading, Commercial Invoice, Pack Slip, and Pick Slip.
Oracle Pricing enables Oracle Application Attachment functionality for entities such as
Agreements and Price Lists.
For entity type: Report, select a Format: Header, Body or Footer.
The Format value determines where documents in this category will appear on the report. You
can add your own formats for selection within the CategoryAssignment window by adding
values to the Order Management QuickCode NOTE_FORMAT type.
However, standard reports support only the seeded format of Header, Body, and Footer.
In standard reports, order-level notes print only at the header and footer levels; line-level
notes print only in the report body.
Attach the document to the document category previously defined (Figure 5).
7
Figure 6 – Creating an Attachment Addition Rule for the new created Document
These rules are used for automatically attaching of all types of documents to order headers
and order lines.
For Order Management, attachment addition rules can be defined at the header level for the
following attributes for orders, quotes, or returns:
• Customer
• Customer PO
• Invoice To
• Order Category
• Order Type
• Ship To
At the order line level, you can specify your attachment addition rules by specifying values
for the following attributes on the order, order line, quote line, or return line:
• Customer
• Inventory Item
• Invoice To
• Line Category
• Line Type
• Purchase Order
• Ship To
Note: Blanket Sales Agreement does not support rule-based attachments.
6. When creating a Sales Order having an entity matching with the rule attribute defined in the
addition rule defined previously, the attachment is applied automatically (Figure 7).
(Order Management > Order, Returns > Sales Orders form)
8
Figure 7 – Creating a new Sales Order elligible for automatic attachment
When accessing Attachments icon, the Attachment window is opened and the text is
displayed. The Attachments icon invokes the Attachments window. If attachments already
exist, the icon appears as a paperclip holding paper (Figure 8).
Note: In Order Organizer, for line level attachments, the paper clip icon will only be
highlighted in the "Lines TAB" of the Order Organizer form. The paper clip icon in the
"Summary TAB" of the Order Organizer form will only be highlighted when there are header
level attachments.
9
A "Publish to Catalog" button has been added to the Attachments form, to allow one-time
attachments to be easily published to the catalog as either Standard or Template documents.
The "Publish to Catalog" button is conditionally enabled, based on the current row status and
usage type (one-time, standard, etc). The button is also secured by Function Security, to allow
it to be globally disabled.
• Row Status: The button is only enabled for queried rows, not for new rows. Before
publishing to the catalog, a new attachment row must first be saved to the database.
• Usage Type: The button is only enabled if the Usage Type of the current row is one-
time. Standard documents are already published to the catalog, the button is disabled.
If a One-time document is of any other type (File, URL, OFO), the dialog will pop up with 2
buttons: and ask “Would you like to publish as a Standard?”. Choices are 'Publish' or
'Cancel'. If the user picks Publish then the current record will simply be changed to standard
and this will of course be published to the catalog by default. Cancel would do nothing and
close the dialog.
10
Figure 9 – Creating a one-time document in Attachment window
The 'May Be Changed' checkbox is always disabled for documents having Usage Type as
Standard and users will not be able to update the attachment. For attachment documents with
Template as usage type the ‘May be changed’ check box is always enabled.
The Standard and Template documents can be queried using Document Catalog window
(Figure 11).
11
Figure 11 – Querying the Template documents from Document Catalog window
Also, the document can be previewed using Preview button (Figure 12):
Figure 12 – Viewing the documents with Preview button in Document Catalog window
12
One-time documents were meant to be used only once (not re-used), created only by the user
on the Attachments (FNDATTCH) form. Whenever reusing a document from the catalog it
should be a template or a standard document. If you re-use a one-time document over and
over it used to show up in the catalog for each time - sometimes up to a thousand instances.
This left room for error in picking one of the thousand documents that may look the same in
the description field but were different in the content field.
A template and standard document can be controlled and maintained whereas a one-time
cannot. When a template is selected and attached from the catalog it becomes a one-time. A
standard document also resides in the catalog and when is selected to be attached from the
catalog, the same document can be shared across many entities (orders or WIP jobs).
2. The FND patch 6843372 - resolves the issue of display of one-time document with
template region greyed out in FNDATDOC form (Documents form) for the new records.
In order to correct the old records, datafix bug 7375991 is already logged for the same and
provides a datafix for correcting the old records.
3. The bug 6814730 fixed the attachment issue wherein change of attachment attribute was
not deleting the attachment for old attribute value and attaching the attachment for new
attribute value. Because of the above fix when any attribute (with no addition rules defined) is
changed, then also it was triggering attachments which has been partially fixed in bug
7449257. Since bug 7449257 does not fix the complete issue (it is not feasible to fix it with
current framework), a new Enhancement Request 7649341 has been raised with Develoment
team
13
Security issues with Attachments in Order Management
When viewing the sales order and returns, you should be able to specify who has the ability to
apply and update the attachment and who can only view the attachment. This will be setup via
Attachment Functions. For Order Management, two attachment functions will be seeded:
1. Query_only sales order form function (ONT_OEXOEORD_VW): the attachment function
will be setup such that only viewing of attachments is allowed. Users cannot create, update or
delete the attachments if accessing the form via this function.
2. Sales Order form (OEXOEORD): from any function other than the above query_only
function that accesses the sales order form, the user will be able to query, update, insert or
delete attachments.
The system administrator can thus restrict who can only view or who can view & edit
attachments by setting up the associated menu to access the query_only function or any other
sales order form function respectively.
You can copy an attachment when using copy sales order functions.
In Copy window, the tabs Copy Headers and Copy Lines, there is a checkbox Attachments
that allows you to specify if you want to copy attachments from the source sales order.
Update an attachment
You can update an attachments of type: One-Time and Templates. The attachment documents
of type Standard cannot be updated.
When a Template is attached and modified in the Attachments form the template itself is not
updated instead another document is created with usage type = One-Time and that document
is attached to the entity.
Delete an attachment
If you delete an attachment that has a usage type of Template or One-Time, the document
content, as well as the association of the document to the record is deleted.
If you delete an attachment that has a usage type of Standard, the document content is not
deleted, only the association of the document to the record is deleted.
14
1) Under Application Developer responsibility > Attachments> Attachment Functions
(Figure 13).
2) In the field Name, query for "INVIDITM" which is the fmb file name for "Master
Item" form (Figure 14).
15
Figure 15 – Entity Declaration form and Primary Key Fields tab
16
Figure 17 – Block Declaration form for OEXOEORD
Figure 18 – Entity Declaration form with the Item entity defined and setup of Priviledges
10) In the Privileges tab make query as 'Always' and rest privileges as 'Never' (Figure 18).
11) In the Primary Key Fields tab put the following values (Figure 19):
Key1 field: LINE.SHIP_FROM_ORG_ID which is mapped with
MTL_SYSTEM_ITEMS.ORGANIZATION_ID of "Master Item" form.
Key2 field: LINE.INVENTORY_ITEM_ID which is mapped with
17
MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID of "Master Item" form.
Figure 19 – Entity Declaration form with the Item entity defined and setup of Primary Key
12) Define an attachment in the master items form for an item (Organization Item).
Figure 20 – Access Attachment icon in order to define an attachment for the selected item
In the Attachment window, select a valid Category. In this case: Miscellaneous(Figure 21)
18
13) Check if the category: Miscellaneous (as selected in Figure 21 above) has the Sales Order
form assigned to it.
Go to Application Developer responsibility > go to Attachments> Document Categories.
Query for category: Miscellaneous(Figure 22)
Figure 22 – Check if Sales Order is present and enabled in Category Assignments window
14) Create a sales order having a sales order line for this item and save it (Figure 23).
19
See the Attachment icon is enabled on Sales Order form and the attachment text is visible
when opening the attachment (Figure 24).
Figure 24 – Open the attchment icon and check if the correct attachment is visible
20
Automatic Attachments in Order Management
Author: Marian Stan
Senior Technical Support Engineer
Global Product Support
Special thanks to Aditya Mallik, Manager of OM Development team and Chidananda Pati, Senior
Applications Engineer in OM Development team for their great help in reviewing and providing valuable
suggestions for improving this whitepaper.
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracle.com
21