Skip Headers

Oracle E-Business Suite Developer's Guide
Release 12.2
Part Number E22961-14
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

FNDSQF Routine APIs

Introduction to FNDSQF Routine APIs

This chapter provides you with specifications for calling several Oracle E-Business Suite APIs from your PL/SQL procedures. Most routines in the FNDSQF library are described in this section. Some FNDSQF routines are described in other chapters (for example, the FND_KEY_FLEX routines are described in the chapter called ”Flexfields”). The routines described in this chapter include:

FND_CURRENCY: Dynamic Currency APIs

This section describes Dynamic Currency APIs that you can use in your client- and server-side PL/SQL procedures. The Dynamic Currency feature allows different values in arbitrary currencies to be displayed in the same report or form, each shown with appropriate formatting.

FND_CURRENCY.GET_FORMAT_MASK (Client or Server)

Variable Description
Summary
function  FND_CURRENCY.GET_FORMAT_MASK(
				currency_code  IN varchar2 
				field_length   IN number)
return varchar2;
Description This function uses the normal default values to create a format mask.
Variable Description
currency_code The currency code for which you wish to retrieve a default format mask
field_length The maximum number of characters available to hold the formatted value

Tip: The varchar2 field that receives the format mask should be ten characters longer than the field_length.

This routine uses the following profiles to create the format mask:

Although the profile for negative format allows three different bracket styles, this routines only uses angle brackets (< >).

Currency Examples

Client-side PL/SQL Example

The ORDER_LINES.AMOUNT field in a form is to be displayed using Dynamic Currency formatting. The format mask is created and passed into the APP_ITEM_PROPERTY.SET_PROPERTY call:

APP_ITEM_PROPERTY.SET_PROPERTY('ORDER_LINE.AMOUNT', 
                  FORMAT_MASK, 
                  FND_CURRENCY.GET_FORMAT_MASK( 
                    :ORDER_CURRENCY_CODE,
                     GET_ITEM_PROPERTY(
                                  'ORDER_LINE.AMOUNT',
                                  MAX_LENGTH)));

The use of the display group separator, and positive and negative formatting are typically user preferences. Thus these settings are allowed to default from the User Profile system. The precision comes from the stored information for that order's currency code.

Server-side PL/SQL Example

Dynamic currency support is also accessible from server-side PL/SQL. The package interfaces are identical. An example implementation has the following calls:

DISPLAYABLE_VALUE := TO_CHAR(AMOUNT,  
					FND_CURRENCY.GET_FORMAT_MASK( 
     				  		DC_FORMAT_MASK, 30)); 

FND_DATE: Date Conversion APIs

The routines in the FND_DATE package are documented with the APP_DATE package.

See: APP_DATE: Date Conversion APIs

For a discussion of handling dates in your applications, see the chapter on dates. See: Handling Dates.

FND_GLOBAL: WHO Column Maintenance and Database Initialization

This section describes Global APIs you can use in your server-side PL/SQL procedures. The server-side package FND_GLOBAL returns the values of system globals, such as the login/signon or “session" type of values. You need to set Who columns for inserts and updates from stored procedures. Although you can use the FND_GLOBAL package for various purposes, setting Who columns is the package's primary use.

You should not use FND_GLOBAL routines in your forms (that is on the client side), as FND_GLOBAL routines are stored procedures in the database and would cause extra roundtrips to the database. On the client side, most of the procedures in the FND_GLOBAL package are replaced by a user profile option with the same (or a similar) name. You should use FND_PROFILE routines in your forms instead.

Tip: Do not use these routines over a database link. Database links or distributed transactions are not supported.

See: Tracking Data Changes with record History (WHO)

FND_PROFILE: User Profile APIs

FND_GLOBAL.USER_ID (Server)

Variable Description
Summary
function  FND_GLOBAL.USER_ID 
		return number; 
Description Returns the user ID.

FND_GLOBAL.APPS_INITIALIZE (Server)

Variable Description
Summary
procedure APPS_INITIALIZE(user_id in number,
		resp_id in number,
		resp_appl_id in number);  
Description This procedure sets up global variables and profile values in a database session. Call this procedure to initialize the global security context for a database session. You can use it for routines such as Java, PL/SQL, or other programs that are not integrated with either the Oracle E-Business Suite concurrent processing facility or Oracle Forms (both of which already do a similar initialization for a database session). The typical use for this routine would be as part of the logic for launching a separate non-Forms session (such as a Java program) from an established Oracle E-Business Suite form session. You can also use this procedure to set up a database session for manually testing application code using SQL*Plus. This routine should only be used when the session must be established outside of a normal form or concurrent program connection
You can obtain valid values to use with this procedure by using profile option routines to retrieve these values in an existing Oracle E-Business Suite form session. For manual testing purposes, you can use Examine during an Oracle E-Business Suite form session to retrieve the profile option values.
Variable Description
USER_ID The USER_ID number
RESP_ID The ID number of the responsibility
RESP_APPL_ID The ID number of the application to which the responsibility belongs

