This section is intended for users who are well-versed in PL/SQL and who are interested in using the APIs directly rather than using the forms-based Oracle Assets interface.
The Oracle Assets APIs also use common structures, which define the asset as a number of discrete parts that are fundamental to every asset, such as a descriptive part, a financial part, and a distribution part. The APIs use a message structure to deliver information as well as error messages in a compact package.
This section contains information on the common shared framework used in the Oracle Assets APIs, and information on how to call them directly.
The Oracle Assets APIs use the following 12 common structures:
| Argument | Type | Description |
|---|---|---|
| TRANSACTION_HEADER_ ID | NUMBER(15) | Unique transaction identification number. |
| TRANSACTION_TYPE_ CODE | VARCHAR2(20) | Identifies the type of the transaction. |
| TRANSACTION_DATE_ ENTERED | DATE | Date on which the transaction occurred. For Additions, will default to the date the asset was placed in service. |
| TRANSACTION_NAME | VARCHAR2(20) | Description of the transaction. This field is frequently the comments field in the Asset Workbench. |
| SOURCE_TRANSACTION_ HEADER_ID | NUMBER(15) | Transaction header identification number for corresponding transaction in the associated corporate book. |
| MASS_REFERENCE_ID | NUMBER(15) | Identifies concurrent request that invoked the transaction if it is part of a mass transaction. |
| TRANSACTION_SUBTYPE | VARCHAR2(9) | Further detail of the transaction type. For Additions or adjustments, this is frequently use AMORTIZED or EXPENSED. For retirements and revaluations, it takes other, usually internal values. |
| TRANSACTION_KEY | VARCHAR2(1) | General class of transaction. |
| AMORTIZATION_START_ DATE | DATE | Amortization start date. |
| DEPRN_OVERRIDE_FLAG | VARCHAR2(1) | Override Status (D - depreciation amount was overridden. B - bonus amount was overridden. A - depreciation and bonus amounts were overridden. |
| CALLING_INTERFACE | VARCHAR2(30) | Interface that calls the API. This field defaults to CUSTOM. |
| DESC_FLEX | DESC_FLEX_ REC_TYPE | Descriptive flexfield segments. |
| WHO_INFO | STANDARD_ WHO_REC_ TYPE | Standard Who columns. |
| Table 1 - 1. (Page 2 of 2) | ||
| Argument | Type | Description |
|---|---|---|
| ASSET_ID | NUMBER(15) | Asset identification number. |
| BOOK_TYPE_CODE | VARCHAR2(15) | Book name. |
| SET_OF_BOOKS_ID | NUMBER(15) | Set of books identification number for GL set of books. |
| PERIOD_OF_ADDITION | VARCHAR2(1) | Identifies whether the transaction occurs in the period of addition for the asset in question. |
| Table 1 - 2. (Page 1 of 1) | ||
| Argument | Type | Description |
| ASSET_NUMBER | VARCHAR2(15) | User assigned asset number. |
| DESCRIPTION | VARCHAR2(80) | Description of the asset. |
| TAG_NUMBER | VARCHAR2(15) | Tag number of the asset. |
| SERIAL_NUMBER | VARCHAR2(35) | Serial number of the asset. |
| ASSET_KEY_CCID | NUMBER(15) | Identifies an asset key flexfield combination for the asset. |
| PARENT_ASSET_ID | NUMBER(15) | Identifies a parent asset for subcomponents. |
| MANUFACTURER_NAME | VARCHAR2(30) | Name of manufacturer. |
| MODEL_NUMBER | VARCHAR2(40) | Model number of the asset. |
| WARRANTY_ID | NUMBER(15) | Warranty identification number. |
| LEASE_ID | NUMBER(15) | Lease identification number. |
| IN_USE_FLAG | VARCHAR2(3) | Indicates whether the asset is in use. |
| INVENTORIAL | VARCHAR2(3) | Indicates whether the asset should be included in physical inventory. |
| PROPERTY_TYPE_CODE | VARCHAR2(10) | Indicates the property type. |
| PROPERTY_1245_1250_ CODE | VARCHAR2(4) | Indicates whether the property class is 1245 (personal) or 1250 (real). |
| OWNED_LEASED | VARCHAR2(15) | Indicates whether asset is owned or leased. |
| NEW_USED | VARCHAR2(4) | Indicates whether asset is new or used. |
| CURRENT_UNITS | NUMBER | Current number of units for the asset. |
| UNIT_ADJUSTMENT_FLAG | VARCHAR2(3) | Indicates whether a unit adjustment is taking place. |
| ADD_COST_JE_FLAG | VARCHAR2(3) | No longer used. |
| STATUS | VARCHAR2(150) | Describes status of asset. (CRL assets) |
| LEASE_DESC_FLEX | DESC_FLEX_ REC_TYPE | Lease descriptive flexfield segments. |
| GLOBAL_DESC_FLEX | DESC_FLEX_ REC_TYPE | Global descriptive flexfield segments. |
| Table 1 - 3. (Page 2 of 2) | ||
| Argument | Type | Description |
|---|---|---|
| ASSET_TYPE | VARCHAR2(15) | Indicates whether the asset is CIP, capitalized, or expensed. |
| Table 1 - 4. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| CATEGORY_ID | NUMBER(15) | Identifies the category to which the asset belongs. |
| CATEGORY_DESC_FLEX | DESC_FLEX_ REC_TYPE | Category descriptive flexfield segments. |
| Table 1 - 5. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| PARENT_HIERARCHY_ID | NUMBER(15) | Identifies the hierarchy to which the asset belongs. (CRL assets) |
| Table 1 - 6. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| SET_OF_BOOKS_ID | NUMBER(15) | Set of books identification number for GL set of books. |
| DATE_PLACED_IN_ SERVICE | DATE | Date the asset was placed in service. |
| DEPRN_START_DATE | DATE | Date the asset started to depreciate. |
| DEPRN_METHOD_CODE | VARCHAR2(12) | Name of the depreciation method for the asset. |
| LIFE_IN_MONTHS | NUMBER(4) | Life of the asset in total months. |
| RATE_ADJUSTMENT_ FACTOR | NUMBER | Percent of remaining depreciation after a revaluation or an amortized change or 1 if there was no change. |
| ADJUSTED_COST | NUMBER | Recoverable cost less depreciation reserve. Value is reset when an amortized adjustment ore revaluation is performed. |
| COST | NUMBER | Current cost of the asset. |
| ORIGINAL_COST | NUMBER | Original cost of the asset. |
| SALVAGE_VALUE | NUMBER | Asset salvage value. |
| PRORATE_CONVENTION_ CODE | VARCHAR2(10) | Depreciation prorate convention. |
| PRORATE_DATE | DATE | Date used to prorate depreciation. |
| COST_CHANGE_FLAG | VARCHAR2(3) | Indicates where there is an adjustment pending for the asset. The depreciation program recalculates depreciation reserve from the beginning of the asset's life if this flag is set to YES. |
| ADJUSTMENT_REQUIRED_STATUS | VARCHAR2(4) | Indicates asset requires an adjustment to depreciation expense for a retroactive transaction. |
| CAPITALIZE_FLAG | VARCHAR2(3) | Indicates whether an asset is a capitalized asset. |
| RETIREMENT_PENDING_ FLAG | VARCHAR2(3) | Indicates whether the asset has a retirement pending. |
| DEPRECIATE_FLAG | VARCHAR2(3) | Indicates whether the asset is depreciating. |
| ITC_AMOUNT_ID | NUMBER(15) | Identifies the ITC rate. |
| ITC_AMOUNT | NUMBER | Amount of ITC. |
| RETIREMENT_ID | NUMBER(15) | Identifies the retirement transaction if the asset has been retired. |
| TAX_REQUEST_ID | NUMBER(15) | Concurrent request number for mass copy program. |
| ITC_BASIS | NUMBER | Cost basis for calculating ITC. |
| BASIC_RATE | NUMBER | Base rate used to calculate depreciation amount for flat rate methods. |
| ADJUSTED_RATE | NUMBER | Actual rate used to calculate depreciation for flat rate methods. |
| BONUS_RULE | NUMBER | Bonus rule for an asset. |
| CEILING_NAME | VARCHAR2(30) | Identifies a depreciation ceiling to be used in calculating depreciation. |
| RECOVERABLE_COST | NUMBER | Cost minus salvage value, or depreciation ceiling, whichever is lower. |
| ADJUSTED_CAPACITY | NUMBER | Capacity of a units of production asset. The value is reset when an amortized capacity adjustment is performed. |
| FULLY_RSVD_REVALS_ COUNTER | NUMBER(5) | Number of times the asset has been revalued as fully reserved. |
| IDLED_FLAG | VARCHAR2(3) | Reserved for future use. |
| PERIOD_COUNTER_ CAPITALIZED | NUMBER(15) | Period that the asset was capitalized. |
| PERIOD_COUNTER_FULLY_RESERVED | NUMBER(15) | Period that the asset became fully reserved. |
| PERIOD_COUNTER_FULLY_RETIRED | NUMBER(15) | Period in which the asset was fully retired. |
| PRODUCTION_CAPACITY | NUMBER | Capacity of a units of production asset. |
| REVAL_AMORTIZATION_ BASIS | NUMBER | Revaluation reserve used in calculating amortization of revaluation reserve. Updated only when the asset is revalued or has an amortized adjustment. |
| REVAL_CEILING | NUMBER | Upper limit for revaluing asset cost. |
| UNIT_OF_MEASURE | VARCHAR2(25) | Unit of measure of an units of production asset. |
| UNREVALUED_COST | NUMBER | Cost without regard to any revaluations. |
| ANNUAL_DEPRN_ ROUNDING_FLAG | VARCHAR2(5) | Indicates whether Oracle Assets should subtract year-to-date depreciation from the annual depreciation amount to get the depreciation amount for the last period of the fiscal year. |
| PERCENT_SALVAGE_ VALUE | NUMBER | Salvage value percentage amount. |
| ALLOWED_DEPRN_LIMIT | NUMBER | The default depreciation limit as a percentage of cost. |
| ALLOWED_DEPRN_LIMIT_AMOUNT | NUMBER | Depreciation limit amount. |
| PERIOD_COUNTER_LIFE_ COMPLETE | NUMBER(15) | The period the asset's useful life is fully reserved. |
| ADJUSTED_RECOVERABLE_COST | NUMBER | Adjusted recoverable cost with special depreciation limits taken into account. |
| ANNUAL_ROUNDING_ FLAG | VARCHAR2(5) | Reserved for future use. |
| EOFY_ADJ_COST | NUMBER | Adjusted cost at the end of the fiscal year. |
| EOFY_FORMULA_FACTOR | NUMBER | Formula factor at the end of the fiscal year. |
| SHORT_FISCAL_YEAR_ FLAG | VARCHAR2(3) | Indicates if asset is added in a short fiscal year. |
| CONVERSION_DATE | DATE | Date short tax year asset added to the acquiring company. |
| ORIG_DEPRN_START_DATE | DATE | Date short tax year asset begin deprecating in the acquired company's books. |
| REMAINING_LIFE1 | NUMBER(4) | Remaining life of the asset as of the conversion date, prorate date or fiscal year start date. |
| REMAINING_LIFE2 | NUMBER(4) | Remaining life of the asset as of the fiscal year start date. |
| GROUP_ASSET_ID | NUMBER(15) | Group asset identification number. (CRL Asset) |
| OLD_ADJUSTED_COST | NUMBER | The old cost of a formula-based NBV-based asset before an adjustment. |
| FORMULA_FACTOR | NUMBER | Factor used to adjust the depreciation rate for formula-based NBV-based assets. |
| GLOBAL_ATTRIBUTE1-20 | VARCHAR2(150) | Reserved for country-specific functionality. |
| GLOBAL_ATTRIBUTE_ CATEGORY | VARCHAR2(30) | Reserved for country-specific functionality. |
| Table 1 - 7. (Page 3 of 3) | ||
| Argument | Type | Description |
|---|---|---|
| SET_OF_BOOKS_ID | NUMBER(15) | Set of books identification number for GL set of books. |
| DEPRN_AMOUNT | NUMBER | Depreciation expense for this depreciation period. |
| YTD_DEPRN | NUMBER | Year-to-date depreciation expense. |
| DEPRN_RESERVE | NUMBER | Total depreciation taken since beginning of asset life. |
| PRIOR_FY_EXPENSE | NUMBER | Depreciation expense due to prior fiscal years. |
| BONUS_DEPRN_AMOUNT | NUMBER | Bonus depreciation expense for this period. |
| BONUS_YTD_DEPRN | NUMBER | Bonus year-to-date depreciation expense. |
| BONUS_DEPRN_RESERVE | NUMBER | Total bonus depreciation taken since beginning of asset life. |
| PRIOR_FY_BONUS_ EXPENSE | NUMBER | Bonus depreciation expense due to prior fiscal years. |
| REVAL_AMORTIZATION | NUMBER | Amount of revaluation reserve amortized during this period. |
| REVAL_AMORTIZATION_ BASIS | NUMBER | Revaluation reserve used in calculating amortization of revaluation reserve. Value is updated only when the asset is revalued or has an amortized adjustment. |
| REVAL_DEPRN_EXPENSE | NUMBER | Portion of depreciation expense due to revaluation of the asset cost. |
| REVAL_YTD_DEPRN | NUMBER | Year-to-date depreciation expense due to revaluation. |
| REVAL_DEPRN_RESERVE | 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. |
| PRODUCTION | NUMBER | Current period production for a units of production asset. |
| YTD_PRODUCTION | NUMBER | Year-to-date production for a units of production asset. |
| LTD_PRODUCTION | NUMBER | Life-to-date production for a units of production asset. |
| Table 1 - 8. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| DISTRIBUTION_ID | NUMBER(15) | Unique distribution identification number. |
| UNITS_ASSIGNED | NUMBER | Number of units assigned to the distribution. |
| TRANSACTION_UNITS | NUMBER | Number of units involved in the transaction. Negative for the row from which the units were transferred away or retired. Positive for the row to which the units were transferred or added. |
| ASSIGNED_TO | NUMBER(15) | Employee identification number. |
| EXPENSE_CCID | NUMBER(15) | Depreciation expense account identification number. |
| LOCATION_CCID | NUMBER(15) | Location flexfield identification number. |
| Table 1 - 9. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| INVOICE_TRANSACTION_ID | NUMBER(15) | Unique identification number for the invoice transaction. |
| TRANSACTION_TYPE | VARCHAR2(20) | Type of invoice transaction. (i.e., INVOICE ADDITION, INVOICE ADJUSTMENT, INVOICE DELETE, INVOICE REINSTATE, INVOICE TRANSFER, MASS ADDITION) |
| Argument | Type | Description |
|---|---|---|
| PO_VENDOR_ID | NUMBER(15) | Supplier identification number. |
| ASSET_INVOICE_ID | NUMBER(15) | Asset invoice identification number. |
| FIXED_ASSETS_COST | NUMBER | Cost of asset in Oracle Assets. |
| DELETED_FLAG | VARCHAR2(3) | Indicates whether this row has been deleted in the CIP Adjustments form. |
| PO_NUMBER | VARCHAR2(20) | Purchase order number. |
| INVOICE_NUMBER | VARCHAR2(50) | Invoice number. |
| PAYABLES_BATCH_NAME | VARCHAR2(50) | Name of the payables batch that contained this invoice. |
| PAYABLES_CODE_ COMBINATION_ID | NUMBER(15) | Clearing account number to which this line was posted in accounts payable. |
| FEEDER_SYSTEM_NAME | VARCHAR2(40) | Name of the feeder system that created the FA_MASS_ADDITIONS row. |
| CREATE_BATCH_DATE | DATE | Date the mass additions batch was created for this row. |
| CREATE_BATCH_ID | NUMBER(15) | Mass additions create request identification number for this row. |
| INVOICE_DATE | DATE | Invoice date from accounts payable. |
| PAYABLES_COST | NUMBER | Invoice cost from accounts payable. |
| POST_BATCH_ID | NUMBER(15) | Mass Additions Post request identification number for this row. |
| INVOICE_ID | NUMBER(15) | Invoice identification number. |
| AP_DISTRIBUTION_LINE_ NUMBER | NUMBER(15) | Distribution line identification number. |
| PAYABLES_UNITS | NUMBER | Units from AP_INVOICE_DISTRIBUTIONS row. |
| SPLIT_MERGED_CODE | VARCHAR2(3) | Indicates if the invoice line is split or merged. |
| DESCRIPTION | VARCHAR2(80) | Invoice line description. |
| PARENT_MASS_ ADDITIONS_ID | VARCHAR2(15) | Parent mass addition identification number for the mass addition. |
| UNREVALUED_COST | NUMBER | Cost without regard to any revaluations. |
| MERGED_CODE | VARCHAR2(3) | Indicates if the mass addition is a merged parent or a merged child. |
| SPLIT_CODE | VARCHAR2(3) | Indicates if the mass addition is a split parent or a split child. |
| MERGED_PARENT_MASS_ ADDITION_ID | NUMBER(15) | Merged parent mass addition ID. |
| SPLIT_PARENT_MASS_ADDITION_ID | NUMBER(15) | Split parent mass addition ID. |
| PROJECT_ASSET_LINE_ID | NUMBER(15) | Identifier of the summarized asset cost line transferred from Oracle Projects to create this line. |
| PROJECT_ID | NUMBER(15) | Identifier of the project from which the costs are collected, summarized, and transferred from Oracle Projects. |
| TASK_ID | 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. |
| SOURCE_LINE_ID | NUMBER(15) | Source line identification number. |
| ATTRIBUTE1 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE2 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE3 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE4 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE5 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE6 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE7 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE8 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE9 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE10 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE11 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE12 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE13 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE14 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE15 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE_CATEGORY_ CODE | VARCHAR2(30) | Descriptive flexfield structure defining column. |
| INV_INDICATOR | NUMBER | Join to INV_RATE_REC |
| YTD_DEPRN | NUMBER | Year-to-date depreciation expense. |
| DEPRN_RESERVE | NUMBER | Total depreciation taken since beginning of asset life. |
| BONUS_YTD_DEPRN | NUMBER | Bonus year-to-date depreciation expense. |
| BONUS_DEPRN_RESERVE | NUMBER | Total bonus depreciation taken since beginning of asset life. |
| REVAL_AMORTIZATION_ BASIS | NUMBER | Revaluation reserve used in calculating amortization of revaluation reserve. Value is updated only when the asset is revalued or has an amortized adjustment. |
| REVAL_YTD_DEPRN | NUMBER | Year-to-date depreciation expense due to revaluation. |
| REVAL_DEPRN_RESERVE | 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. |
| Table 1 - 10. (Page 3 of 3) | ||
| Argument | Type | Description |
|---|---|---|
| INV_INDICATOR | NUMBER | Join to INV_REC. |
| SET_OF_BOOKS_ID | NUMBER(15) | Set of books identification number for GL set of books. |
| EXCHANGE_RATE | NUMBER | Exchange rate for this currency. |
| Table 1 - 11. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| RETIREMENT_ID | NUMBER(15) | Retirement identification number. |
| DATE_RETIRED | DATE | Date on which retirement occurred. |
| UNITS_RETIRED | NUMBER | Number of units retired. |
| COST_RETIRED | NUMBER | Cost retired. |
| PROCEEDS_OF_SALE | NUMBER | Proceeds from the sale of the asset. |
| COST_OF_REMOVAL | NUMBER | Cost of removing the asset. |
| RETIREMENT_TYPE_CODE | VARCHAR2(15) | Retirement type. |
| RETIREMENT_PRORATE_ CONVENTION | VARCHAR2(10) | Prorate convention of the retirement. |
| SOLD_TO | VARCHAR2(30) | Name of the party to whom the asset was sold. |
| TRADE_IN_ASSET_ID | NUMBER(15) | Asset identification number of the new asset for which this asset was traded in. |
| REFERENCE_NUM | VARCHAR2(15) | Reference number. |
| STATUS | VARCHAR2(15) | Status of the retirement. |
| CALCULATE_GAIN_LOSS | VARCHAR2(1) | Whether to run calculate gain/loss immediately. (Either FND_API.G_TRUE or FND_API.G_FALSE.) |
| DETAIL_INFO | ASSET_RETIRE_ DET_REC_TYPE | Internal retirement information. |
| DESC_FLEX | DESC_FLEX_ REC_TYPE | Retirement descriptive flexfield information. |
| Argument | Type | Description |
|---|---|---|
| ASSET_ID | NUMBER(15) | Asset identification number. |
| BOOK_TYPE_ CODE | VARCHAR2(15) | Book name. |
| TRANSACTION_HEADER_ID_IN | NUMBER(15) | Identification number of the asset transaction which created the row. |
| TRANSACTION_HEADER_ID_OUT | NUMBER(15) | Identification number of the asset transaction which made the row obsolete. |
| NBV_RETIRED | NUMBER | Net book value retired. |
| GAIN_LOSS_AMOUNT | NUMBER | Gain or loss from the retirement. |
| GAIN_LOSS_TYPE_CODE | VARCHAR2(15) | Whether the retirement resulted in a gain or a loss. |
| ITC_RECAPTURED | NUMBER | Investment tax credit recaptured. |
| ITC_RECAPTURE_ID | NUMBER(15) | Investment tax credit recapture identification number. |
| STL_METHOD_CODE | VARCHAR2(12) | Straight line method for retirement reporting of 1250 property in a tax book. |
| STL_LIFE_IN_MONTHS | NUMBER(4) | Straight line life for retirement. |
| STL_DEPRN_AMOUNT | NUMBER | Straight line depreciation amount for reporting of 1250 property in a tax book. |
| REVAL_RESERVE_RETIRED | NUMBER | Revaluation reserve retired. |
| UNREVALUED_COST_RETIRED | NUMBER | Cost retired without any regard to revaluations. |
| BONUS_RESERVE_RETIRED | NUMBER | Bonus reserve retired. |
| ROW_ID | NUMBER | Row ID of retirement row. |
| Argument | Type | Description |
|---|---|---|
| CATEGORY_ID | NUMBER(15) | Identifies category to which the hierarchy belongs. (CRL Assets) |
| SERIAL_NUMBER | VARCHAR2(35) | Serial number of the hierarchy. (CRL Assets) |
| LEASE_ID | NUMBER(15) | Lease identification number. (CRL Assets) |
| ASSET_KEY_CCID | NUMBER(15) | Identifies the asset key combination for the hierarchy. (CRL Assets) |
| DIST_SET_ID | NUMER(15) | Distribution set identification number. (CRL Assets) |
| LIFE_IN_MONTHS | NUMBER(4) | Life in total months. (CRL Assets) |
| PRORATE_DATE | DATE | Date used to prorate depreciation. (CRL Assets) |
| Argument | Type | Description |
|---|---|---|
| EVENT_CODE | VARCHAR2(30) | Event that triggers the creation of the batch: (CRL Assets) CHANGE_NODE_PARENT - Change Parent of a Node in the Asset Hierarchy CHANGE_NODE_ATTRIBUTE - Change Attribute Value on Node in the Asset Hierarchy CHANGE_NODE_RULE_SET - Change Rule Set on a Node in an Asset Hierarchy CHANGE_ASSET_LEASE - Change Lease on an Asset CHANGE_ASSET_PARENT - Change Parent Of An Asset CHANGE_ASSET_CATEGORY - Change Asset Category on an Asset CHANGE_LEASE_LIFE_END_DATE - Change Life End Date on a Lease CHANGE_CATEGORY_LIFE - Change Life On Asset Category CHANGE_CATEGORY_LIFE_END_DATE - Change Life End Date On Asset Category CHANGE_CATEGORY_RULE_SET - Change Rule Set on Asset Category |
| STATUS_CODE | VARCHAR2(2) | Status of the batch: (CRL Assets) P - Pending, IP - In Process, PP - Partially Processed, CP - Completely Processed, R - Rejected |
| SOURCE_ENTITY_NAME | VARCHAR2(30) | The type of the source entity: (CRL Assets) NODE - Parent Node, ASSET - Asset, LEASE - Lease Number, CATEGORY - Asset Category |
| SOURCE_ENTITY_VALUE | VARCHAR2(30) | The value of the source entity triggering the event. (CRL Assets) |
| SOURCE_ATTRIBUTE_NAME | VARCHAR2(30) | The name of the source attribute: (CRL Assets) PARENT - Parent Node, CATEGORY - Asset Category, DISTRIBUTION- Distribution Set, SERIAL_NUMBER - Serial Number, LEASE_NUMBER - Lease Number, ASSET_KEY - Asset Key, RULE_SET - Rule Set, LEASE_END_DATE - Lease End Date, LIFE - Life, LIFE_END_DATE - Life End Date |
| SOURCE_ATTRIBUTE_OLD_ID | VARCHAR2(30) | Identifier of the source attribute before the event was triggered. (CRL Assets) |
| SOURCE_ATTRIBUTE_NEW_ID | VARCHAR2(30) | Identifier of the source attribute after the event was triggered. (CRL Assets) |
| AMORTIZATION_START_DATE | DATE | Date of Amortization. (CRL Assets) |
| AMORTIZE_FLAG | VARCHAR2(3) | Indicates whether to use Amortization Date: (CRL Assets) Y- Amortize, N - Expense |
| DESCRIPTION | VARCHAR2(50) | Description of the batch created. (CRL Assets) |
| REJECTION_CODE_REASON | VARCHAR2(30) | Reason the Batch was Rejected. (CRL Assets) |
| CONCURRENT_REQUEST_ID | NUMBER | Concurrent request Id of the run which created this record. (CRL Assets) |
| BATCH_ID | NUMBER | System generated identifier of a batch. (CRL Assets) |
| Argument | Type | Description |
|---|---|---|
| ASSET_ID | NUMBER(15) | Asset identification number. |
| PARENT_FLAG | VARCHAR2(1) | Indicates whether asset is a parent asset. (Defaults to FND_API.G_FALSE) |
| Argument | Type | Description |
|---|---|---|
| PERIOD_NAME | VARCHAR2(15) | Depreciation period name. |
| PERIOD_COUNTER | NUMBER(15) | Period counter of the depreciation calendar. |
| PERIOD_OPEN_DATE | DATE | System date when the depreciation period was opened. |
| PERIOD_CLOSE_DATE | DATE | System date when the depreciation period was closed. |
| CALENDAR_PERIOD_OPEN_DATE | DATE | Calendar period date when the period begins. |
| CALENDAR_PERIOD_CLOSE_DATE | DATE | Calendar period date when the period ends. |
| DEPRN_RUN | VARCHAR2(1) | Indicates whether depreciation has been run for the period. |
| PERIOD_NUM | NUMBER(3) | Period number within a fiscal year. |
| FISCAL_YEAR | NUMBER(4) | Fiscal year |
| FY_START_DATE | DATE | First day of the fiscal year. |
| FY_END_DATE | DATE | Last day of the fiscal year. |
| Argument | Type | Description |
|---|---|---|
| COPY_CAT_DESC_FLAG | VARCHAR2(3) | Indicates whether to copy the category descriptive flexfield information to the new category for the asset. (YES/NO) |
| COPY_CAT_DESC_FLAG | VARCHAR2(3) | Indicates whether to copy the category descriptive flexfield information to the new category for the asset. (YES/NO) |
| REDEFAULT_FLAG | VARCHAR2(3) | Indicates whether to inherit the depreciation rules of the new category. (YES/NO) |
| MASS_REQUEST_ID | NUMBER(15) | Concurrent request identification number. |
| Argument | Type | Description |
|---|---|---|
| TRANSFER_FLAG | VARCHAR2(3) | Flag indicates whether to transfer reserve only or calculate catchup expense. (YES/NO) (CRL Assets) |
| MANUAL_FLAG | VARCHAR2(3) | Indicates whether system should calculate the amount to transfer or whether a value will be provided and is only available when choosing the transfer only option. (YES/NO) (CRL Assets) |
| MANUAL_AMOUNT | NUMBER | When the manual_flag is set to YES, this is the amount that you intend to transfer. (CRL Assets) The interrelationship 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 |
| Argument | Type | Description |
|---|---|---|
| CODE_COMBINATION_ID | NUMBER(15) | Account to which unplanned depreciation is allocated. |
| UNPLANNED_AMOUNT | NUMBER | Amount of unplanned depreciation taken. |
| UNPLANNED_TYPE | VARCHAR2(9) | Type of unplanned depreciation. |
| Argument | Type | Description |
|---|---|---|
| LAST_UPDATE_DATE | DATE | Standard Who column. (Defaults to SYSDATE) |
| LAST_UPDATED_BY | NUMBER(15) | Standard Who column. (Defaults to FND_GLOBAL.USER_ID) |
| CREATED_BY | NUMBER(15) | Standard Who column. (Defaults to FND_GLOBAL.USER_ID) |
| CREATION_DATE | DATE | Standard Who column. (Defaults to SYSDATE) |
| LAST_UPDATE_LOGIN | NUMBER(15) | Standard Who column. (Defaults to FND_GLOBAL.LOGIN_ID) |
| Table 1 - 12. (Page 1 of 1) | ||
| Argument | Type | Description |
|---|---|---|
| ATTRIBUTE1 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE2 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE3 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE4 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE5 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE6 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE7 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE8 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE9 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE10 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE11 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE12 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE13 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE14 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE15 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE16 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE17 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE18 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE19 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE20 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE21 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE22 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE23 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE24 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE25 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE26 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE27 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE28 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE29 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE30 | VARCHAR2(150) | Descriptive flexfield segment. |
| ATTRIBUTE_CATEGORY_ CODE | VARCHAR2(210) | Descriptive flexfield structure defining column. |
| CONTEXT | VARCHAR2(210) | Structure defining column for the asset category descriptive flexfield. |
| Table 1 - 13. (Page 2 of 2) | ||
Oracle Assets also allows you to add assets using any of the following methods:
| 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 |
Sample Script. Using the Additions API via Invoices
Sample Script. Using the Additions API with No Invoices
The following table provides the arguments, types, value, and descriptions of the elements of the FA_ADDITION_PUB.DO_ADDITION 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) | Flag on whether to commit asset after processed. |
| P_VALIDATION_LEVEL | NUMBER | FND_API.G_VALID_ LEVEL_NONE - Lowest level of validation possible for a transaction FND_API.G_VALID_ LEVEL_FULL - Highest level of validation possible for a transaction (Default) | Check on whether the API should do the validation for the asset. |
| X_RETURN_STATUS | VARCHAR2(1) | FND_API.G_RET_STS_ SUCCESS - Addition was a success FND_API.G_RET_STS_ ERROR - Addition failed FND_API.G_RET_STS_ UNEXP_ERROR - Unexpected error | Determines whether or not the API completed successfully. |
| X_MSG_COUNT | NUMBER | Number of messages on the message stack. | |
| X_MSG_DATA | VARCHAR2(1024) | Message stack. | |
| P_CALLING_FN | VARCHAR2(30) | Function calling the API | |
| PX_TRANS_REC | FA_API_TYPES. TRANS_REC_TYPE | Describes the transaction taking place. | |
| PX_DIST_TRANS_REC | FA_API_TYPES. DIST_TRANS_REC_ TYPE | Describes the distribution of the transaction. | |
| PX_ASSET_HDR_REC | FA_API_TYPES. ASSET_HDR_REC_ TYPE | Unique identifiers of the asset being added. | |
| PX_ASSET_DESC_REC | FA_API_TYPES. ASSET_DESC_REC_ TYPE | Description of the asset. | |
| PX_ASSET_TYPE_REC | FA_API_TYPES. ASSET_TYPE_REC_ TYPE | Asset type of the asset. | |
| PX_ASSET_CAT_REC | FA_API_TYPES. ASSET_CAT_REC_ TYPE | Category information of the asset. | |
| PX_ASSET_HIERARCHY_REC | FA_API_TYPES. ASSET_HIERARCHY_REC_TYPE | Hierarchy information of the asset. | |
| PX_ASSET_FIN_REC | FA_API_TYPES. ASSET_FIN_REC_ TYPE | Financial information of the asset. | |
| PX_ASSET_DEPRN_REC | FA_API_TYPES. ASSET_DEPRN_ REC_TYPE | Depreciation information of the asset. | |
| PX_ASSET_DIST_TBL | FA_API_TYPES. ASSET_DIST_TBL_ TYPE | Distribution information of the asset. | |
| PX_INV_TBL | FA_API_TYPES. INV_TBL_TYPE | Invoices for the asset. | |
| PX_INV_RATE_TBL | FA_API_TYPES. INV_RATE_TBL_ TYPE | Table of rates for the invoices for the asset for MRC. | |
| Table 1 - 1. (Page 2 of 2) | |||
| 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_NAME | Optional | VARCHAR2(20) | Description of the transaction. |
| MASS_REFERENCE_ID | Optional | NUMBER(15) | Identifies concurrent request that invoked the mass transaction. |
| TRANSACTION_SUBTYPE | Optional | VARCHAR2(9) | AMORTIZED - Amortize NBV addition NULL - Regular addition |
| AMORTIZATION_START_ DATE | Optional | DATE | Amortization start date |
| CALLING_INTERFACE | Optional | VARCHAR2(30) | Defaults to CUSTOM |
| DESC_FLEX | Optional | DESC_FLEX_ REC | Descriptive flexfield segment |
| WHO_INFO | Required | STANDARD_ WHO_REC | Standard Who columns |
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| ASSET_ID | Internal use only for addition to Corporate book. Required for addition to tax book for asset already existing in Corporate book. For a tax addition, only the TRANS_REC_TYPE and the ASSET_HDR_REC_TYPE attributes are needed. The values in the other structures such as ASSET_DESC_REC_TYPE, ASSET_FIN_REC_TYPE, ASSET_TYPE_REC_TYPE, ASSET_CAT_REC_TYPE, etc, will default form. the values of the Corporate book, | NUMBER(15) | Optional OUT parameter |
| BOOK_TYPE_CODE | Required | VARCHAR2(15) | Book name |
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| ASSET_NUMBER | Optional | VARCHAR2(15) | Defaults to asset_id. Optional OUT parameter. |
| DESCRIPTION | Required | VARCHAR2(80) | Description of the asset. |
| TAG_NUMBER | Optional | VARCHAR2(15) | Tag number of the asset. |
| SERIAL_NUMBER | Optional | VARCHAR2(35) | Serial number of the asset. |
| ASSET_KEY_CCID | Optional | NUMBER(15) | Identifies an asset key flexfield combination for the asset. |
| PARENT_ASSET_ID | Optional | NUMBER(15) | Identifies a parent asset for subcomponents. |
| STATUS | Optional | VARCHAR2(150) | Describes the status of the asset. (CRL Assets only) |
| MANUFACTURER_NAME | Optional | VARCHAR2(30) | Name of the manufacturer. |
| MODEL_NUMBER | Optional | VARCHAR2(40) | Model number of the asset. |
| WARRANTY_ID | Optional | NUMBER(15) | Warranty identification number. |
| LEASE_ID | Optional | NUMBER(15) | Lease identification number. |
| IN_USE_FLAG | Optional | VARCHAR2(3) | Indicates whether the asset is in use. YES - In use (default) NO - Not in use |
| INVENTORIAL | Optional | VARCHAR2(3) | YES - Include in physical inventory NO - Do not include in physical inventory Defaults to value in category |
| PROPERTY_TYPE_CODE | Optional | VARCHAR2(10) | Indicates the property type. Defaults to value in category |
| PROPERTY_1245_1250_ CODE | Optional | VARCHAR2(4) | 1245 - Personal 1250 - Real Defaults to value in category |
| OWNED_LEASED | Optional | VARCHAR2(15) | OWNED - Owned (Default) LEASED - Leased Defaults to value in category |
| NEW_USED | Optional | VARCHAR2(4) | NEW - New (Default) USED - Used |
| LEASE_DESC_FLEX | Optional | DESC_FLEX_ REC_TYPE | Lease descriptive flexfield segments. |
| GLOBAL_DESC_FLEX | Optional | DESC_FLEX_ REC_TYPE | Global descriptive flexfield segments. |
| Table 1 - 2. (Page 2 of 2) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| ASSET_TYPE | Required | VARCHAR2(15) | CAPITALIZED - Capitalized asset (default) CIP - CIP asset EXPENSED - Expensed asset |
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| CATEGORY_ID | Required | NUMBER(15) | Identifies whether the asset is CIP, Capitalized, or Expensed. |
| CATEGORY_DESC_FLEX | Optional | DESC_FLEX_ REC_TYPE | Category descriptive flexfield segments. |
| Table 1 - 3. (Page 1 of 1) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| PARENT_HIERARCHY_ID | Optional | NUMBER(15) | Identifies the hierarchy to which the asset belongs. (CRL assets) |
| Table 1 - 4. (Page 1 of 1) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| DATE_PLACED_IN_ SERVICE | Required (if no invoices were populated) | DATE | Date the asset was placed in service. |
| DEPRN_METHOD_CODE | Optional | VARCHAR2(12) | The name of the depreciation menthod. Defaults to value in category |
| LIFE_IN_MONTHS | Optional | NUMBER(4) | Life of the asset in total months. Defaults to value in category |
| COST | Required (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 to value in category |
| PRORATE_CONVENTION_ CODE | Optional | VARCHAR2(10) | Depreciation prorate convention. Defaults to value in category |
| DEPRECIATE_FLAG | Required | 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 to value in category |
| ADJUSTED_RATE | Optional | NUMBER | Defaults to value in category |
| BONUS_RULE | Optional | NUMBER | Bonus rule for an asset. Defaults to value in category. If a defualt 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 to value in category. If a defualt 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 to value in category |
| UNIT_OF_MEASURE | Optional | VARCHAR2(25) | Unit of measure of a units of production asset. Defaults to value in category. |
| 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 defualt 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. |
| Table 1 - 5. (Page 2 of 2) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| YTD_DEPRN | Optional | NUMBER | Year-to-date depreciation expense. |
| DEPRN_RESERVE | Optional | NUMBER | Total depreciation taken since the beginning of the asset's life. |
| REVAL_DEPRN_RESERVE | Optional | NUMBER | For a period in which this asset was revalued: The value is the change in net book value due to revaluation of asset cost, and sometimes also the revaluation of depreciation reserve. For all other periods: The value is the revaluation reserve amount after depreciation is run. |
| Table 1 - 6. (Page 1 of 1) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| UNITS_ASSIGNED | Required | NUMBER | Number of units assigned to the distribution. |
| ASSIGNED_TO | Optional | NUMBER(15) | Employee identification number. |
| EXPENSE_CCID | Required | NUMBER(15) | Depreciation expense account identification number. |
| LOCATION_CCID | Required | NUMBER(15) | Location flexfield identification number. |
| Table 1 - 7. (Page 2 of 2) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| FIXED_ASSETS_COST | Required (only when the record is populated) | NUMBER | Cost of asset in Oracle Assets. |
| PO_VENDOR_ID | Optional | NUMBER(15) | Supplier identification number. |
| PO_NUMBER | Optional | VARCHAR2(20) | Purchase order number. |
| INVOICE_NUMBER | Optional | VARCHAR2(50) | Invoice number. |
| PAYABLES_BATCH_NAME | Optional | VARCHAR2(50) | Name of the payables batch that contained this invoice. |
| PAYABLES_CODE_ COMBINATION_ID | Optional | NUMBER(15) | Clearing account number to which this line was posted in accounts payable. |
| FEEDER_SYSTEM_NAME | Optional | VARCHAR2(40) | Name of the feeder system that created the FA_MASS_ADDITIONS row. |
| CREATE_BATCH_DATE | Optional | DATE | Date the mass additions batch was created for 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 | Optional | 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 identification number. |
| AP_DISTRIBUTION_LINE_ NUMBER | Optional | NUMBER(15) | Distribution line identification number. |
| PAYABLES_UNITS | Optional | NUMBER | Units from AP_INVOICE_ DISTRIBUTIONS row. |
| DESCRIPTION | Optional | VARCHAR2(80) | Invoice line description. |
| DELETED_FLAG | Optional | VARCHAR2(3) | Indicates whether this row has been deleted in the CIP Adjustments form. Defaults to NO, which it should be for all addition transactions. |
| PROJECT_ASSET_LINE_ID | Optional | NUMBER(15) | Identifier of the summarized asst 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. |
| INV_INDICATOR | Required (only when this record is populated and using MRC and INV_RATE_REC) | NUMBER | Join to INV_RATE_REC. YTD_DEPRN NUMBER Year-to-date deprecation expense. |
| YTD_DEPRN | Optional | NUMBER | Year-to-date deprecation expense. |
| DEPRN_RESERVE | Optional | NUMBER | Total deprecation 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 used in calculating amortization of revaluation reserve. Value is updated only when the asset is revalued or has an amortized adjustment. |
| REVAL_YTD_DEPRN | Optional | NUMBER | Year-to-date deprecation expense due to revaluation. |
| 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. |
| Table 1 - 8. (Page 4 of 4) | |||
| Argument | Required / Optional | Type | Value |
|---|---|---|---|
| INV_INDICATOR | Optional - When using MRC, this value and record should generally be populated. If it is not populated, the daily rate is derived based on the transaction date. | NUMBER | Join to INV_REC. |
| SET_OF_BOOKS_ID | Required - Required when using MRC, and only needed when the record is populated. | NUMBER(15) | Set of books identification number for GL set of books. |
| EXCHANGE_RATE | Required - Required when using MRC, and only needed when the record is populated. | NUMBER | Exchange rate for the currency. |
| Table 1 - 9. (Page 1 of 1) | |||
set serveroutput on
declare
l_trans_rec FA_API_TYPES.trans_rec_type;
l_dist_trans_rec FA_API_TYPES.trans_rec_type;
l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type;
l_asset_desc_rec FA_API_TYPES.asset_desc_rec_type;
l_asset_cat_rec FA_API_TYPES.asset_cat_rec_type;
l_asset_type_rec FA_API_TYPES.asset_type_rec_type;
l_asset_hierarchy_rec FA_API_TYPES.asset_hierarchy_rec_type;
l_asset_fin_rec FA_API_TYPES.asset_fin_rec_type;
l_asset_deprn_rec FA_API_TYPES.asset_deprn_rec_type;
l_asset_dist_rec FA_API_TYPES.asset_dist_rec_type;
l_asset_dist_tbl FA_API_TYPES.asset_dist_tbl_type;
l_inv_tbl FA_API_TYPES.inv_tbl_type;
l_inv_rate_tbl FA_API_TYPES.inv_rate_tbl_type;
l_inv_rec FA_API_TYPES.inv_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(10000000);
FA_SRVR_MSG.Init_Server_Message;
FA_DEBUG_PKG.Initialize;
-- desc info
l_asset_desc_rec.description := 'Dell computer';
l_asset_desc_rec.asset_key_ccid := 2;
-- cat info *** NEED TO CHANGE BASED ON CATEGORY SETUP FOR YOUR BOOK ***
l_asset_cat_rec.category_id := 21;
--type info
l_asset_type_rec.asset_type := 'CAPITALIZED';
-- invoice info
l_inv_rec.fixed_assets_cost := 2500;
l_inv_rec.deleted_flag := 'NO';
l_inv_rec.description := l_asset_desc_rec.description;
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_rate_tbl(1).inv_indicator := 1;
-- *** NEED TO CHANGE BASED ON SOB_ID OF REPORTING BOOKS ***
l_inv_rate_tbl(1).set_of_books_id := 658; -- first reporting book
l_inv_rate_tbl(1).exchange_rate := .532;
l_inv_rate_tbl(2).inv_indicator := 1;
l_inv_rate_tbl(2).set_of_books_id := 659; -- second reporting book
l_inv_rate_tbl(2).exchange_rate := .233;
-- fin info
l_asset_fin_rec.date_placed_in_service := '&DPIS';
l_asset_fin_rec.depreciate_flag := 'YES';
-- deprn info
l_asset_deprn_rec.ytd_deprn := 0;
l_asset_deprn_rec.deprn_reserve := 0;
l_asset_deprn_rec.bonus_ytd_deprn := 0;
l_asset_deprn_rec.bonus_deprn_reserve := 0;
-- book / trans info
l_asset_hdr_rec.book_type_code := '&book';
l_trans_rec.transaction_date_entered := l_asset_fin_rec.date_placed_in_service;
l_trans_rec.who_info.last_updated_by := FND_GLOBAL.USER_ID;
/* distribution info */
-- l_asset_dist_tbl := fa_API_TYPES.asset_dist_tbl_type (null);
l_asset_dist_rec.units_assigned := 1;
l_asset_dist_rec.expense_ccid := 12975;
l_asset_dist_rec.location_ccid := 2;
l_asset_dist_rec.assigned_to := null;
l_asset_dist_rec.transaction_units := l_asset_dist_rec.units_assigned;
l_asset_dist_tbl(1) := l_asset_dist_rec;
--l_asset_desc_rec.asset_number :=
--l_asset_desc_rec.property_type_code :=
--l_asset_desc_rec.property_1245_1250_code :=
--l_asset_desc_rec.in_use_flag :=
--l_asset_desc_rec.owned_leased :=
--l_asset_desc_rec.new_used :=
--l_asset_desc_rec.inventorial :=
--l_asset_desc_rec.manufacturer_name :=
--l_asset_desc_rec.serial_number :=
--l_asset_desc_rec.model_number :=
--l_asset_desc_rec.tag_number :=
--l_asset_desc_rec.parent_asset_id :=
--l_asset_desc_rec.warranty_id :=
--l_asset_desc_rec.lease_id :=
-- call the api
fa_addition_pub.do_addition (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 => null,
px_trans_rec => l_trans_rec,
px_dist_trans_rec => l_dist_trans_rec,
--l_asset_desc_rec.inventorial :=
--l_asset_desc_rec.manufacturer_name :=
--l_asset_desc_rec.serial_number :=
--l_asset_desc_rec.model_number :=
--l_asset_desc_rec.tag_number :=
--l_asset_desc_rec.parent_asset_id :=
--l_asset_desc_rec.warranty_id :=
--l_asset_desc_rec.lease_id :=
-- call the api fa_addition_pub.do_addition
(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 => null,
px_trans_rec => l_trans_rec,
px_dist_trans_rec => l_dist_trans_rec,
px_asset_hdr_rec => l_asset_hdr_rec,
px_asset_desc_rec => l_asset_desc_rec,
px_asset_type_rec => l_asset_type_rec,
px_asset_cat_rec => l_asset_cat_rec,
px_asset_hierarchy_rec => l_asset_hierarchy_rec,
px_asset_fin_rec => l_asset_fin_rec,
px_asset_deprn_rec => l_asset_deprn_rec,
px_asset_dist_tbl => l_asset_dist_tbl,
px_inv_tbl => l_inv_tbl,
px_inv_rate_tbl => l_inv_rate_tbl
);
dbms_output.put_line(l_return_status);
if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
dbms_output.put_line('FAILED');
-- dbms_output.put_line(to_char(sqlerr));
dbms_output.put_line(sqlerrm);
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, 512);
for i in 1..2 loop -- (l_mesg_count - 1) loop
l_mesg := l_mesg || chr(10) ||
substr(fnd_msg_pub.get
(fnd_msg_pub.G_NEXT,
fnd_api.G_FALSE), 1, 512);
end loop;
fnd_msg_pub.delete_msg();
l_mesg_len := length(l_mesg);
for i in 1..ceil(l_mesg_len/255) loop
dbms_output.put_line(substr(l_mesg, ((i*255)-254), 255));
end loop;
end if;
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));
dbms_output.put_line('ASSET_NUMBER' || l_asset_desc_rec.asset_number);
end if;
end;
/
set serveroutput on
declare
l_trans_rec FA_API_TYPES.trans_rec_type;
l_dist_trans_rec FA_API_TYPES.trans_rec_type;
l_asset_hdr_rec FA_API_TYPES.asset_hdr_rec_type;
l_asset_desc_rec FA_API_TYPES.asset_desc_rec_type;
l_asset_cat_rec FA_API_TYPES.asset_cat_rec_type;
l_asset_type_rec FA_API_TYPES.asset_type_rec_type;
l_asset_hierarchy_rec FA_API_TYPES.asset_hierarchy_rec_type;
l_asset_fin_rec FA_API_TYPES.asset_fin_rec_type;
l_asset_deprn_rec FA_API_TYPES.asset_deprn_rec_type;
l_asset_dist_rec FA_API_TYPES.asset_dist_rec_type;
l_asset_dist_tbl FA_API_TYPES.asset_dist_tbl_type;
l_inv_tbl FA_API_TYPES.inv_tbl_type;
l_inv_rate_tbl FA_API_TYPES.inv_rate_tbl_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;
-- desc info
l_asset_desc_rec.description := 'Dell computer';
l_asset_desc_rec.asset_key_ccid := 2;
-- cat info *** NEED TO CHANGE BASED ON CATEGORY SETUP FOR YOUR BOOK ***
l_asset_cat_rec.category_id := 21;
--type info
l_asset_type_rec.asset_type := 'CAPITALIZED';
-- fin info
l_asset_fin_rec.cost := 50000;
l_asset_fin_rec.date_placed_in_service := '&DPIS';
l_asset_fin_rec.depreciate_flag := 'YES';
l_asset_fin_rec.deprn_method_code := 'HS-FORM. NBV';
l_asset_fin_rec.life_in_months := 72;
-- deprn info
l_asset_deprn_rec.ytd_deprn := 500;
l_asset_deprn_rec.deprn_reserve := 500;
l_asset_deprn_rec.bonus_ytd_deprn := 0;
l_asset_deprn_rec.bonus_deprn_reserve := 0;
-- book / trans info
l_asset_hdr_rec.book_type_code := '&book';
l_trans_rec.transaction_date_entered := l_asset_fin_rec.date_placed_in_service;
l_trans_rec.who_info.last_updated_by := FND_GLOBAL.USER_ID;
-- distribution info
l_asset_dist_rec.units_assigned := 1;
l_asset_dist_rec.expense_ccid := 12975;
l_asset_dist_rec.location_ccid := 2;
l_asset_dist_rec.assigned_to := null;
l_asset_dist_rec.transaction_units := l_asset_dist_rec.units_assigned;
l_asset_dist_tbl(1) := l_asset_dist_rec;
--l_asset_desc_rec.asset_number :=
--l_asset_desc_rec.property_type_code := 'REAL';
--l_asset_desc_rec.property_1245_1250_code := '1245';
--l_asset_desc_rec.in_use_flag := 'YES';
--l_asset_desc_rec.owned_leased := 'OWNED';
--l_asset_desc_rec.new_used := 'NEW';
--l_asset_desc_rec.inventorial := 'YES';
--l_asset_desc_rec.manufacturer_name :=
--l_asset_desc_rec.serial_number :=
--l_asset_desc_rec.model_number :=
--l_asset_desc_rec.tag_number :=
--l_asset_desc_rec.parent_asset_id :=
--l_asset_desc_rec.warranty_id :=
--l_asset_desc_rec.lease_id :=
-- For tax addition, will need existing asset_id
--l_asset_hdr_rec.asset_id :=
--l_asset_fin_rec.salvage_value :=
--l_asset_fin_rec.unrevalued_cost :=
--l_asset_fin_rec.short_fiscal_year_flag :=
--l_asset_fin_rec.conversion_date :=
--l_asset_fin_rec.orig_deprn_start_date :=
--l_asset_fin_rec.unit_of_measure :=
--l_asset_deprn_rec.reval_deprn_reserve :=
--l_asset_deprn_rec.reval_amortization_basis :=
-- Accept amort start date for amortize NBV additions
-- l_trans_rec.amortization_start_date :=
-- to_date('&amort_start_date', 'DD-MON-YYYY');
-- call the api
fa_addition_pub.do_addition
(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 => null,
px_trans_rec => l_trans_rec,
px_dist_trans_rec => l_dist_trans_rec,
px_asset_hdr_rec => l_asset_hdr_rec,
px_asset_desc_rec => l_asset_desc_rec,
px_asset_type_rec => l_asset_type_rec,
px_asset_cat_rec => l_asset_cat_rec,
px_asset_hierarchy_rec => l_asset_hierarchy_rec,
px_asset_fin_rec => l_asset_fin_rec,
px_asset_deprn_rec => l_asset_deprn_rec,
px_asset_dist_tbl => l_asset_dist_tbl,
px_inv_tbl => l_inv_tbl,
px_inv_rate_tbl => l_inv_rate_tbl
);
dbms_output.put_line(l_return_status);
if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
dbms_output.put_line('FAILED');
-- dbms_output.put_line(to_char(sqlerr));
dbms_output.put_line(sqlerrm);
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, 512);
for i in 1..2 loop -- (l_mesg_count - 1) loop
l_mesg := l_mesg || chr(10) ||
substr(fnd_msg_pub.get
(fnd_msg_pub.G_NEXT,
fnd_api.G_FALSE), 1, 512);
end loop;
fnd_msg_pub.delete_msg();
l_mesg_len := length(l_mesg);
for i in 1..ceil(l_mesg_len/255) loop
dbms_output.put_line(substr(l_mesg, ((i*255)-254), 255));
end loop;
end if;
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));
dbms_output.put_line('ASSET_NUMBER' || l_asset_desc_rec.asset_number);
end if;
end;
/
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25164132/viewspace-749957/ ,如需转载,请注明出处,否则将追究法律责任。