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 Adjustments API uses the FA_ADJUSTMENT_PUB.DO_ADJUSTMENT procedure. Use this API if you have a custom interface that makes it difficult to use with the existing Oracle Assets interfaces for adjusting assets.
The Adjustments API allows you to automatically adjust the asset to the corporate book, as well as to the dependent tax books.
Oracle Assets also allows you to adjust assets using the following methods: You can adjust assets using the Asset Workbench (using the Source Lines and Books windows), Mass Additions, Mass Change, Mass Copy, and Tax Upload Interface user interfaces.
Mass Additions: Use the Mass Additions process to make cost adjustments to existing assets.
Mass Change: Use the Mass Change process to change financial information for existing assets.
Mass Copy: Use the Mass Copy process to add existing assets to tax books.
Cost Adjustments: Use the Future Transaction Interface to adjust cost and financial information.
Tax Upload Interface: Use the Tax Upload Interface process to change asset information in the tax books.
Asset Workbench: Use the Asset Workbench to make changes to individual assets.
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 primary and reporting currencies.
If you have checked the Allow CIP Assets check box on the Book Controls window of a tax book, when you add CIP assets using the Additions API, the API automatically adds those CIP assets to that tax book at the same time that they are added to the corporate book.
You must pass special values in order to null the values of BONUS_RULE, CEILING_NAME, or GROUP_ASSET_ID. If you pass a NULL value directly for these values, the API will automatically default to the value setup for the category. The following table shows the value that must be passed for the field value to be NULL.
Field | Value to Pass for NULL Field |
---|---|
BONUS_RULE | FND_API.G_MISS_CHAR |
CEILING_NAME | FND_API.G_MISS_CHAR |
GROUP_ASSET_ID | FND_API.G_MISS_NUM |
Related Topics
Sample Script: Using the Adjustment API without Invoice Information
Sample Script: Using the Adjustment API with Invoice Information
You call the FA_ADJUSTMENT_PUB.DO_ADJUSTMENT () API to perform adjustment transactions. The following table provides the arguments, types, value, and descriptions of the elements in the FA_ADJUSTMENT_PUB.DO_ADJUSTMENT procedure.
Each argument has a prefix of P, X, or PX. These prefixes mean the following:
P - indicates an In argument
X - indicates an Out argument
PX - indicates an argument that is both In and Out
Argument | Type | Value | Description |
---|---|---|---|
P_API_VERSION | NUMBER | Internal use only | Version of the API in use. |
P_INIT_MSG_LIST | VARCHAR2 | 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 | 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 | Function that calls the API | |
X_RETURN_STATUS | VARCHAR2 | FND_API. G_RET_STS_SUCCESS - Transaction is successful. FND_API.G_RET_STS_ ERROR - Transaction fails. |
Determines the API success. |
X_MSG_COUNT | NUMBER | Number of messages on the message stack. | |
X_MSG_DATA | FA_API_TYPES. MSG_REC_TYPE | Message stack. | |
PX_TRANS_REC | FA_API_TYPES. TRANS_REC_TYPE | Transaction description. | |
PX_ASSET_HDR_REC | FA_API_TYPES. ASSET_HDR_REC_TYPE | Unique identifiers for the assets. | |
P_ASSET_FIN_REC_ADJ | FA_API_TYPES. ASSET_FIN_REC_ TYPE | Financial change information of the asset (delta). | |
X_ASSET_FIN_REC_NEW | FA_API_TYPES. ASSET_FIN_REC_ TYPE | New financial information for the asset. | |
X_ASSET_FIN_MRC_TBL_NEW | FA_API_TYPES. ASSET_FIN_TBL | Table of new financial information for the asset. | |
PX_INV_TRANS_REC | FA_API_TYPES.INV_TRANS_REC_TYPE | Describes the invoice transaction, if applicable. | |
PX_INV_REC | FA_API_TYPES.INV_TBL | Invoices table controlling the transaction (delta). | |
P_ASSET_DEPRN_REC_ ADJ | FA_API_TYPES. ASSET_DEPRN_ REC_TYPE | Depreciation change information for the asset (delta). | |
PX_ASSET_DEPRN_REC_NEW | FA_API_TYPES. ASSET_DEPRN_ REC_TYPE | New depreciation information for the asset. | |
PX_ASSET_DEPRN_MRC_TBL_NEW | FA_API_TYPES. ASSET_DEPRN_TBL | New financial information table for the asset. | |
P_GROUP_RECLASS_ OPTIONS_REC | FA_API_ TYPES.GROUP_ RECLASS_ OPTIONS_REC_ TYPE | Information for changing the group members assignments in and out of a group asset. |
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_DATE_ENTERED | Optional | DATE | Previous or current date. Defaults to the end date or AMORTIZATION_START_DATE when AMORTIZATION START_DATE is specified. You can populate either value, but AMORTIZATION_START_DATE takes precedence. |
SOURCE_TRANSACTION_ HEADER_ID | Optional | NUMBER(15) | Defaults to source THID when using autocopy or CIP-IN-TAX. |
MASS_REFERENCE_ID | Optional | NUMBER(15) | Defaults to CONC_REQUEST_ID. |
TRANSACTION_SUBTYPE | Optional | VARCHAR2(9) | AMORTIZED or EXPENSED. Defaults to EXPENSED. |
AMORTIZATION_START_ DATE | Optional | DATE | Previous or current date. Defaults to TRANSACTION_ DATE_ENTERED when amortized adjustment is specified. You can populate either value, but AMORTIZATION_START_DATE takes precedence. |
TRANSACTION_NAME | Optional | VARCHAR2(20) | Description of the transaction. This field is Comments field in the Asset Workbench. |
CALLING_INTERFACE | Optional | VARCHAR2(30) | Interface that calls the API. This field defaults to CUSTOM. |
DESC_FLEX | Optional | DESC_FLEX_ REC | Descriptive flexfield segments. |
WHO_INFO | Optional | STANDARD_ WHO_REC | Standard Who columns. |
The ASSET_HDR_REC_TYPE asset structure contains unique identification information for ann 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 | Required | VARCHAR2(15) | Book name. |
The ASSET_FIN_REC_TYPE asset structure contains financial information for a given asset. The following table shows type and value information for each argument.
Argument | Required / Optional | Type | Value |
---|---|---|---|
DATE_PLACED_IN_SERVICE | Optional | DATE | Date the asset is placed in service. |
DEPRN_METHOD_CODE | Optional | VARCHAR2(12) | The name of the depreciation method. Defaults as per asset category values. |
LIFE_IN_MONTHS | Optional | NUMBER(4) | Life of the asset in total months. Defaults as per asset category values. |
COST | Optional (if no invoices were populated) | NUMBER | Current cost of the asset. |
ORIGINAL_COST | Optional | NUMBER | Original cost of the asset. Defaults to cost. |
SALVAGE_VALUE | Optional | NUMBER | Asset salvage value. Defaults as per asset category values. |
PRORATE_CONVENTION_CODE | Optional | VARCHAR2(10) | Depreciation prorate convention. Defaults as per asset category values. |
DEPRECIATE_FLAG | Optional | VARCHAR2(3) | Indicates whether the asset is depreciating. YES - Asset is depreciating NO - Asset is not depreciating |
ITC_AMOUNT_ID | Optional | NUMBER(15) | Identifies the ITC rate. |
BASIC_RATE | Optional | NUMBER | Defaults as per asset category values. |
ADJUSTED_RATE | Optional | NUMBER | Defaults as per asset category values. |
BONUS_RULE | Optional | NUMBER | Bonus rule for an asset. Defaults as per asset category values. If a default value is defined, and you want the value to be NULL, you must pass FND_API.G_MISS_CHAR to the Addition API. |
CEILING_NAME | Optional | VARCHAR2(30) | Identifies a deprecation ceiling to be used in calculating deprecation. Defaults as per asset category values. If a default value is defined, and you want the value to be NULL, you must pass FND_API.G_MISS_CHAR to the Addition API. |
PRODUCTION_CAPACITY | Optional | NUMBER | Capacity of a units of production asset. Defaults as per asset category values. |
UNIT_OF_MEASURE | Optional | VARCHAR2(25) | Unit of measure of a units of production asset. Defaults as per asset category values. |
REVAL_CEILING | Optional | NUMBER | Upper limit for revaluing asset cost. |
UNREVALUED_COST | Optional | NUMBER | Cost without regard to any revaluation. |
SHORT_FISCAL_YEAR_ FLAG | Optional | VARCHAR2(3) | YES - Asset is in a short fiscal year. NO - Asset is not in a short fiscal year. |
CONVERSION_DATE | Optional | DATE | Date short tax year asset added to the acquiring company. |
ORIG_DEPRN_START_DATE | Optional | DATE | Date short tax year asset begin depreciating in the acquired company's books. |
GROUP_ASSET_ID | Optional | NUMBER(15) | Group asset identification number. (CRL Asset). If a default value is defined, and you want the value to be NULL, you must pass FND_API.G_MISS_NUM to the Addition API. |
GLOBAL_ATTRIBUTE1-20 | Optional | VARCHAR2(150) | Reserved for country specific functionality. |
GLOBAL_ATTRIBUTE_ CATEGORY | Optional | VARCHAR2(30) | Reserved for country specific functionality. |
DISABLED_FLAG | Optional | VARCHAR2(1) | Indicates whether the group asset is disabled. Y - Group asset is disabled. N - Group asset is enabled. Defaults to N. |
SALVAGE_TYPE | Optional | VARCHAR2(30) | Indicates the way to determine salvage value. AMT - Manually enter the salvage value manually (Not available for group asset). PCT - PERCENT_SALVAGE_VALUE field determines the Salvage value. SUM - Salvage value is determined by sum of member asset's salvage value amount (available only for group asset). Defaults to PCT for group assets. |
DEPRN_LIMIT_TYPE | Optional | VARCHAR2(30) | Indicates how depreciation limit is determined . AMT - Manually enter the depreciation limit amount manually (Not available for group asset). PCT - ALLOWED_DEPRN_LIMIT field determines the depreciation limit amount. SUM - Depreciation limit amount is determined using sum of member asset's depreciation limit amount (available only for group asset). NONE - Depreciation limit is not used. Defaults to PCT for group assets. |
OVER_DEPRECIATE_OPTION | Optional | VARCHAR2(30) | Indicates whether group asset should stop depreciating beyond its depreciation limit (recoverable cost if there is no depreciation limit defined). NO - Stop depreciating when the depreciation reserve reaches its depreciation limit. YES - Stop depreciating if depreciation reserve reaches its depreciation limit because of an increase in depreciation expense. DEPRN - Group asset will not stop depreciating. Defaults to NO. |
SUPER_GROUP_ID | Optional | NUMBER | Super group rule identification number. |
REDUCTION_RATE | Optional | NUMBER | Relevant for depreciable basis rule that is assigned to a depreciation method which uses reduction rate. |
REDUCE_ADDITION_FLAG | Optional | VARCHAR2(1) | Indicates whether reduction rate should be applied for member asset additions. This value is relevant for group assets only. Y - Reduction rate is used for member asset additions. N - Reduction rate is not used for member asset additions. Defaults to N. |
REDUCE_ADJUSTMENT_FLAG | Optional | VARCHAR2(1) | Indicates whether reduction rate should be applied for member asset adjustments. This value is relevant for group assets only. Y - Reduction rate is used for member asset adjustments. N - Reduction rate is not used for member asset adjustments. Defaults to N. |
REDUCE_RETIREMENT_FLAG | Optional | VARCHAR2(1) | Indicates whether reduction rate should be applied for member asset retirements. This value is relevant only with group asset. Y - Reduction rate is used for member asset retirements. N - Reduction rate is not used for member asset retirements. Defaults to N. |
RECOGNIZE_GAIN_LOSS | Optional | VARCHAR2(30) | Indicates whether a member asset retirement should result in recognizing gain and loss amount. YES - Recognize gain and loss amount. NO - Do not recognize gain and loss amount. Defaults to NO. |
RECAPTURE_RESERVE_FLAG | Optional | VARCHAR2(1) | Defaults to N. |
LIMIT_PROCEEDS_FLAG | Optional | VARCHAR2(1) | Defaults to N. |
TERMINAL_GAIN_LOSS | Optional | VARCHAR2(30) | Indicates whether to recognize gain and loss when the last member asset in a group asset is retired out of the group. YES - Recognize gain and loss amount. NO - Not recognizing gain and loss amount END_OF_YEAR - Different recognition of gain and loss amount until the end of current fiscal year. Defaults to YES. |
TRACKING_METHOD | Optional | VARCHAR2(30) | Member assets tracking option value. ALLOCATE - Allocate group depreciation amount across it's member assets. CALCULATE - Uses member assets depreciation instead of group asset's depreciation. Defaults to null. |
EXCESS_ALLOCATION_OPTION | Optional | VARCHAR2(30) | Indicates whether excess from allocation of group depreciation expense across its member assets is reduced from group depreciation expense or reallocated to its member assets. DISTRIBUTE - Reallocate the excess depreciation expense to its member assets. REDUCE - Reduce the excess from group depreciation expense. |
DEPRECIATION_OPTION | Optional | VARCHAR2(30) | Indicates whether member asset's depreciation expense is calculated using group or member asset depreciation information. GROUP - Use group asset depreciation information to calculate member asset depreciation expense. MEMBER - Use member asset depreciation information to calculate member asset depreciation expense. Defaults to GROUP if TRACKING_METHOD is CALCULATE, otherwise defaults to null. |
MEMBER_ROLLUP_FLAG | Optional | VARCHAR2(1) | Indicates whether group asset depreciation amount is sum of member asset depreciation amount. This value is relevant if TRACKING_METHOD is CALCULATE and the value is not Y if RECOGNIZE_GAIN_LOSS or TERMINAL_GAIN_LOSS is NO. Y - Sum member asset depreciation amount to group. N - Group depreciation amount is calculated using the group asset information. Defaults to N if TRACKING_METHOD is CALCULATE, otherwise defaults to null. |
ALLOCATE_TO_FULLY_RSV_FLAG | Optional | VARCHAR2(1) | Indicates whether to allocate group asset's depreciation amount to a reserved member asset. Y - Group depreciation expense is allocated to a reserved member assets. N - Group depreciation expense is not allocated to fully reserved member assets. Defaults to N if TRACKING_METHOD is ALLOCATE, otherwise defaults to null. |
The following are relevant to group assets:
DISABLED_FLAG
OVER_DEPRECIATE_OPTION
SUPER_GROUP_ID
REDUCE_ADDITION_FLAG
REDUCE_ADJUSTMENT_FLAG
REDUCE_RETIREMENT_FLAG
RECOGNIZE_GAIN_LOSS
RECAPTURE_RESERVE_FLAG
LIMIT_PROCEEDS_FLAG
TERMINAL_GAIN_LOSS
TRACKING_METHOD
EXCESS_ALLOCATION_OPTION
DEPRECIATION_OPTION
MEMBER_ROLLUP_FLAG
ALLOCATE_TO_FULLY_RSV_FLAG
REDUCTION_RATE is for group and member assets.
The ASSET_DEPRN_REC_TYPE asset structure contains depreciation information for a given asset. The following table shows type and value information for each argument.
Argument | Required / Optional | Type | Value |
---|---|---|---|
YTD_DEPRN | Optional | NUMBER | Year-to-date depreciation expense (delta). |
DEPRN_RESERVE | Optional | NUMBER | Total depreciation taken since beginning of asset life (delta) |
PRIOR_FY_EXPENSE | Optional | NUMBER | Depreciation expense due to previous fiscal years (delta). |
BONUS_YTD_DEPRN | Optional | NUMBER | Bonus year-to-date depreciation expense (delta). |
BONUS_DEPRN_RESERVE | Optional | NUMBER | Total bonus depreciation taken since beginning of asset life (delta). |
PRIOR_FY_BONUS_ EXPENSE | Optional | NUMBER | Bonus depreciation expense due to prior fiscal years (delta). |
REVAL_YTD_DEPRN | Optional | NUMBER | Year-to-date depreciation expense due to revaluation (delta). |
REVAL_DEPRN_RESERVE | Optional | NUMBER | For a period in which this asset was revalued: change in net book value due to revaluation of asset cost and sometimes also revaluation of depreciation reserve. For all other periods: revaluation reserve amount after depreciation run (delta). |
The INV_TRANS_REC_TYPE invoice structure contains invoice transaction information for a given invoice. The following table shows type and value information for each argument.
The invoice transaction and invoice data are passed in the invoice table. Invoice additions and mass additions are new lines (source) and must be left null. All other arguments are on existing lines and will require the SOURCE_LINE_ID value. Alternative Ledger Currency data should be passed into the rate table on new lines.
Argument | Required / Optional | Type | Value |
---|---|---|---|
TRANSACTION_TYPE | Required when invoices are driving the adjustment transaction. Optional for non-invoice adjustments. | VARCHAR2(20) | Type of invoice transaction, such as INVOICE ADDITION, INVOICE ADJUSTMENT, INVOICE DELETE, INVOICE REINSTATE, INVOICE TRANSFER, and MASS ADDITION. |
The INV_REC_TYPE invoice structure contains invoice information for a single invoice associated with an asset. The INV_TBL is a table of INV_REC_TYPE records. These records contain all invoices that have been applied to the asset. The following table shows type and value information for each argument.
Note: The below arguments are required when altering existing invoices, not for adding new ones.
Argument | Required / Optional | Type | Value |
---|---|---|---|
SOURCE_LINE_ID | Required - when adjusting an existing invoice line, but not required for non-invoice adjustments | NUMBER | Source line identification number. |
PO_VENDOR_ID | Optional | NUMBER | Supplier identification number. |
FIXED_ASSETS_COST | Optional (only when the record is populated) | NUMBER | Cost of asset in Oracle Assets. |
DELETED_FLAG | Optional | Defaults to NO for most cases except when deleting an invoice when it defaults to YES. | |
PO_NUMBER | Optional | NUMBER | Purchase order number. |
INVOICE_NUMBER | Optional | VARCHAR2(50) | Invoice number. |
PAYABLES_BATCH_NAME | Optional | VARCHAR2(50) | Payables batch name in the invoice |
PAYABLES_CODE_ COMBINATION_ID | Optional | NUMBER(15) | Clearing account number which is posted in accounts payable. |
FEEDER_SYSTEM_NAME | Optional | VARCHAR2(40) | Name of the feeder system that creates the FA_MASS_ADDITIONS row. |
CREATE_BATCH_DATE | Optional | DATE | Mass additions batch date when creating this row. |
CREATE_BATCH_ID | Optional | NUMBER(15) | Mass additions create request identification number for this row. |
INVOICE_DATE | Optional | DATE | Invoice date from accounts payable. |
PAYABLES_COST | Required | NUMBER | Invoice cost from accounts payable. |
POST_BATCH_ID | Optional | NUMBER(15) | Mass Additions Post request identification number for this row. |
INVOICE_ID | Optional | NUMBER(15) | Invoice date from accounts payable. |
AP_DISTRIBUTION_LINE_ NUMBER | Optional | NUMBER(15) | Distribution line identification number. |
PAYABLES_UNITS | Optional | NUMBER | Units from AP_INVOICE_DISTRIBUTIONS row. |
SPLIT_MERGED_CODE | Optional | VARCHAR2(3) | Indicates if the invoice line is split or merged. |
DESCRIPTION | Optional | VARCHAR2(80) | Invoice line description. |
PARENT_MASS_ ADDITIONS_ID | Optional | VARCHAR2(15) | Parent mass addition identification number for the mass addition. |
UNREVALUED_COST | Optional | NUMBER | Cost without revaluations. |
MERGED_CODE | Optional | VARCHAR2(3) | Indicates if the mass addition is a merged parent or a merged child. |
SPLIT_CODE | Optional | VARCHAR2(3) | Indicates if the mass addition is a split parent or a split child. |
MERGED_PARENT_MASS_ ADDITIONS_ID | Optional | NUMBER(15) | Merged parent mass addition ID. |
SPLIT_PARENT_MASS_ ADDITIONS_ID | Optional | NUMBER(15) | Split parent mass addition ID. |
PROJECT_ASSET_LINE_ID | Optional | NUMBER(15) | Identifier of the summarized asset cost line transferred from Oracle Projects to create this line. |
PROJECT_ID | Optional | NUMBER(15) | Identifier of the project from which the costs are collected, summarized, and transferred from Oracle Projects. |
TASK_ID | Optional | NUMBER(15) | Identifier of the task from which costs are collected, summarized, and transferred from Oracle Projects. This column is populated only if the costs were summarized by task. |
ATTRIBUTE1 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE2 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE3 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE4 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE5 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE6 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE7 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE8 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE9 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE10 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE11 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE12 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE13 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE14 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE15 | Optional | VARCHAR2(150) | Descriptive flexfield segment. |
ATTRIBUTE_CATEGORY_CODE | Optional | VARCHAR2(30) | Descriptive flexfield structure defining column. |
YTD_DEPRN | Optional | NUMBER | Year-to-date depreciation expense. |
DEPRN_RESERVE | Optional | NUMBER | Total depreciation taken since beginning of asset life. |
BONUS_YTD_DEPRN | Optional | NUMBER | Bonus year-to-date depreciation expense. |
BONUS_DEPRN_RESERVE | Optional | NUMBER | Total bonus depreciation taken since beginning of asset life. |
REVAL_AMORTIZATION_ BASIS | Optional | NUMBER | Revaluation reserve for calculating the amortization of revaluation reserve. This value is updated when the asset is revalued or has an amortized adjustment. |
REVAL_YTD_DEPRN | Optional | NUMBER | Year-to-date depreciation expense due to revaluation. |
REVAL_DEPRN_RESERVE | Optional | NUMBER | For the period when the asset is revalued, it is change in net book value due to revaluation of asset cost and sometimes revaluation of depreciation reserve. For other periods it is revaluation reserve amount after depreciation run. |
INVOICE_DISTRIBUTION_ID | Optional | VARCHAR2(1) | Invoice distribution identifier. |
INVOICE_LINE_NUMBER | Optional | VARCHAR2(30) | Invoice line number. |
PO_DISTRIBUTION_ID | Optional | VARCHAR2(30) | Purchase order distribution identifier. |
INV_RATE_TBL | Optional | INV_RATE_REC_TYPE | If using an alternate ledger currency, you may optionally provide either rates or converted amounts directly for each ledger through this member. |
The INV_RATE_REC_TYPE invoice structure contains rate information for an invoice. Each INV_RATE_REC_TYPE record contains one conversion rate. The INV_RATE_TBL_TYPE is a table of INV_RATE_REC_TYPE records. This table is used by the alternative ledger currency to determine the conversion rates for an asset. The following table shows type and value information for each argument.
Note: In the case of alternative ledger currency, this table must be populated when performing invoice transactions involving a new invoice line, mass addition or invoice addition. For adjustments/transfers on the source asset, the amounts will be derived within the invoice engine. The rate table should not be populated in non-invoice scenarios as the rate will be derived based on the transaction date.
Argument | Required / Optional | Type | Value |
---|---|---|---|
SET_OF_BOOKS_ID | Required - When using alternative ledger currency. | NUMBER(15) | Ledger identification number. |
EXCHANGE_RATE | Optional (required if cost is not specified) | NUMBER | Exchange rate for the currency. |
COST | Optional (required if EXCHANGE_RATE is not specified) | Number | Provide converted cost directly rather than an exchange rate. |
The GROUP_RECLASS_OPTIONS_REC_TYPE reclassification structure contains any group reclass options that may be changed during a transaction performed on a group asset. The following table shows type and value information for each argument.
Argument | Required / Optional | Type | Value |
---|---|---|---|
TRANSFER_FLAG | Optional | VARCHAR2(3) | Option to transfer reserve or calculate catchup expense. (YES/NO) (CRL Assets) |
MANUAL_FLAG | Optional | VARCHAR2(3) | Indicates whether system should calculate the amount to transfer or whether a value will be provided. Available when choosing the transfer only option. (YES/NO) (CRL Assets) |
MANUAL_AMOUNT | Optional | NUMBER | When the manual_flag is YES, this is the amount that you intend to transfer. (CRL Assets) The relationship between the flags is as follows during a group reclass: Group-unit or unit-group: transfer_flag = NO / manual_flag = NO. Group-group: transfer_flag = NO / manual_flag = NO Transfer_flag = YES / manual_flag = YES or NO. |
GROUP_RECLASS_TYPE | VARCHAR2(30) | Indicates whether group reclass amounts information is provided by the user or calculated by the system. CALC - System calculates amounts based on AMORTIZATION_START_DATE. MANUAL - User needs to provide amounts |
|
RESERVE_AMOUNT | NUMBER | Reserve amount moved from source to destination. | |
SOURCE_EOFY_RESERVE | NUMBER | Reserve amount at the end of previous fiscal year moved from source. This is used to calculate the new depreciable basis for some of FLAT-NBV method. | |
DESTINATION_EOFY_RESERVE | NUMBER | Reserve amount at the end of previous fiscal year added to destination. This is used to calculate new depreciable basis for some of FLAT-NBV method. |
The following section gives an overview of using the adjustment API in various scenarios including invoice and non-invoice scenarios as well as alternative ledger currency. The same principles apply for adjustments in the period of addition and those after depreciation has been run as well as for all three types of assets: capitalized, CIP, and expensed.
The invoice transaction and invoice data are passed in the invoice table. Invoice additions and mass additions are new lines (source) and must be left null. All other arguments are on existing lines and will require the SOURCE_LINE_ID value. Alternative Ledger Currency data should be passed into the rate table on new lines.
Important: Do not use the Adjustment API directly to perform an invoice transfer. Instead, use the Public Invoice transfer API which is designed to handle both assets involved.
When calling the new adjustment API, there are four possible ways in which you would call it as shown below:
Invoice used without alternative ledger currency enabled
No invoice used and without alternative ledger currency enabled
Invoice used with alternative ledger currency enabled
No invoice used with alternative ledger currency enabled
If invoices are involved, either a new invoice or an adjustment / transfer to an existing invoice, then the API will use the information in the invoice table to calculate the change in the asset's financial information. Hence, there is no need to populate the FIN_REC_TYPE. On the other hand, if invoices are not involved, then the change in financial information is passed by directly populating the FIN_REC_TYPE.
In the case of alternative ledger currency, the INV_RATE table must be populated when performing invoice transactions involving a new invoice line, mass addition or invoice addition. For adjustments/transfers on the source asset, the amounts will be derived within the invoice engine. The rate table should not be populated in non-invoice scenarios as the rate will be derived based on the transaction date.
Note: The new transaction APIs operate on the concept of delta/change. Thus, you must populate values in the structures that change for fin, deprn and invoice structures. This is crucial with the amount columns. If you are changing the cost from 50000 to 60000, the cost value in the structure will be 10000. The sign is important as the change results in a decrease in value and you should use the negative sign. Thus, a cost change from 60000 to 50000 would mean that cost would be populated with - 1000.
The adjustments API will treat null values as meaning no change. For non-incremental or amount columns which are being changed from a populated value to null, you must pass either FND_API.G_MISS_NUM, G_MISS_DATE, or G_MISS_CHAR, depending on the data type, in order to tell the API to null out the current value. For example, if you are removing the short tax information in the period of addition.
In the case where invoices are involved as part of the transaction, the amounts in the fin and deprn structures should not be populated as the invoice engine will calculate the total change internally within the API.
Note: When populating structures, you only need to populate the values which are changing and populate financial amounts with the delta change only. You do not need to update the new total.
This section details how to call the API without passing in any invoice related information. This would be used for manual cost changes as well as changes to values like the date placed in service or the depreciation method for the asset. The following are the structures that are available and include details regarding values. It also indicates if values are required.
You must populate the ASSET_ID AND BOOK_TYPE_CODE for the transaction. If the book is a corporate book, then the API will automatically process tax books in which the asset already exists and either CIP-in-tax (for CIP assets) or autocopy (for capitalized assets) are enabled. You should NOT populate SET_OF_BOOKS_ID nor period of addition as these are internal values to be calculated by the API itself.
The TRANSACTION_SUBTYPE will default to EXPENSED so you should populate the TRANSACTION_SUBTYPE with AMORTIZED if you wish to instead amortize the adjustment. If TRANSACTION_SUBTYPE is AMORTIZED, you may optionally provide an amortization start date otherwise the adjustment will be amortized from the open period. TRANSACTION_TYPE_CODE, TRANSACTION_HEADER_ID and TRANSACTION_DATE_ENTERED will be derived within the API as will any other needed values. For expensed adjustments, the transaction date will be the last day of the open period. For amortized adjustments, it will be the amortization start date.
When performing an adjustment without any invoice information, you should populate only the fields that are changing in the ASSET_FIN_REC_ADJ structure (such as COST, SALVAGE_VALUE, PRORATE_CONVENTION, etc). You should not populate system derived values such as RATE_ADJUSTMENT_FACTOR, ADJUSTED_COST, RECOVERABLE_COST, DEPRN_START_DATE, OR PRORATE_DATE. All such fields will be calculated internally.
When adjusting a capitalized asset in the period of addition, the DEPRN_REC_TYPE can be populated for manual transaction. If using invoices, the depreciation related columns in the INV_REC_TYPE should be populated instead. The fields which are available are the year-to-date / accumulates amounts (such as YTD_DEPRN and DEPRN_RESERVE) for core, bonus and revaluate historical information.
Related Topics
Sample Script: Using the Adjustment API without Invoice Information
This section details how to call the API when the adjustment will be initiated by an addition or change to invoice related information. In addition to those structures noted above, the following structures are now needed for such an adjustment. Additionally, the fin and deprn structure will not be populated in this mode since the API will calculate the total delta based on the sum of all invoices.
The invoice transaction and invoice data are passed in the invoice table. Invoice additions and mass additions are new lines (source) and must be left null. All other arguments are on existing lines and will require the SOURCE_LINE_ID value. Alternative Ledger Currency data should be passed into the rate table on new lines.
If you are using invoices, you must populate the TRANSACTION_TYPE_CODE. The INVOICE_TRANSACTION_ID should not be populated and will be derived within the API except in cases where the API is being called for the destination asset involved in a source line transfer.
When using invoices in the adjustment, you should populate all desired column with values for new invoice lines, such as MASS ADDITION / INVOICE ADDITION. For adjustments involving existing invoices, including INVOICE ADJUSTMENTS, DELETES, REINSTATES and TRANSFERS. You only need to input the value change in FIXED_ASSETS_COST.
For example, if a source line currently has $250000 of cost and you are changing it to 200000, you would populate the INV_REC with -50000.
If you are deleting a line or reinstating a previously deleted line, you should only populate the DELETED_FLAG with the associated value, and no other columns should be populated.
For new lines, you should always leave the SOURCE_LINE_ID as null.
For adjustments on existing source lines, each row in the invoice table should have the SOURCE_LINE_ID populated with the value of the line being altered.
When sending new invoices in an alternative ledger currency-enabled corporate book, the exchange rates or cost should be provided in this table for each source line and for each associated reporting currency. The unique identifier for each row is the combination of the SET_OF_BOOKS_ID and the INV_INDICATOR. Therefore, you must populate the INV_INDICATOR, THE SET_OF_BOOKS_ID, and the EXCHANGE RATE for each row. The INV_INDICATOR will allow rows in this table to be matched up with their respective rows in the INV_TBL in the invoice engine. This table does not need to be populated when altering existing lines as the invoice engine will derive the correct exchange rate(s) from the existing row(s).
Note: In this table, you must enter values for either EXCHANGE_RATE or COST depending on your choice.
Related Topics
Sample Script: Using the Adjustment API with Invoice Information
This section details how to call the API when the adjustment will cause a group reclassification in a crl-enabled environment. In addition to those structures noted above, the following structure is now needed for such an adjustment.
Note: Note: You can combine the group reclassification with additional financial changes such as cost and can also use invoices in that transaction.
This structure is only applicable to CRL-enabled environments using group depreciation. It must be populated when changing the assignment of an asset into or out of a group. The TRANSFER_FLAG and MANUAL_FLAG are both required in such a scenario and each will either contain YES or NO. When setting the MANUAL_FLAG = YES, you must also provide the MANUAL_AMOUNT.
When set to YES, the TRANSFER_FLAG indicates that the group reclassification will be processed as a current period transaction and that only a reserve amount will be transferred, but that no depreciation will be caught up nor backed out on either the source or destination side. When set to NO, this flags indicates the group reclassification will be treated as a backdated correction and rather than transferring reserve, depreciation expense will be backed in proportion to the cost of the asset being reclassed.
Specifying a manual amount is currently only permitted when using the TRANSFER option, since the amount signifies the amount of reserve to transfer and can not apply to catchup scenarios. When the MANUAL_FLAG is set to NO, the system will calculate the amounts for either the expense or reserve depending on the value of the TRANSFER_FLAG.
Group reclassifications combinations currently supported are illustrated in the table below:
Old Group | New Group | TRANSFER_FLAG | MANUAL_ FLAG |
---|---|---|---|
NONE | A | N | No |
A | B | No | No |
A | B | Yes | Yes |
A | B | Yes | No |
The following example demonstrates the adjustment of an asset without any invoice information and with no reporting currency. In this particular example, we are increasing the cost by $600000 (i.e. a current cost of 100000 and a new cost of 700000). It populates the needed structures and then calls the Adjustments API. Note that the only the delta cost is populated in the FIN_REC_TYPE as it is the only thing we are changing. All other values are derived internally within the API.
set serveroutput on declare l_trans_rec FA_API_TYPES.trans_rec_type; l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type; l_asset_fin_rec_adj FA_API_TYPES.asset_fin_rec_type; l_asset_fin_rec_new FA_API_TYPES.asset_fin_rec_type; l_asset_fin_mrc_tbl_new FA_API_TYPES.asset_fin_tbl_type; l_inv_trans_rec FA_API_TYPES.inv_trans_rec_type; l_inv_tbl FA_API_TYPES.inv_tbl_type; l_inv_rate_tbl FA_API_TYPES.inv_rate_tbl_type; l_asset_deprn_rec_adj FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_rec_new FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_mrc_tbl_new FA_API_TYPES.asset_deprn_tbl_type; l_inv_rec FA_API_TYPES.inv_rec_type; l_group_reclass_options_rec FA_API_TYPES.group_reclass_options_rec_type; l_return_status VARCHAR2(1); l_mesg_count number := 0; l_mesg_len number; l_mesg varchar2(4000); begin fnd_profile.put('PRINT_DEBUG', 'Y'); dbms_output.enable(1000000); FA_SRVR_MSG.Init_Server_Message; FA_DEBUG_PKG.Initialize; -- asset header info l_asset_hdr_rec.asset_id := &asset_id; l_asset_hdr_rec.book_type_code := '&book_type_code'; -- fin info l_asset_fin_rec_adj.cost := 24000; FA_ADJUSTMENT_PUB.do_adjustment (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, x_return_status => l_return_status, x_msg_count => l_mesg_count, x_msg_data => l_mesg, p_calling_fn => '&description', px_trans_rec => l_trans_rec, px_asset_hdr_rec => l_asset_hdr_rec, p_asset_fin_rec_adj => l_asset_fin_rec_adj, x_asset_fin_rec_new => l_asset_fin_rec_new, x_asset_fin_mrc_tbl_new => l_asset_fin_mrc_tbl_new, px_inv_trans_rec => l_inv_trans_rec, px_inv_tbl => l_inv_tbl, --px_inv_rate_tbl => l_inv_rate_tbl, p_asset_deprn_rec_adj => l_asset_deprn_rec_adj, x_asset_deprn_rec_new => l_asset_deprn_rec_new, x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new, p_group_reclass_options_rec => l_group_reclass_options_rec); --dump messages dbms_output.put_line(l_return_status); if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then fa_debug_pkg.dump_debug_messages(max_mesgs=>0); l_mesg_count := fnd_msg_pub.count_msg; if l_mesg_count > 0 then l_mesg := substr(fnd_msg_pub.get (fnd_msg_pub.G_FIRST, fnd_api.G_FALSE), 1, 512); dbms_output.put_line(substr(l_mesg,1, 255)); for i in 1..l_mesg_count - 1 loop l_mesg := substr(fnd_msg_pub.get (fnd_msg_pub.G_NEXT, fnd_api.G_FALSE), 1, 512); dbms_output.put_line(substr(l_mesg, 1, 255)); end loop; fnd_msg_pub.delete_msg(); end if; else dbms_output.put_line('SUCCESS'); dbms_output.put_line('THID' || to_char(l_trans_rec.transaction_header_id)); end if; end; /
The following example simulates the adjustment of an asset via an invoice line with one associated reporting currency. It populates the needed structures and then calls the Adjustments API. In this case we are adding a new invoice line to the asset with the cost of the invoice being $5000. Note that the financial structure remains null because as detailed previously in the document, the private invoice API will be responsible for calculating the total change in cost bases on the sum of all the invoice structures.
set serveroutput on declare l_trans_rec FA_API_TYPES.trans_rec_type; l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type; l_asset_fin_rec_adj FA_API_TYPES.asset_fin_rec_type; l_asset_fin_rec_new FA_API_TYPES.asset_fin_rec_type; l_asset_fin_mrc_tbl_new FA_API_TYPES.asset_fin_tbl_type; l_inv_trans_rec FA_API_TYPES.inv_trans_rec_type; l_inv_tbl FA_API_TYPES.inv_tbl_type; l_inv_rate_tbl FA_API_TYPES.inv_rate_tbl_type; l_asset_deprn_rec_adj FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_rec_new FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_mrc_tbl_new FA_API_TYPES.asset_deprn_tbl_type; l_inv_rec FA_API_TYPES.inv_rec_type; l_group_reclass_options_rec FA_API_TYPES.group_reclass_options_rec_type; l_return_status VARCHAR2(1); l_mesg_count number; l_mesg varchar2(512); begin dbms_output.enable(10000000); FA_SRVR_MSG.Init_Server_Message; -- asset header info l_asset_hdr_rec.asset_id := &asset_id; l_asset_hdr_rec.book_type_code := '&book'; -- invoice trans l_inv_trans_rec.transaction_type := 'INVOICE ADDITION'; -- invoice info l_inv_rec.fixed_assets_cost := 2500; l_inv_rec.deleted_flag := 'NO'; l_inv_rec.description := 'test inv'; l_inv_rec.unrevalued_cost := 5555; l_inv_rec.create_batch_id := 1000; l_inv_rec.payables_code_combination_id := 13528; l_inv_rec.feeder_system_name := 'ACK'; l_inv_rec.payables_cost := 5555; l_inv_rec.payables_units := 1; l_inv_rec.po_vendor_id := 1; l_inv_rec.inv_indicator := 1; l_inv_tbl (1) := l_inv_rec; FA_ADJUSTMENT_PUB.do_adjustment( -- 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, p_asset_fin_rec_adj => l_asset_fin_rec_adj, x_asset_fin_rec_new => l_asset_fin_rec_new, x_asset_fin_mrc_tbl_new => l_asset_fin_mrc_tbl_new, px_inv_trans_rec => l_inv_trans_rec, px_inv_tbl => l_inv_tbl, p_asset_deprn_rec_adj => l_asset_deprn_rec_adj, x_asset_deprn_rec_new => l_asset_deprn_rec_new, x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new, p_group_reclass_options_rec => l_group_reclass_options_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); dbms_output.put_line(l_mesg); for i in 1..(l_mesg_count - 1) loop l_mesg := substr(fnd_msg_pub.get (fnd_msg_pub.G_NEXT, fnd_api.G_FALSE), 1, 250); dbms_output.put_line(l_mesg); end loop; fnd_msg_pub.delete_msg(); end if; if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then dbms_output.put_line('FAILURE'); else dbms_output.put_line('SUCCESS'); dbms_output.put_line('THID' || to_char(l_trans_rec.transaction_header_id)); dbms_output.put_line('ASSET_ID' || to_char(l_asset_hdr_rec.asset_id)); end if; end; /
For MRC
set serveroutput on declare l_trans_rec FA_API_TYPES.trans_rec_type; l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type; l_asset_fin_rec_adj FA_API_TYPES.asset_fin_rec_type; l_asset_fin_rec_new FA_API_TYPES.asset_fin_rec_type; l_asset_fin_mrc_tbl_new FA_API_TYPES.asset_fin_tbl_type; l_inv_trans_rec FA_API_TYPES.inv_trans_rec_type; l_inv_tbl FA_API_TYPES.inv_tbl_type; l_inv_rate_tbl FA_API_TYPES.inv_rate_tbl_type; l_asset_deprn_rec_adj FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_rec_new FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_mrc_tbl_new FA_API_TYPES.asset_deprn_tbl_type; l_inv_rec FA_API_TYPES.inv_rec_type; l_group_reclass_options_rec FA_API_TYPES.group_reclass_options_rec_type; l_return_status VARCHAR2(1); l_mesg_count number; l_mesg varchar2(512); begin dbms_output.enable(10000000); FA_SRVR_MSG.Init_Server_Message; -- asset header info l_asset_hdr_rec.asset_id := &asset_id l_asset_hdr_rec.book_type_code := '&book'; -- invoice trans l_inv_trans_rec.transaction_type := 'INVOICE ADDITION'; -- invoice info l_inv_rec.fixed_assets_cost := 2500; l_inv_rec.deleted_flag := 'NO'; l_inv_rec.description := 'test inv'; l_inv_rec.unrevalued_cost := 5555; l_inv_rec.create_batch_id := 1000; l_inv_rec.payables_code_combination_id := 13528; l_inv_rec.feeder_system_name := 'ACK'; l_inv_rec.payables_cost := 5555; l_inv_rec.payables_units := 1; l_inv_rec.po_vendor_id := 1; l_inv_rec.inv_indicator := 1; l_inv_tbl (1) := l_inv_rec; -- rate info l_inv_rec.inv_rate_tbl(1).set_of_books_id := 102; l_inv_rec.inv_rate_tbl(1).exchange_rate := 2; l_inv_rec.inv_rate_tbl(1).cost := 2001; FA_ADJUSTMENT_PUB.do_adjustment( -- 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, p_asset_fin_rec_adj => l_asset_fin_rec_adj, x_asset_fin_rec_new => l_asset_fin_rec_new, x_asset_fin_mrc_tbl_new => l_asset_fin_mrc_tbl_new, px_inv_trans_rec => l_inv_trans_rec, px_inv_tbl => l_inv_tbl, p_asset_deprn_rec_adj => l_asset_deprn_rec_adj, x_asset_deprn_rec_new => l_asset_deprn_rec_new, x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new, p_group_reclass_options_rec => l_group_reclass_options_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); dbms_output.put_line(l_mesg); for i in 1..(l_mesg_count - 1) loop l_mesg := substr(fnd_msg_pub.get (fnd_msg_pub.G_NEXT, fnd_api.G_FALSE), 1, 250); dbms_output.put_line(l_mesg); end loop; fnd_msg_pub.delete_msg(); end if; if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then dbms_output.put_line('FAILURE'); else dbms_output.put_line('SUCCESS'); dbms_output.put_line('THID' || to_char(l_trans_rec.transaction_header_id)); dbms_output.put_line('ASSET_ID' || to_char(l_asset_hdr_rec.asset_id)); end if; end; /
The following example simulates the adjustment of an asset via an invoice line with one associated reporting currency. It populates the needed structures and then calls the Adjustments API. In this case we are adding a new invoice line to the asset with the cost of the invoice being $5000. Note that the financial structure remains null because as detailed previously in the document, the private invoice API will be responsible for calculating the total change in cost bases on the sum of all the invoice structures.
set serveroutput on declare l_trans_rec FA_API_TYPES.trans_rec_type; l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type; l_asset_fin_rec_adj FA_API_TYPES.asset_fin_rec_type; l_asset_fin_rec_new FA_API_TYPES.asset_fin_rec_type; l_asset_fin_mrc_tbl_new FA_API_TYPES.asset_fin_tbl_type; l_inv_trans_rec FA_API_TYPES.inv_trans_rec_type; l_inv_tbl FA_API_TYPES.inv_tbl_type; l_inv_rate_tbl FA_API_TYPES.inv_rate_tbl_type; l_asset_deprn_rec_adj FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_rec_new FA_API_TYPES.asset_deprn_rec_type; l_asset_deprn_mrc_tbl_new FA_API_TYPES.asset_deprn_tbl_type; l_inv_rec FA_API_TYPES.inv_rec_type; l_group_reclass_options_rec FA_API_TYPES.group_reclass_options_rec_type; l_return_status VARCHAR2(1); l_mesg_count number; l_mesg varchar2(512); begin dbms_output.enable(10000000); FA_SRVR_MSG.Init_Server_Message; -- asset header info l_asset_hdr_rec.asset_id := &asset_id; l_asset_hdr_rec.book_type_code := '&book'; -- invoice trans l_inv_trans_rec.transaction_type := 'INVOICE ADDITION'; -- invoice info l_inv_rec.fixed_assets_cost := 2500; l_inv_rec.deleted_flag := 'NO'; l_inv_rec.description := 'test inv'; l_inv_rec.unrevalued_cost := 5555; l_inv_rec.create_batch_id := 1000; l_inv_rec.payables_code_combination_id := 13528; l_inv_rec.feeder_system_name := 'ACK'; l_inv_rec.payables_cost := 5555; l_inv_rec.payables_units := 1; l_inv_rec.po_vendor_id := 1; l_inv_rec.inv_indicator := 1; l_inv_tbl (1) := l_inv_rec; FA_ADJUSTMENT_PUB.do_adjustment( -- 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, p_asset_fin_rec_adj => l_asset_fin_rec_adj, x_asset_fin_rec_new => l_asset_fin_rec_new, x_asset_fin_mrc_tbl_new => l_asset_fin_mrc_tbl_new, px_inv_trans_rec => l_inv_trans_rec, px_inv_tbl => l_inv_tbl, p_asset_deprn_rec_adj => l_asset_deprn_rec_adj, x_asset_deprn_rec_new => l_asset_deprn_rec_new, x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new, p_group_reclass_options_rec => l_group_reclass_options_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); dbms_output.put_line(l_mesg); for i in 1..(l_mesg_count - 1) loop l_mesg := substr(fnd_msg_pub.get (fnd_msg_pub.G_NEXT, fnd_api.G_FALSE), 1, 250); dbms_output.put_line(l_mesg); end loop; fnd_msg_pub.delete_msg(); end if; if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then dbms_output.put_line('FAILURE'); else dbms_output.put_line('SUCCESS'); dbms_output.put_line('THID' || to_char(l_trans_rec.transaction_header_id)); dbms_output.put_line('ASSET_ID' || to_char(l_asset_hdr_rec.asset_id)); end if; end; /