Example

 fnd_global.APPS_INITIALIZE (1010, 20417, 201); 

FND_GLOBAL.LOGIN_ID (Server)

Variable Description
Summary
function  FND_GLOBAL.LOGIN_ID
		return number; 
Description Returns the login ID (unique per signon).

FND_GLOBAL.CONC_LOGIN_ID (Server)

Variable Description
Summary
function  FND_GLOBAL.CONC_LOGIN_ID
	return number; 
Description Returns the concurrent program login ID.

FND_GLOBAL.PROG_APPL_ID (Server)

Variable Description
Summary
function  FND_GLOBAL.PROG_APPL_ID
	return number; 
Description Returns the concurrent program application ID.

FND_GLOBAL.CONC_PROGRAM_ID (Server)

Variable Description
Summary
function  FND_GLOBAL.CONC_PROGRAM_ID
	return number; 
Description Returns the concurrent program ID.

FND_GLOBAL.CONC_REQUEST_ID (Server)

Variable Description
Summary
function  FND_GLOBAL.CONC_REQUEST_ID
	return number; 
Description Returns the concurrent request ID.

FND_ORG: Organization APIs

Use this package to set the correct Organization in forms that use organizations.

FND_ORG.CHANGE_LOCAL_ORG

Variable Description
Summary
function  FND_ORG.CHANGE_LOCAL_ORG return boolean;
Description Use this function to change the organization of the current form. It returns FALSE if the change is cancelled or fails.

FND_ORG.CHANGE_GLOBAL_ORG

Variable Description
Summary
function  FND_ORG.CHANGE_GLOBAL_ORG return boolean;
Description Use this function to change the global organization defaults when opening a new form. It returns FALSE if the change is cancelled or fails.

FND_ORG.CHOOSE_ORG

Variable Description
Summary
procedure  FND_ORG.CHOOSE_ORG(
		allow_cancel   IN    boolean    default FALSE);
Description Call this procedure in PRE-FORM to ensure the organization parameters are set. If the local form has no organization parameters passed, the global defaults are used. If the global organization defaults are not set, the procedure opens the organization LOV to force an organization selection.
Variable Description
allow_cancel Allow cancelation of the LOV without forcing a choice. The default is FALSE.

FND_STANDARD: Standard APIs

This section describes utilities you can use to achieve standard functionality in your forms.

FND_STANDARD.FORM_INFO

Variable Description
Summary
procedure  FND_STANDARD.FORM_INFO(
		version                  IN varchar2,
		title                    IN  varchar2,
		application_short_name   IN varchar2,
		date_last_modified       IN varchar2,
		last_modified_by         IN varchar2);
Variable Description
Description FND_STANDARD.FORM_INFO provides information about the form. Call it as the first step in your WHEN-NEW-FORM-INSTANCE trigger. The TEMPLATE form provides you with a skeleton call that you must modify.

See: Special Triggers in the TEMPLATE form

FND_STANDARD.SET_WHO

Variable Description
Summary
procedure  FND_STANDARD.SET_WHO;
Description SET_WHO loads WHO fields with proper user information. Call in PRE-UPDATE, PRE-INSERT for each block with WHO fields. You do not need to call FND_GLOBAL if you use SET_WHO to populate your WHO fields.

See: Tracking Data Changes With Record History (WHO) and FND_GLOBAL:WHO Column Maintenance.

FND_STANDARD.SYSTEM_DATE

Variable Description
Summary
function  FND_STANDARD.SYSTEM_DATE return date;
Description This function behaves exactly like the built-in SYSDATE, only cached for efficiency. You should use it in your Oracle Forms PL/SQL code in place of the built-in SYSDATE.

FND_STANDARD.USER

Variable Description
Summary
function  FND_STANDARD.USER return varchar2;
Description This function behaves exactly like the built-in USER, only cached for efficiency. You should use it in your Oracle Forms PL/SQL code in place of the built-in USER.

FND_UTILITIES: Utility Routines

This section describes various utility routines.

FND_UTILITIES.OPEN_URL

Variable Description
Summary
procedure  OPEN_URL(URL in varchar2);
Variable Description
Description Invokes the Web browser on the client computer with the supplied URL document address. If a browser is already running, the existing browser is directed to open the supplied URL. You can use this utility to point a Web browser to a specific document from your forms.
This utility is not appropriate for opening Oracle Self-Service Web Applications functions from forms, however, as it does not provide session context information required for such functions. Use FND_FUNCTION.EXECUTE for opening those functions.
Variable Description
URL You can pass either an actual URL string or a :block.field reference of a field that contains a URL string.

Example 1

FND_UTILITIES.OPEN_URL('http://www.example.com/index.html');

Example 2

FND_UTILITIES.OPEN_URL(:blockname.fieldname);

