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. Reserve transfer allows you to move part of the accumulated depreciation from one group asset to another, and is treated as a current period amortized adjustment. You can reserve transfer of a group asset to another group asset only through the user interface.
If you have set up alternate ledger currency , when you add or modify assets using an Oracle Assets API, the API copies the transactions to the reporting currencies automatically. Invoice rounding issues are avoided by using the API to drive the alternate ledger currency accounting for both the ledger and reporting currencies.
Related Topics
Reserve Transfer API Description
Sample Script: Using the Reserve Transfer API
The Reserve Transfer API procedure is called the FA_RESERVE_TRANSFER_PUB.DO_RESERVE_TRANSFER () procedure. The following table provides the arguments, types, value, and descriptions of the elements of the FA_RESERVE_TRANSFER_PUB.DO_RESERVE_TRANSFER () 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_MESG_LIST | VARCHAR2(1) | FND_API.G_TRUE - Initialize the message stack. FND_API.G_FALSE - Do not initialize the message stack (Default). |
Determines whether the messages stack should be initialized and cleared. |
P_COMMIT | VARCHAR2(1) | FND_API.G_TRUE - Commit automatically. FND_API.G_FALSE - Do not commit automatically (Default) |
Commits the transaction. |
P_VALIDATION_LEVEL | NUMBER | FND_API.G_VALID_ LEVEL_NONE - Low level validation for a transaction. FND_API.G_VALID_ LEVEL_FULL - High level validation for a transaction (Default). |
Asset validation by the API. |
X_RETURN_STATUS | VARCHAR2(1) | FND_API.G_RET_STS_ SUCCESS - Indicates a success. FND_API.G_RET_STS_ ERROR - Indicates a failed transaction. FND_API.G_RET_STS_ UNEXP_ERROR - Indicates an unexpected error. |
Determines the API success. |
X_MSG_COUNT | NUMBER | Number of messages on the message stack. | |
X_MSG_DATA | VARCHAR2(1024) | Message stack. | |
P_CALLING_FN | VARCHAR2(30) | Function that calls the API. | |
P_SRC_ASSET_ID | NUMBER | Source asset ID. | |
P_DEST_ASSET_ID | NUMBER | Destination asset ID. | |
P_BOOK_TYPE_CODE | VARCHAR2(15) | Book type code. | |
P_AMOUNT | NUMBER | Asset amount. | |
PX_SRC_TRANS_REC | FA_API_TYPES.TRANS_REC_TYPE | Asset source transaction record. | |
PX_DEST_TRANS_REC | FA_API_TYPES.TRANS_REC_TYPE | Asset destination transaction record. |
The ASSET_SRC_TRANS_REC transaction structure contains information about the transaction, such as the transaction header ID and the transaction type code. The following table shows type and value information for each argument.
Argument | Required / Optional | Type | Value |
---|---|---|---|
TRANSACTION_HEADER_ ID | Internal use only | NUMBER(15) | Optional OUT parameter |
TRANSACTION_DATE_ENTERED | Optional | DATE | Defaults to the date placed in service. |
TRANSACTION_NAME | Optional | VARCHAR2(20) | Description of the transaction. This field is the Comments field in the Asset Workbench. |
MASS_REFERENCE_ID | Optional | NUMBER(15) | Identifies the concurrent request that invokes the transaction if it is part of a mass transaction. |
TRANSACTION_SUBTYPE | Optional | VARCHAR2(9) | Additional information about the transaction type. |
AMORTIZATION_START_DATE | Optional | DATE | Amortization start date. |
CALLING_INTERFACE | Optional | VARCHAR2(30) | Interface that calls the API. This field defaults to CUSTOM. |
DESC_FLEX | Optional | DESC_FLEX_ REC_ TYPE | Descriptive flexfield segments. |
WHO_INFO | Required | STANDARD_ WHO_REC_ TYPE | Standard Who columns. |
The ASSET_DEST_TRANS_REC transaction structure contains information about the transaction, such as the transaction header ID and the transaction type code. The following table shows type and value information for each argument.
Argument | Required / Optional | Type | Value |
---|---|---|---|
TRANSACTION_HEADER_ID | Internal use only | NUMBER(15) | Optional OUT parameter |
TRANSACTION_DATE_ENTERED | Optional | DATE | Defaults to the date placed in service. |
TRANSACTION_NAME | Optional | VARCHAR2(20) | Description of the transaction. This field is the Comments field in the Asset Workbench. |
MASS_REFERENCE_ID | Optional | NUMBER(15) | Identifies the concurrent request that invokes the transaction if it is part of a mass transaction. |
TRANSACTION_SUBTYPE | Optional | VARCHAR2(9) | Additional information about the transaction type. |
AMORTIZATION_START_DATE | Optional | DATE | Amortization start date. |
CALLING_INTERFACE | Optional | VARCHAR2(30) | Interface that calls the API. This field defaults to CUSTOM. |
DESC_FLEX | Optional | DESC_FLEX_ REC_ TYPE | Descriptive flexfield segments. |
WHO_INFO | Required | STANDARD_WHO_REC_TYPE | Standard Who columns. |
set serveroutput on declare l_book_type_code varchar2(15); l_src_asset_id number; l_dest_asset_id number; l_amount number; l_src_trans_rec FA_API_TYPES.trans_rec_type; l_dest_trans_rec FA_API_TYPES.trans_rec_type; l_return_status VARCHAR2(1); l_mesg_count number; l_mesg varchar2(4000); begin dbms_output.enable(1000000); FA_SRVR_MSG.Init_Server_Message; -- asset header info l_book_type_code := '&book'; l_src_asset_id := &src_asset_id; l_dest_asset_id := &dest_asset_id; l_amount := &amount; -- call the api FA_RESERVE_TRANSFER_PUB.do_reserve_transfer( -- 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 p_src_asset_id => l_src_asset_id, p_dest_asset_id => l_dest_asset_id, p_book_type_code => l_book_type_code, p_amount => l_amount, px_src_trans_rec => l_src_trans_rec, px_dest_trans_rec => l_dest_trans_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('TRX_REFERENCE_ID ' || to_char(l_src_trans_rec.trx_reference_id)); dbms_output.put_line('SRC_ASSET_ID ' || to_char(l_src_asset_id)); dbms_output.put_line('DEST_ASSET_ID ' || to_char(l_dest_asset_id)); end if; end; /