Skip Headers

Oracle Assets User Guide
Release 12.1
Part Number E13586-04
Go to Table of Contents
Go to previous page
Go to next page

Oracle Assets Reclass API

This appendix covers the following topics:


You can use this API if you have a custom interface that makes it difficult to use with the existing interfaces in Oracle Assets. The Reclass API uses the FA_RECLASS_PUB.DO_RECLASS() procedure. You can use this API if you have a custom interface that makes it difficult to use with the existing interfaces in Oracle Assets.

Oracle Assets also allows you to reclassify assets using any of the following methods:

Major Features

The Reclass API provides the following functionality:

Tax Book

The Reclass API automatically reclassifies assets in all the tax books that are associated with the corporate book where the reclassification originated.

Alternate Ledger Currency

If you have set up alternate ledger currency , when you add or modify assets using an Oracle Assets API, the API copies the transactions to the reporting currencies automatically. Invoice rounding issues are avoided by using the API to drive the alternate ledger currency accounting for both the ledger and reporting currencies.

Related Topics

Reclass API Description

Sample Script: Using the Reclass API

Reclass API Description

The Reclass API procedure is called: FA_RECLASS_PUB.DO_RECLASS(). The following table provides the arguments, types, value, and descriptions of the elements of the FA_RECLASS_PUB.DO_RECLASS() procedure.

Each argument has a prefix of P, X, or PX. These prefixes mean the following:

Argument Type Value Description
P_API_VERSION NUMBER Internal use only Version of the API in use.
P_INIT_MSG_LIST VARCHAR2(1) FND_API.G_TRUE - Initialize the message stack.
FND_API.G_FALSE - Do not initialize the message stack (Default).
Determines whether the messages stack should be initialized and cleared.
P_COMMIT VARCHAR2(1) FND_API.G_TRUE - Commit automatically.
FND_API.G_FALSE - Do not commit automatically (Default)
Commits the transaction.
P_VALIDATION_LEVEL NUMBER FND_API.G_VALID_ LEVEL_NONE - Low level validation for a transaction.
FND_API.G_VALID_ LEVEL_FULL - High level validation for a transaction (Default).
Asset validation by the API.
P_CALLING_FN VARCHAR2(30)   Function calling the API
FND_API.G_RET_STS_ ERROR - Indicates a failed transaction.
FND_API.G_RET_STS_ UNEXP_ERROR - Indicates an unexpected error.
Determines the API success.
X_MSG_COUNT NUMBER   Number of messages on the message stack.
X_MSG_DATA VARCHAR2(1024)   Message stack.
PX_TRANS_REC FA_API_TYPES. TRANS_REC_TYPE   Describes the transaction taking place.
PX_ASSET_HDR_REC FA_API_TYPES. ASSET_HDR_ REC_TYPE   Unique identifiers for the assets.
PX_ASSET_CAT_ REC_NEW FA_API_TYPES. ASSET_CAT_REC_ TYPE   Category information of the asset.

TRANS_REC_TYPE Transaction Structure

The TRANS_REC_TYPE transaction structure contains information about the transaction, such as the transaction header ID and the transaction type code. The following table shows type and value information for each argument.

Argument Required / Optional Type Value
TRANSACTION_HEADER_ ID Internal use only NUMBER(15) Optional OUT parameter
TRANSACTION_DATE_ ENTERED Optional DATE Must be the same as the date placed in service, which it defaults to.
TRANSACTION_SUBTYPE Optional   VARCHAR2(9) The values are AMORTIZED or EXPENSED. If null, the value is EXPENSED. If the amortization_start_date is provided, the value is AMORTIZED.
AMORTIZATION_START_ DATE Optional DATE Defaulted to current open period.
WHO_INFO Required STANDARD_ WHO_REC_ TYPE Standard Who column

ASSET_HDR_REC_TYPE Asset Structure

The ASSET_HDR_REC_TYPE asset structure contains unique identification information for a given asset, such as the asset ID and book type code. The following table shows type and value information for each argument.

Argument Required / Optional Type Value
ASSET_ID Required NUMBER(15) Asset identification number.
BOOK_TYPE_CODE Optional VARCHAR2(15) Defaults to the corporate book the asset is attached to.


The ASSET_CAT_REC_NEW_TYPE asset structure contains information about the asset category, such as the category ID and the category descriptive flexfield. The following table shows type and value information for each argument.

Argument Required / Optional Type Value
CATEGORY_ID Required NUMBER(15) The category ID the asset is reclassed to.
CATEGORY_DESC_FLEX Optional DESC_FLEX_ REC_TYPE Category descriptive flexfield segments.

RECLASS_OPTIONS_REC_TYPE Reclassification Structure

The RECLASS_OPTIONS_REC_TYPE reclassification structure contains reclass options that may be changed during a reclass transaction for a given asset. The following table shows type and value information for each argument.

Argument Required / Optional Type Value
REDEFAULT_FLAG Optional VARCHAR2(3) Indicates the depreciation rules of the new category must be inherited. (YES/NO)
COPY_CAT_DESC_FLAG Optional VARCHAR2(3) Indicates whether the category descriptive flexfield information must be copied to the new category for the asset. (YES/NO)

Sample Script: Using the Reclass API

The following is a test script that shows how to call the FA_RECLASS_PUB.do_reclass. It spools the output to a file called reclass.lst in the directory it is run from.

set serveroutput on;


   l_trans_rec                FA_API_TYPES.trans_rec_type;
   l_asset_hdr_rec            FA_API_TYPES.asset_hdr_rec_type;
   l_asset_cat_rec_new        FA_API_TYPES.asset_cat_rec_type;
   l_recl_opt_rec             FA_API_TYPES.reclass_options_rec_type;

   l_return_status            VARCHAR2(1);
   l_mesg_count               number;
   l_mesg                     varchar2(512);




   l_asset_hdr_rec.asset_id          := &asset_id
   l_asset_cat_rec_new.category_id   := &new_category_id
   l_recl_opt_rec.copy_cat_desc_flag := UPPER(substr('&copy_category_desc_YES_NO',1,3));
   l_recl_opt_rec.redefault_flag     := UPPER(substr('&redefault_deprn_rules_YES_NO',1,3));
   FA_RECLASS_PUB.do_reclass (
           -- std parameters
           p_api_version         => 1.0,
           p_init_msg_list       => FND_API.G_FALSE,
           p_commit              => FND_API.G_FALSE,
           p_validation_level    => FND_API.G_VALID_LEVEL_FULL,
           p_calling_fn          => NULL,
           x_return_status       => l_return_status,
           x_msg_count           => l_mesg_count,
           x_msg_data            => l_mesg,
           -- api parameters
           px_trans_rec          => l_trans_rec,
           px_asset_hdr_rec      => l_asset_hdr_rec,
           px_asset_cat_rec_new  => l_asset_cat_rec_new,
           p_recl_opt_rec        => l_recl_opt_rec );

   --dump messages
   l_mesg_count := fnd_msg_pub.count_msg;

   if l_mesg_count > 0 then

      l_mesg := chr(10) || substr(fnd_msg_pub.get
                                    (fnd_msg_pub.G_FIRST, fnd_api.G_FALSE),
                                     1, 250);

      for i in 1..(l_mesg_count - 1) loop
         l_mesg :=
                             fnd_api.G_FALSE), 1, 250);

      end loop;


   end if;

   if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
      dbms_output.put_line('THID' || to_char(l_trans_rec.transaction_header_id));
   end if;