FND_UTILITIES.PARAM_EXISTS

Variable Description
Summary
function  PARAM_EXISTS(name varchar2) return boolean;
Description Returns true if the parameter exists in the current form.
Variable Description
name The name of the parameter to search for.

Example

if fnd_utilities.param_exists('APP_TRACE_TRIGGER') then
	execute_trigger(name_in('PARAMETER.APP_TRACE_TRIGGER'));
end if;

APIs for Attachments

FND_DOCUMENTS_PKG APIs

These APIs are used by the Attachments feature.

FND_DOCUMENTS_PKG.INSERT_ROW

Variable Description
Summary
procedure Insert_Row(
  X_Rowid                  IN OUT NOCOPY VARCHAR2,
  X_document_id            IN OUT NOCOPY NUMBER,
  X_creation_date          DATE,
  X_created_by             NUMBER,
  X_last_update_date       DATE,
  X_last_updated_by        NUMBER,
  X_last_update_login      NUMBER DEFAULT NULL,
  X_datatype_id            NUMBER,
  X_category_id            NUMBER,
  X_security_type          NUMBER,
  X_security_id            NUMBER DEFAULT NULL,
  X_publish_flag           VARCHAR2,
  X_image_type             VARCHAR2 DEFAULT NULL,
  X_storage_type           NUMBER DEFAULT NULL,
  X_usage_type             VARCHAR2,
  X_start_date_active      DATE DEFAULT NULL,
  X_end_date_active        DATE DEFAULT NULL,
  X_request_id             NUMBER DEFAULT NULL,
  X_program_application_id NUMBER DEFAULT NULL,
  X_program_id             NUMBER DEFAULT NULL,
  X_program_update_date    DATE DEFAULT NULL,
  X_language               VARCHAR2,
  X_description            VARCHAR2 DEFAULT NULL,
  X_file_name              VARCHAR2 DEFAULT NULL,
  X_media_id               IN OUT NOCOPY NUMBER,
  X_Attribute_Category     VARCHAR2 DEFAULT NULL,
  X_Attribute1             VARCHAR2 DEFAULT NULL,
  X_Attribute2             VARCHAR2 DEFAULT NULL,
  X_Attribute3             VARCHAR2 DEFAULT NULL,
  X_Attribute4             VARCHAR2 DEFAULT NULL,
  X_Attribute5             VARCHAR2 DEFAULT NULL,
  X_Attribute6             VARCHAR2 DEFAULT NULL,
  X_Attribute7             VARCHAR2 DEFAULT NULL,
  X_Attribute8             VARCHAR2 DEFAULT NULL,
  X_Attribute9             VARCHAR2 DEFAULT NULL,
  X_Attribute10            VARCHAR2 DEFAULT NULL,
  X_Attribute11            VARCHAR2 DEFAULT NULL,
  X_Attribute12            VARCHAR2 DEFAULT NULL,
  X_Attribute13            VARCHAR2 DEFAULT NULL,
  X_Attribute14            VARCHAR2 DEFAULT NULL,
  X_Attribute15            VARCHAR2 DEFAULT NULL,
  X_create_doc             VARCHAR2 DEFAULT 'N',
  X_url                    VARCHAR2 DEFAULT NULL,
  X_title			          VARCHAR2 DEFAULT NULL,
  X_dm_node                NUMBER DEFAULT NULL,
  X_dm_folder_path         VARCHAR2 DEFAULT NULL,
  X_dm_type                VARCHAR2 DEFAULT NULL,
  X_dm_document_id         NUMBER DEFAULT NULL,
  X_dm_version_number      VARCHAR2 DEFAULT NULL,
  X_orig_doc_id            IN NUMBER DEFAULT NULL)
Description This API inserts an entry for a document into the FND_DOCUMENTS table, then calls the procedure below to insert a row into the "language" table with normalized language-specific columns.

FND_DOCUMENTS_PKG.INSERT_TL_ROW

Variable Description
Summary
procedure insert_tl_row(
   X_document_id            NUMBER,
   X_creation_date          DATE,
   X_created_by             NUMBER,
   X_last_update_date       DATE,
   X_last_updated_by        NUMBER,
   X_last_update_login      NUMBER DEFAULT NULL,
   X_language               VARCHAR2,
   X_description            VARCHAR2 DEFAULT NULL,
   X_request_id             NUMBER DEFAULT NULL,
   X_program_application_id NUMBER DEFAULT NULL,
   X_program_id             NUMBER DEFAULT NULL,
   X_program_update_date    DATE DEFAULT NULL,
   X_Attribute_Category     VARCHAR2 DEFAULT NULL,
   X_Attribute1             VARCHAR2 DEFAULT NULL,
   X_Attribute2             VARCHAR2 DEFAULT NULL,
   X_Attribute3             VARCHAR2 DEFAULT NULL,
   X_Attribute4             VARCHAR2 DEFAULT NULL,
   X_Attribute5             VARCHAR2 DEFAULT NULL,
   X_Attribute6             VARCHAR2 DEFAULT NULL,
   X_Attribute7             VARCHAR2 DEFAULT NULL,
   X_Attribute8             VARCHAR2 DEFAULT NULL,
   X_Attribute9             VARCHAR2 DEFAULT NULL,
   X_Attribute10            VARCHAR2 DEFAULT NULL,
   X_Attribute11            VARCHAR2 DEFAULT NULL,
   X_Attribute12            VARCHAR2 DEFAULT NULL,
   X_Attribute13            VARCHAR2 DEFAULT NULL,
   X_Attribute14            VARCHAR2 DEFAULT NULL,
   X_Attribute15            VARCHAR2 DEFAULT NULL,
   X_title				        VARCHAR2 DEFAULT NULL)
