Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Versions :
1.0
Create Date :
20-April-2015
Reviewer :
Sriram Ramanujam
Update :
Page 1
Table of Contents
1. INTRODUCTION.................................................................................................................................................. 3
1.1 OVERVIEW OF ATTACHMENTS ....................................................................................................................................3
1.2 USAGE ...................................................................................................................................................................3
1.3 DEFINITIONS ............................................................................................................................................................3
2. HOW ATTACHMENTS WORK .............................................................................................................................. 4
2.1 HOW USERS USE ATTACHMENTS .................................................................................................................................4
2.2 BEHIND THE SCENES ..................................................................................................................................................4
3. PLANNING AND DEFINING THE ATTACHMENTS FEATURE .................................................................................. 5
3.1 PLANNING TO ADD THE ATTACHMENTS FEATURE TO YOUR APPLICATION.............................................................................5
3.2 SETTING UP THE ATTACHMENTS FEATURE FOR YOUR FORM .............................................................................................5
3.2.1 Document Entities Window ..........................................................................................................................5
3.2.2 Document Categories Window ....................................................................................................................7
3.2.3 Attachment Functions Window ....................................................................................................................9
4. USING THE ORACLE PAYABLES ATTACHMENT FEATURE ................................................................................... 16
4.1 ADDING ATTACHMENTS FROM INVOICE BATCHES .........................................................................................................16
4.2 ADDING ATTACHMENTS TO INVOICES .........................................................................................................................17
4.3 HOW TO PUBLISH TO CATALOG .................................................................................................................................19
4.4 HOW TO CHOOSE FROM THE DOCUMENT CATALOG.......................................................................................................20
4.5 ATTACHMENT FEATURES .........................................................................................................................................21
4.6 INVOICE APPROVAL WORKFLOW ATTACHMENTS ..........................................................................................................25
4.7 PURCHASE ORDER ATTACHMENTS .............................................................................................................................26
4.8 ISUPPLIER ATTACHMENTS .........................................................................................................................................27
4.9 ORACLE INTERNET EXPENSES ATTACHMENTS ...............................................................................................................29
5.TECHNICAL OVERVIEW ...................................................................................................................................... 32
6. REFERENCE....................................................................................................................................................... 32
7. CONCLUSION ................................................................................................................................................... 32
Page 2
1. Introduction
1.1 Overview of Attachments
The attachments feature enables users to link unstructured data, such as images, word processing documents, spreadsheets, or text to their
application data. To illustrate or clarify your application data, you can use the attachment functionality .For example, you could attach to an
invoice a photograph of items you ordered.
Attachment information can flow through your entire application. You can provide security to limit which attachments users can see from
particular forms by assigning document categories to your form functions. Users then assign individual attachments to particular categories.
You can provide security to limit which attachments users can see from particular forms by assigning document categories to your form
functions. Users then assign individual attachments to particular categories.
You can add the attachments feature to your application forms and functions without modifying form code, so long as your forms are built using
Oracle E-Business Suite standards (starting with the Oracle E-Business Suite TEMPLATE form).
Note: The current version of the Attachments feature supports attachments to a restricted set of applications data. Check your product-specific
documentation to determine if the Attachments feature is enabled for your Oracle Applications product, and if so, for what data.
1.2 Usage
One way that Oracle empowers their customers to go green, is by enabling an attachment feature in their Oracle forms and functions; from
expense report receipts, to supplier invoices, to Payables backup.
Oracle allows their customers the flexibility to attach documents, files, and URLs to their database. If workflow approval is enabled, the
customer may also use their workflow approval processes to include the sending of attachments to suppliers, approvers, etc.
1.3 Definitions
It is useful to specifically define certain terms that have special meaning within the context of the attachments feature.
Invoice : Oracle Payable Invoice
PO : Purchase Order
Document : A document is any object that provides information to support another object or action. Examples include images, word processing
documents, spreadsheets, or text.
Entity: An entity is an object within Oracle Applications data, such as an item, an invoice. The attachments feature must be enabled for an entity
before users can link attachments to the entity.
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 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 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.
Page 3
Page 4
Plan your attachments feature for your application. See: Planning to Add the Attachments Feature to Your Application
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.
We recommend that you go through the Attachment Functions window and its related windows to familiarize yourself with their fields and
requirements before attempting to define your attachment functions.
3.2.1 Document Entities Window
Use this window to register attachment entities. A single table may contain multiple entities. An entity needs to be registered only once, even
though attachments to it may be viewed in multiple places.
You must plan your attachments feature thoroughly before using this form. See: Planning to Add the Attachments Feature to Your Application.
Page 5
Page 6
Oracle E-Business Suite provides a "Miscellaneous" category that you can assign to your attachment function, so if you intend to use that
category, you do not need to define any new categories in this form.
Page 7
Effective Dates
The effective dates for the category.
Assignments Button
This button brings up the Category Assignments window that you can use to view and/or enter the forms or form functions for which your
category is available.
Page 8
Type
Choose Form or Function.
Name
Enter the name of a form or function (that has already been enabled for attachments) that you want to be able to use your category.
Enabled
Check the Enabled check box if the category should be enabled for the form or function. If you uncheck the Enabled check box for a form or
function, any existing attachments to that form or function that use this category will no longer be visible to the user using the Attachments
window.
3.2.3 Attachment Functions Window
Page 9
a. Categories Window
Use this window to view or assign document categories to your attachment function. Categories you assign to your function are available across
all blocks in your form where attachments are enabled (that is, you cannot have a category available in one block of a form and not another block
in the same form where both blocks have attachments enabled).
Page 10
Category
Enter the category you want to assign to this function. You must assign at least one category to your attachment function. Oracle E-Business
Suite provides a "Miscellaneous" category that you can assign to your attachment function.
Enabled
Check the enabled box if this category should be enabled for this function.
If you are using this form to set up attachment categories for reports, you need not use the Blocks or Entities windows.
Block Name
The Oracle Forms block name as entered in Form Builder. Enter only blocks for which you want to enable the attachment feature.
Page 11
Method
Choose either "Allow Change" or "Query Only". "Allow Change" means that the user can insert, update, or delete attachments when the
attachment form is invoked from the block. "Query Only" means that the user can view, but not change, delete or create, attachments when the
attachment form is invoked. If you select "Query Only" in this field, it applies to all attachments for all entities for your block. If you select
"Allow Change", you can selectively restrict privileges for specific entities using the Entities window.
Secured By
Choose Organization, Set of Books, Business Unit, or None, depending on how the form and its data is secured. Financial applications are
typically secured by sets of books. Manufacturing applications are typically secured by organization, and Human Resources applications are
typically secured by business unit ID.
When a document is defined, its security mechanism is defined as well. For example, you can specify that a document is secured by organization,
and that it is owned by organization ABC. The attachment system will now only display this document when the attachments form is invoked by
a form running in the context of the ABC organization.
To facilitate sharing of documents across security contexts (organization, set of books, business unit), a document can be defined as having
"None" as its security type, or it can be defined as being "Shared." Defining a document with either of these attributes will allow the attachments
form to display the document regardless of the security context of the form that invokes the attachments form.
Organization
If the attachment is secured by organization, enter the name of the context field in your form that holds the organization ID. Use the syntax
block.field (for example, ITEMS.ORGANIZATION_ID). You must include the block name.
Set of Books
If the attachment is secured by the set of books, enter the name of the context field in your form that holds the set of books ID. Use the syntax
block.field (for example, PARAMETER.SET_OF_BOOKS_ID). You must include the block name.
Business Unit
If the attachment is secured by business unit, enter the name of the context field in your form that holds the business unit ID. Use the syntax
block.field (for example, EMPLOYEE.ORGANIZATION_ID). You must include the block name.
Context 1 - Context 3
You can set up your attachment function so that when a user opens the Attachments window, the title of the Attachments window displays up to
three values from your form. These values can help the user identify the record to which the user is attaching the document. You can specify the
names of up to three fields from which the attachments feature can derive these values. For example, for attachments to an Invoice, you may want
the title of the Attachments window to display the Invoice number and the Vendor name, so you would specify the name of the field that holds
the invoice number and the name of the field that holds the vendor name.
Enter the name of the field that holds the context information to be used in the Attachments form title. Use the syntax block.field (for
example,INV_SUM_FOLDER.INVOICE_NUM). You must include the block name.
Entities Button
This button brings up the Entity Declaration window that you can use to enter the entity declarations for your attachment function.
Page 12
Entity
Enter an entity name from the list of entities that allow attachments.
Display Method
The Attachments window has two modes in which it displays attachments. This mode is toggled with the "Include Related Documents" check
box. The only difference is which attachments will be queried when the user enters the window. If the "Include Related Documents" check box is
unchecked, the window should display only those attachments that are directly linked to the current record. When "Include Related Documents"
is checked, attachments loosely related to the current record can be included as well.
Variable
Description
Main
Window
Specify "Main Window" for entities whose attachments you want to see immediately in the Attachments window whether or not
the "Include Related Documents" check box is checked. Typically you would specify "Main Window" for the base entity of the
block (or the one entity for the block that allows insert of new attachments).
Entities that are included in turning on the attachment toolbar icon indicator should all use the "Main Window" display method.
The user should never be shown an icon that indicates that attachments exist, press the toolbar icon, and find nothing queried up in
the attachments form.
Related
Entity attachments with a display method of "Related Window" will be displayed along with those that use the "Main Window"
display method only when the "Include Related Documents" checkbox is checked.
Page 13
Window
Attachments to entities related to the base entity by a foreign key would typically use the "Related Window" display method.
Attachments not included in setting the toolbar iconic button would typically use the "Related Window" display method.
Include in Indicator
Check the "Include in Indicator" checkbox for each entity that should be included in setting the toolbar iconic button to indicate whether or not
attachments exist for a record.
Any entity with a display method of "Main Window" should have "Include in Indicator" checked so the user is not surprised by finding
attachments queried up by the Attachments window when the toolbar icon indicated that no attachments existed.
Depending on how you have implemented the attachments feature, checking "Include in Indicator" will cause a stored procedure to be executed
for each entity at the WHEN-NEW-RECORD-INSTANCE event point (that is, the stored procedure will be executed for each record as the user
scrolls through a group of queried records). You should avoid including loosely-related entities in the indicator. Segregating attachments in this
way helps performance by limiting the entities that must be checked for attachments in order to show the appropriate attachment toolbar icon
(with or without a paper in the paper clip).
Indicator in View
Check the "Indicator in View" check box if you have made some modification to the form or view to determine whether or not attachments exist
(that is, you are using a special implementation of the attachments feature). For a "standard" implementation of the attachments feature, you
would not check this check box, and checking "Include in Indicator" or "Indicator in View" would be mutually exclusive.
The developer may either have opted to include a function in their view definitions to resolve attachment existence or may have implemented
some other work around in the form code itself.
Privileges Tabbed Region
You can define privileges to allow or prevent query, insert, update, or delete of attachments to a specific entity for the block. You can also define
a conditional statement for privileges. For example, in the Oracle General Ledger journal entries form, you might allow query of attachments at
any time, but not allow insert, update, or delete of attachments if the journal has been posted.
Privileges can be defined with the values of:
Always
Never
When condition True
When condition False
Note that these settings depend on the settings of the Method field in the Block Declaration window. If the method is set to "Allow Change", then
you can further restrict the privileges for particular entities in this region. If the method is set to "Query Only", then you cannot use this region to
expand upon those query-only privileges (for example, to allow inserts for a particular entity).
For documents attached as a document reference or as a file type document, users may be able to update or delete the document externally to the
attachments system in spite of whether you allow updates to the attachments. For example, for an attachment of a document reference, a user may
be able to modify the document itself within the document management system that the document reference points to. Similarly, an Excel
spreadsheet could be modified within Excel and reloaded into the attachments system.
Field
If you base your privileges on a condition, enter the name of the field in the calling form that contains the value to be used in evaluating the
condition. Use the syntax block.field. You must include the block name.
Page 14
Operator
If you base your privileges on a condition, select the operator to be used for evaluating the condition.
Value 1
If you base your privileges on a condition, enter the value the condition field should be compared to. For most operators you will only enter a
value for the Value 1 field.
Value 2
Enter a second value only when using the BETWEEN operator.
Primary Key Fields Tabbed Region
The primary key fields are described here.
Key 1 - Key 5
Enter the names of the fields in the calling form from which the primary keys for the entity can be derived. Use the syntax block.field. You must
include the block name.
You must specify at least one primary key field for each entity (and for each block using the entity). Queries, inserts, updates, and deletes of
attachments all depend on the primary key fields in the calling form containing values by the time the user presses the toolbar attachments icon. If
the primary key values are not available when the button is pressed, the SQL statement built into the Attachments form may not include the
attachments the user expects, or may be broader than the user expects.
Enter the primary keys in the order in which you want the data to be stored in FND_ATTACHED_DOCUMENTS. Data from the Key 1 field will
be stored in the PK1_VALUE column, and so on. The PK1_VALUE through PK5_VALUE columns are defined as VARCHAR2(100) columns
to enable an index to be defined across all columns.
In order to display attachments to an entity when the toolbar button is pressed, the necessary identifying data will have to be available in the form
fields. For more information read the description of the "SQL Statement" attribute.
SQL Statement Tabbed Region
Use the SQL statement field to create "advanced" query criteria (restrictions) that you cannot get using the standard attachment entity attributes.
Warning: Using a SQL statement requires the use of dynamic SQL to perform the checks for attachments. While this is available in the
FND_ATTACHMENT_UTIL_PKG.get_atchmt_exists_sql function, this function cannot be used in the definition of a view. Therefore any use
of a SQL statement should be restricted to attachments to entities that will be displayed in the "related" attachments window and not included in
setting the attachment indicator.
Page 15
Payables window
Suppliers
N/A
Yes
Yes
N/A
Yes
Yes
N/A
Supplier Sites
N/A
Yes
Yes
N/A
Yes
Yes
N/A
Invoice
Yes
Yes
N/A
Yes
N/A
Yes
Yes
Invoice Overview
N/A
Yes
N/A
N/A
N/A
N/A
Yes
N/A
N/A
Yes
N/A
N/A
N/A
Match to Receipts
N/A
N/A
N/A
Yes
N/A
N/A
N/A
Payment Overview
N/A
Yes
N/A
N/A
N/A
N/A
N/A
Payments
N/A
Yes
N/A
N/A
N/A
N/A
N/A
Page 16
Enter the invoice or Query an existing invoice. Notice the paperclip at the top of the toolbar, this should be highlighted. Save your
work. Click on the paperclip.
Choose a category for your attachment. Categories can be added as part of your Payables configuration.
Enter a Title and Description, which is optional and Choose a Data Type from the LOV
Page 17
Page 18
Click OK.
Page 19
To choose a document that already exists in the Document Catalog, click on the Document Catalog button. Enter the Category, or description
and click Find.
Click Attach to attach the published document to your invoice or invoice batches.
Page 20
Page 21
If you choose to delete a attachment of Data type Long Text then the below caution message is displayed .
Page 22
And if you choose to delete a attachment of web page or file ,the below caution message is displayed.
Page 23
Page 24
Below steps shows a scenario of how a Attachment can be viewed by the invoice approver.
Page 25
Login as approver and goto the notification. Click on View Additional Invoice Details link.
Click on the Attachment List.
All attachments will be visible here.
Invoice approvers can update and delete attachments from the html invoice approval page.
E-Business Suite (EBS) does not have an EBS Administration option to prevent a named user(s) from updating and deleting attachments in
general or for a specific file format, such as HTML.
However, if you are an EBS Developer with access to the "Application Developer" responsibility, the attachment privileges of query, update,
insert, and delete can be controlled at the Form entity level.
Enter the PO details . Notice the paperclip at the top of the toolbar, this should be highlighted. Save your work. Click on the paperclip.
Choose the To Payables category for your attachment .In our case, we have created a attachment with data type Long Text and Saved.
Page 26
In the invoice workbench, Create a standard invoice .Enter all the header and line details
Click On Match and enter the Purchase Order Number, click on Find.
Match To Purchase Order Form will be opened and the attachment icon will show a paper clip holding a paper.
Navigation: iSupplier Portal > Finance > Create invoices > Create invoices without a PO
Page 27
On the Invoice page enter all the details and add the files needed. Only From Supplier Category will be available here.
The confirmation message appears stating that the document has been added but the documented will be committed only
when the invoice is saved.
Page 28
The invoice will now be created automatically. Note that the attachment paperclip is showing a paper holding.
Click on the attachment icon to view the files added via isupplier portal.
Page 29
Add the files and click in Apply. The below message will be shown as the attachment has been successfully added.
The files can be reviewed as below once all the attachments are uploaded.
Once the ER has been approved , you can submit the ER into Payables using the Expense Report Export concurrent program.
When the expense report is exported, there is an option to transfer the attachments to the invoice. All attachments can be seen on the invoice
(Invoice Header only). Enter the parameter Transfer Attachments as Yes while submitting the export program to view the attachments from the
invoice.
Page 30
After submitting the export program , an Expense Report Type invoice will be created. Note that the attachment paperclip is showing
a paper holding.
Click on the attachment icon to view the files added by employee while creating the expense report.
Page 31
Here after the attachment is transferred to AP,The primary key will be the invoice id and the entity will be AP_INVOICES. There is only a
reference created here the actual document is not copied so that there is no duplicate data. Essentially, there will be no additional records in
FND_LOBS and FND_DOCUMENTS but there is an additional entry in FND_ATTACHED_DOCUMENTS. This entry will still refer to the
document created when the attachment is added on the expense report.
Only STANDARD usage type is allowed for references of the kind described above, so the usage type on the document is changed to
STANDARD during export irrespective of what it is when added to the expense report. If the attachments are not transferred to the invoice during
the export, the usage type is not altered.
Expense Report Archive and Purge
Expense Report Archive and Purge program provides a switch to purge workflows and attachments. If set, the attachments on the expense reports
selected for purge will be deleted. Usage type 'One-Time' is only supported for deletion. Documents with other usage types are not deleted.
Attachments that are transferred to AP cannot be purged because of this restriction. Note, the usage type is changed to STANDARD if an
attachment has to be transferred to AP. The entry from FND_ATTACHED_DOCUMENTS will however be removed.
5.Technical Overview
FND uses 3 tables to store attachments and related information
1. FND_LOBS - Contains the actual attachment (Binary, Text etc)
2. FND_DOCUMENTS - Contains the information about the document associated with the file in FND_LOBS, this information includes Usage
Type, Publish Flag, Security Type etc. MEDIA_ID in FND_DOCUMENTS corresponds to FILE_ID in FND_LOBS.
3. FND_ATTACHED_DOCUMENTS - Contains information about the attachment, Primary Key, entity type etc. DOCUMENT_ID in this table
corresponds to DOCUMENT_ID in FND_DOCUMENTS.
When an attachment is added on a transaction, there will be an entry in all of the above tables for every attachment added. For example , incase of
expense reports Primary Key for the header attachments will be the report header id and the entity name will be
'OIE_HEADER_ATTACHMENTS', similarly for lines the primary key will be report line id and the primary key is
'OIE_LINE_ATTACHMENTS'.
To List the documents associated with a primary key
select * from FND_DOCUMENTS where DOCUMENT_ID in (select document_id from fnd_attached_documents where pk1_value
= ':1')
Replace :1 with the primary key.
6. Reference
This paper is intended to supplement the following reference materials, which should also be studied for a full understanding of the topic.
a) Oracle Applications Developer's Guide
b) Oracle Payables User Guide
7. Conclusion
The goal of this document is to help you learn and understand the Attachment feature in Payables application and use the same in day to day
transactions.
Page 32