Description This table inserts a row into the "language" table FND_DOCUMENTS_TL with normalized language-specific columns.

FND_DOCUMENTS_PKG.LOCK_ROW

Variable Description
Summary
procedure Lock_Row(
  X_document_id        NUMBER,
  X_datatype_id        NUMBER,
  X_category_id        NUMBER,
  X_security_type      NUMBER,
  X_security_id        NUMBER DEFAULT NULL,
  X_publish_flag       VARCHAR2,
  X_image_type         VARCHAR2 DEFAULT NULL,
  X_storage_type       NUMBER DEFAULT NULL,
  X_usage_type         VARCHAR2,
  X_start_date_active  DATE DEFAULT NULL,
  X_end_date_active    DATE DEFAULT NULL,
  X_language           VARCHAR2,
  X_description        VARCHAR2 DEFAULT NULL,
  X_file_name          VARCHAR2 DEFAULT NULL,
  X_media_id           NUMBER,
  X_Attribute_Category VARCHAR2 DEFAULT NULL,
  X_Attribute1         VARCHAR2 DEFAULT NULL,
  X_Attribute2         VARCHAR2 DEFAULT NULL,
  X_Attribute3         VARCHAR2 DEFAULT NULL,
  X_Attribute4         VARCHAR2 DEFAULT NULL,
  X_Attribute5         VARCHAR2 DEFAULT NULL,
  X_Attribute6         VARCHAR2 DEFAULT NULL,
  X_Attribute7         VARCHAR2 DEFAULT NULL,
  X_Attribute8         VARCHAR2 DEFAULT NULL,
  X_Attribute9         VARCHAR2 DEFAULT NULL,
  X_Attribute10        VARCHAR2 DEFAULT NULL,
  X_Attribute11        VARCHAR2 DEFAULT NULL,
  X_Attribute12        VARCHAR2 DEFAULT NULL,
  X_Attribute13        VARCHAR2 DEFAULT NULL,
  X_Attribute14        VARCHAR2 DEFAULT NULL,
  X_Attribute15        VARCHAR2 DEFAULT NULL,
  X_url                VARCHAR2 DEFAULT NULL,
  X_title			      VARCHAR2 DEFAULT NULL)
Description This API locks a row in the FND_DOCUMENTS table.

FND_DOCUMENTS_PKG.LOCK_TL_ROW

Variable Description
Summary
procedure  Lock_tl_Row(
   X_document_id        NUMBER,
   X_language           VARCHAR2,
   X_description        VARCHAR2,
   X_Attribute_Category VARCHAR2 DEFAULT NULL,
   X_Attribute1         VARCHAR2 DEFAULT NULL,
   X_Attribute2         VARCHAR2 DEFAULT NULL,
   X_Attribute3         VARCHAR2 DEFAULT NULL,
   X_Attribute4         VARCHAR2 DEFAULT NULL,
   X_Attribute5         VARCHAR2 DEFAULT NULL,
   X_Attribute6         VARCHAR2 DEFAULT NULL,
   X_Attribute7         VARCHAR2 DEFAULT NULL,
   X_Attribute8         VARCHAR2 DEFAULT NULL,
   X_Attribute9         VARCHAR2 DEFAULT NULL,
   X_Attribute10        VARCHAR2 DEFAULT NULL,
   X_Attribute11        VARCHAR2 DEFAULT NULL,
   X_Attribute12        VARCHAR2 DEFAULT NULL,
   X_Attribute13        VARCHAR2 DEFAULT NULL,
   X_Attribute14        VARCHAR2 DEFAULT NULL,
   X_Attribute15        VARCHAR2 DEFAULT NULL,
   X_title              VARCHAR2 DEFAULT NULL)
Description This API locks a row in the FND_DOCUMENTS_TL table.

FND_DOCUMENTS_PKG.UPDATE_ROW

Variable Description
Summary
procedure Update_Row(
  X_document_id        NUMBER,
  X_last_update_date   DATE,
  X_last_updated_by    NUMBER,
  X_last_update_login  NUMBER,
  X_datatype_id        NUMBER,
  X_category_id        NUMBER,
  X_security_type      NUMBER,
  X_security_id        NUMBER,
  X_publish_flag       VARCHAR2,
  X_image_type         VARCHAR2,
  X_storage_type       NUMBER,
  X_usage_type         VARCHAR2,
  X_start_date_active  DATE,
  X_end_date_active    DATE,
  X_language           VARCHAR2,
  X_description        VARCHAR2,
  X_file_name          VARCHAR2,
  X_media_id           NUMBER,
  X_Attribute_Category VARCHAR2 DEFAULT NULL,
  X_Attribute1         VARCHAR2 DEFAULT NULL,
  X_Attribute2         VARCHAR2 DEFAULT NULL,
  X_Attribute3         VARCHAR2 DEFAULT NULL,
  X_Attribute4         VARCHAR2 DEFAULT NULL,
  X_Attribute5         VARCHAR2 DEFAULT NULL,
  X_Attribute7         VARCHAR2 DEFAULT NULL,
  X_Attribute8         VARCHAR2 DEFAULT NULL,
  X_Attribute9         VARCHAR2 DEFAULT NULL,
  X_Attribute10        VARCHAR2 DEFAULT NULL,
  X_Attribute11        VARCHAR2 DEFAULT NULL,
  X_Attribute12        VARCHAR2 DEFAULT NULL,
  X_Attribute13        VARCHAR2 DEFAULT NULL,
  X_Attribute14        VARCHAR2 DEFAULT NULL,
  X_Attribute15        VARCHAR2 DEFAULT NULL,
  X_url                VARCHAR2 DEFAULT NULL,
  X_title			      VARCHAR2 DEFAULT NULL,
  X_dm_node            NUMBER DEFAULT NULL,
  X_dm_folder_path     VARCHAR2 DEFAULT NULL,
  X_dm_type            VARCHAR2 DEFAULT NULL,
  X_dm_document_id     NUMBER DEFAULT NULL,
  X_dm_version_number  VARCHAR2 DEFAULT NULL)
Description This API updates a row in the FND_DOCUMENTS table.

FND_DOCUMENTS_PKG.UPDATE_TL_ROW

Variable Description
Summary
procedure Update_tl_Row(
  X_document_id        NUMBER,
  X_last_update_date   DATE,
  X_last_updated_by    NUMBER,
  X_last_update_login  NUMBER DEFAULT NULL,
  X_language           VARCHAR2,
  X_description        VARCHAR2 DEFAULT NULL,
  X_Attribute_Category VARCHAR2 DEFAULT NULL,
  X_Attribute1         VARCHAR2 DEFAULT NULL,
  X_Attribute2         VARCHAR2 DEFAULT NULL,
  X_Attribute3         VARCHAR2 DEFAULT NULL,
  X_Attribute4         VARCHAR2 DEFAULT NULL,
  X_Attribute5         VARCHAR2 DEFAULT NULL,
  X_Attribute6         VARCHAR2 DEFAULT NULL,
  X_Attribute7         VARCHAR2 DEFAULT NULL,
  X_Attribute8         VARCHAR2 DEFAULT NULL,
  X_Attribute9         VARCHAR2 DEFAULT NULL,
  X_Attribute10        VARCHAR2 DEFAULT NULL,
  X_Attribute11        VARCHAR2 DEFAULT NULL,
  X_Attribute12        VARCHAR2 DEFAULT NULL,
  X_Attribute13        VARCHAR2 DEFAULT NULL,
  X_Attribute14        VARCHAR2 DEFAULT NULL,
  X_Attribute15        VARCHAR2 DEFAULT NULL,
  X_title				   VARCHAR2 DEFAULT NULL)
Description This API updates a row in the FND_DOCUMENTS_TL table.

FND_DOCUMENTS_PKG.DELETE_ROW

Variable Description
Summary
procedure Delete_Row(
  x_document_id NUMBER, 
  x_datatype_id NUMBER, 
  delete_ref_flag VARCHAR2)
Description This procedure deletes a document entry from the document tables.

FND_DOCUMENTS_PKG.ADD_LANGUAGE

Variable Description
Summary
procedure ADD_LANGUAGE()
Description This procedure adds a language to the FND_DOCUMENTS_TL table.

FND_ATTACHED_DOCUMENTS_PKG APIs

FND_ATTACHED_DOCUMENTS_PKG.INSERT_ROW

Variable Description
Summary
procedure Insert_Row(
  X_Rowid                    IN OUT NOCOPY VARCHAR2,
  X_attached_document_id     IN OUT NOCOPY NUMBER,
  X_document_id              IN OUT NOCOPY NUMBER,
  X_creation_date            DATE,
  X_created_by               NUMBER,
  X_last_update_date         DATE,
  X_last_updated_by          NUMBER,
  X_last_update_login        NUMBER DEFAULT NULL,
  X_seq_num                  NUMBER,
  X_entity_name              VARCHAR2,
  X_column1                  VARCHAR2,
  X_pk1_value                VARCHAR2,
  X_pk2_value                VARCHAR2,
  X_pk3_value                VARCHAR2,
  X_pk4_value                VARCHAR2,
  X_pk5_value                VARCHAR2,
  X_automatically_added_flag VARCHAR2,
  X_request_id               NUMBER DEFAULT NULL,
  X_program_application_id   NUMBER DEFAULT NULL,
  X_program_id               NUMBER DEFAULT NULL,
  X_program_update_date      DATE DEFAULT NULL,
  X_Attribute_Category       VARCHAR2 DEFAULT NULL,
  X_Attribute1               VARCHAR2 DEFAULT NULL,
  X_Attribute2               VARCHAR2 DEFAULT NULL,
  X_Attribute3               VARCHAR2 DEFAULT NULL,
  X_Attribute4               VARCHAR2 DEFAULT NULL,
  X_Attribute5               VARCHAR2 DEFAULT NULL,
  X_Attribute6               VARCHAR2 DEFAULT NULL,
  X_Attribute7               VARCHAR2 DEFAULT NULL,
  X_Attribute8               VARCHAR2 DEFAULT NULL,
  X_Attribute9               VARCHAR2 DEFAULT NULL,
  X_Attribute10              VARCHAR2 DEFAULT NULL,
  X_Attribute11              VARCHAR2 DEFAULT NULL,
  X_Attribute12              VARCHAR2 DEFAULT NULL,
  X_Attribute13              VARCHAR2 DEFAULT NULL,
  X_Attribute14              VARCHAR2 DEFAULT NULL,
  X_Attribute15              VARCHAR2 DEFAULT NULL,
  X_datatype_id              NUMBER,
  X_category_id              NUMBER,
  X_security_type            NUMBER,
  X_security_id              NUMBER DEFAULT NULL,
  X_publish_flag             VARCHAR2,
  X_image_type               VARCHAR2 DEFAULT NULL,
  X_storage_type             NUMBER DEFAULT NULL,
  X_usage_type               VARCHAR2,
  X_language                 VARCHAR2,
  X_description              VARCHAR2 DEFAULT NULL,
  X_file_name                VARCHAR2 DEFAULT NULL,
  X_media_id                 IN OUT NOCOPY NUMBER,
  X_doc_attribute_Category   VARCHAR2,
  X_doc_attribute1           VARCHAR2,
  X_doc_attribute2           VARCHAR2,
  X_doc_attribute3           VARCHAR2,
  X_doc_attribute4           VARCHAR2,
  X_doc_attribute5           VARCHAR2,
  X_doc_attribute6           VARCHAR2,
  X_doc_attribute7           VARCHAR2,
  X_doc_attribute8           VARCHAR2,
  X_doc_attribute9           VARCHAR2,
  X_doc_attribute10          VARCHAR2,
  X_doc_attribute11          VARCHAR2,
  X_doc_attribute12          VARCHAR2,
  X_doc_attribute13          VARCHAR2,
  X_doc_attribute14          VARCHAR2,
  X_doc_attribute15          VARCHAR2,
  X_create_doc               VARCHAR2 DEFAULT 'N',
  X_url                      VARCHAR2 DEFAULT NULL,
  X_title                    VARCHAR2 DEFAULT NULL,
  X_dm_node                  NUMBER DEFAULT NULL,
  X_dm_folder_path           VARCHAR2 DEFAULT NULL,
  X_dm_type                  VARCHAR2 DEFAULT NULL,
  X_dm_document_id           NUMBER DEFAULT NULL,
  X_dm_version_number        VARCHAR2 DEFAULT NULL,
  X_orig_doc_id              NUMBER DEFAULT NULL,
  X_orig_attach_doc_id       NUMBER DEFAULT NULL)
Description Creates document entry.

FND_ATTACHED_DOCUMENTS_PKG.LOCK_ROW

Variable Description
Summary
procedure Lock_Row(
  X_Rowid                    VARCHAR2,
  X_attached_document_id     NUMBER,
  X_document_id              NUMBER,
  X_seq_num                  NUMBER,
  X_entity_name              VARCHAR2,
  X_column1                  VARCHAR2,
  X_pk1_value                VARCHAR2,
  X_pk2_value                VARCHAR2,
  X_pk3_value                VARCHAR2,
  X_pk4_value                VARCHAR2,
  X_pk5_value                VARCHAR2,
  X_automatically_added_flag VARCHAR2,
  X_Attribute_Category       VARCHAR2 DEFAULT NULL,
  X_Attribute1               VARCHAR2 DEFAULT NULL,
  X_Attribute2               VARCHAR2 DEFAULT NULL,
  X_Attribute3               VARCHAR2 DEFAULT NULL,
  X_Attribute4               VARCHAR2 DEFAULT NULL,
  X_Attribute5               VARCHAR2 DEFAULT NULL,
  X_Attribute6               VARCHAR2 DEFAULT NULL,
  X_Attribute7               VARCHAR2 DEFAULT NULL,
  X_Attribute8               VARCHAR2 DEFAULT NULL,
  X_Attribute9               VARCHAR2 DEFAULT NULL,
  X_Attribute10              VARCHAR2 DEFAULT NULL,
  X_Attribute11              VARCHAR2 DEFAULT NULL,
  X_Attribute12              VARCHAR2 DEFAULT NULL,
  X_Attribute13              VARCHAR2 DEFAULT NULL,
  X_Attribute14              VARCHAR2 DEFAULT NULL,
  X_Attribute15              VARCHAR2 DEFAULT NULL,
  X_datatype_id              NUMBER,
  X_category_id              NUMBER,
  X_security_type            NUMBER,
  X_security_id              NUMBER DEFAULT NULL,
  X_publish_flag             VARCHAR2,
  X_image_type               VARCHAR2 DEFAULT NULL,
  X_storage_type             NUMBER DEFAULT NULL,
  X_usage_type               VARCHAR2,
  X_start_date_Active        DATE,
  X_end_date_Active          DATE,
  X_language                 VARCHAR2,
  X_description              VARCHAR2 DEFAULT NULL,
  X_file_name                VARCHAR2 DEFAULT NULL,
  X_media_id                 IN OUT NOCOPY NUMBER,
  X_doc_attribute_category   VARCHAR2 DEFAULT NULL,
  X_doc_attribute1           VARCHAR2 DEFAULT NULL,
  X_doc_attribute2           VARCHAR2 DEFAULT NULL,
  X_doc_attribute3           VARCHAR2 DEFAULT NULL,
  X_doc_attribute4           VARCHAR2 DEFAULT NULL,
  X_doc_attribute5           VARCHAR2 DEFAULT NULL,
  X_doc_attribute6           VARCHAR2 DEFAULT NULL,
  X_doc_attribute7           VARCHAR2 DEFAULT NULL,
  X_doc_attribute8           VARCHAR2 DEFAULT NULL,
  X_doc_attribute9           VARCHAR2 DEFAULT NULL,
  X_doc_attribute10          VARCHAR2 DEFAULT NULL,
  X_doc_attribute11          VARCHAR2 DEFAULT NULL,
  X_doc_attribute12          VARCHAR2 DEFAULT NULL,
  X_doc_attribute13          VARCHAR2 DEFAULT NULL,
  X_doc_attribute14          VARCHAR2 DEFAULT NULL,
  X_doc_attribute15          VARCHAR2 DEFAULT NULL,
  X_url                      VARCHAR2 DEFAULT NULL,
  X_title                    VARCHAR2 DEFAULT NULL)
Description Locks document entry.

FND_ATTACHED_DOCUMENTS_PKG.UPDATE_ROW

Variable Description
Summary
procedure Update_Row(
  X_Rowid                    VARCHAR2,
  X_attached_document_id     NUMBER,
  X_document_id              NUMBER,
  X_last_update_date         DATE,
  X_last_updated_by          NUMBER,
  X_last_update_login        NUMBER DEFAULT NULL,
  X_seq_num                  NUMBER,
  X_entity_name              VARCHAR2,
  X_column1                  VARCHAR2,
  X_pk1_value                VARCHAR2,
  X_pk2_value                VARCHAR2,
  X_pk3_value                VARCHAR2,
  X_pk4_value                VARCHAR2,
  X_pk5_value                VARCHAR2,
  X_automatically_added_flag VARCHAR2,
  X_request_id               NUMBER DEFAULT NULL,
  X_program_application_id   NUMBER DEFAULT NULL,
  X_program_id               NUMBER DEFAULT NULL,
  X_program_update_date      DATE DEFAULT NULL,
  X_Attribute_Category       VARCHAR2 DEFAULT NULL,
  X_Attribute1               VARCHAR2 DEFAULT NULL,
  X_Attribute2               VARCHAR2 DEFAULT NULL,
  X_Attribute3               VARCHAR2 DEFAULT NULL,
  X_Attribute4               VARCHAR2 DEFAULT NULL,
  X_Attribute5               VARCHAR2 DEFAULT NULL,
  X_Attribute6               VARCHAR2 DEFAULT NULL,
  X_Attribute7               VARCHAR2 DEFAULT NULL,
  X_Attribute8               VARCHAR2 DEFAULT NULL,
  X_Attribute9               VARCHAR2 DEFAULT NULL,
  X_Attribute10              VARCHAR2 DEFAULT NULL,
  X_Attribute11              VARCHAR2 DEFAULT NULL,
  X_Attribute12              VARCHAR2 DEFAULT NULL,
  X_Attribute13              VARCHAR2 DEFAULT NULL,
  X_Attribute14              VARCHAR2 DEFAULT NULL,
  X_Attribute15              VARCHAR2 DEFAULT NULL,
  X_datatype_id              NUMBER,
  X_category_id              NUMBER,
  X_security_type            NUMBER,
  X_security_id              NUMBER DEFAULT NULL,
  X_publish_flag             VARCHAR2,
  X_image_type               VARCHAR2 DEFAULT NULL,
  X_storage_type             NUMBER DEFAULT NULL,
  X_usage_type               VARCHAR2,
  X_start_date_active        DATE,
  X_end_date_active          DATE,
  X_language                 VARCHAR2,
  X_description              VARCHAR2 DEFAULT NULL,
  X_file_name                VARCHAR2 DEFAULT NULL,
  X_media_id                 IN OUT NOCOPY NUMBER,
  X_doc_attribute_category   VARCHAR2 DEFAULT NULL,
  X_doc_attribute1           VARCHAR2 DEFAULT NULL,
  X_doc_attribute2           VARCHAR2 DEFAULT NULL,
  X_doc_attribute3           VARCHAR2 DEFAULT NULL,
  X_doc_attribute4           VARCHAR2 DEFAULT NULL,
  X_doc_attribute5           VARCHAR2 DEFAULT NULL,
  X_doc_attribute6           VARCHAR2 DEFAULT NULL,
  X_doc_attribute7           VARCHAR2 DEFAULT NULL,
  X_doc_attribute8           VARCHAR2 DEFAULT NULL,
  X_doc_attribute9           VARCHAR2 DEFAULT NULL,
  X_doc_attribute10          VARCHAR2 DEFAULT NULL, 
  X_doc_attribute11          VARCHAR2 DEFAULT NULL,
  X_doc_attribute12          VARCHAR2 DEFAULT NULL,
  X_doc_attribute13          VARCHAR2 DEFAULT NULL,
  X_doc_attribute14          VARCHAR2 DEFAULT NULL,
  X_doc_attribute15          VARCHAR2 DEFAULT NULL,
  X_url                      VARCHAR2 DEFAULT NULL,
  X_title			            VARCHAR2 DEFAULT NULL,
  X_dm_node                  NUMBER DEFAULT NULL,
  X_dm_folder_path           VARCHAR2 DEFAULT NULL,
  X_dm_type                  VARCHAR2 DEFAULT NULL,
  X_dm_document_id           NUMBER DEFAULT NULL,
  X_dm_version_number        VARCHAR2 DEFAULT NULL)
Description Updates the document entry.

FND_ATTACHED_DOCUMENTS2_PKG APIs

FND_ATTACHED_DOCUMENTS2_PKG.DELETE_ATTACHMENTS

Variable Description
Summary
procedure delete_attachments(
  X_entity_name IN VARCHAR2,
  X_pk1_value IN VARCHAR2,
  X_pk2_value IN VARCHAR2 DEFAULT NULL,
  X_pk3_value IN VARCHAR2 DEFAULT NULL,
  X_pk4_value IN VARCHAR2 DEFAULT NULL,
  X_pk5_value IN VARCHAR2 DEFAULT NULL,
  X_delete_document_flag IN VARCHAR2,
  X_automatically_added_flag IN VARCHAR2 DEFAULT NULL)
Description This API is used to delete attachments for a given entity

FND_ATTACHED_DOCUMENTS2_PKG.COPY_ATTACHMENTS

Variable Description
Summary
procedure copy_attachments(
  X_from_entity_name IN VARCHAR2,
  X_from_pk1_value IN VARCHAR2,
  X_from_pk2_value IN VARCHAR2 DEFAULT NULL,
  X_from_pk3_value IN VARCHAR2 DEFAULT NULL,
  X_from_pk4_value IN VARCHAR2 DEFAULT NULL,
  X_from_pk5_value IN VARCHAR2 DEFAULT NULL,
  X_to_entity_name IN VARCHAR2,
  X_to_pk1_value IN VARCHAR2,
  X_to_pk2_value IN VARCHAR2 DEFAULT NULL,
  X_to_pk3_value IN VARCHAR2 DEFAULT NULL,
  X_to_pk4_value IN VARCHAR2 DEFAULT NULL,
  X_to_pk5_value IN VARCHAR2 DEFAULT NULL,
  X_created_by IN NUMBER DEFAULT NULL,
  X_last_update_login IN NUMBER DEFAULT NULL,
  X_program_application_id IN NUMBER DEFAULT NULL,
  X_program_id IN NUMBER DEFAULT NULL,
  X_request_id IN NUMBER DEFAULT NULL,
  X_automatically_added_flag IN VARCHAR2 DEFAULT NULL,
  X_from_category_id IN NUMBER DEFAULT NULL,
  X_to_category_id IN NUMBER DEFAULT NULL)
Description This API is used to copy attachments from one record to another.