This document outlines the specifications and the methodology for using the various Commitment (Deposit) APIs. These APIs provide an extension to existing functionality of creating and manipulating deposits through the standard Oracle Receivables Transactions workbench.
You can access these APIs:
As standard PL/SQL servers-side routine calls
Through Forms, utilizing the capability of Forms6 to have a procedure as its underlying base table
The Commitment (Deposit) API provides the following basic functionality via different API calls:
Creates a commitment of type Deposit
Creates non-revenue sales credit for a deposit
To create a deposit, you can call the following PL/SQL APIs:
AR_DEPOSIT_API_PUB.Create_deposit: Creates a single deposit and completes it.
AR_DEPOSIT_API_PUB.insert_non_rev_salescredit: Creates nonrevenue sales credit for a deposit.
This routine is called to create a deposit for the transactions.
Only one owner can be assigned to a commitment.
This API routine has 8 output and 136 input parameters in total. Of the output parameters, the API returns CUSTOMER_TRX_ID , CUSTOMER_TRX_LINE_ID, and new TRX_NUMBER, if generated during deposit creation.
The following is the breakdown of the parameters:
Standard API parameters: 4
Deposit parameters: 132 + 2 (global descriptive flexfield parameter)
Standard API parameters: 3
Deposit parameters: 5
The input global descriptive flexfield parameter is a record of type global_attr_rec_type.
TYPE global_attr_rec_type IS RECORD( global_attribute_category VARCHAR2(30) default null, global_attribute1 VARCHAR2(150) default NULL, global_attribute2 VARCHAR2(150) DEFAULT NULL, global_attribute3 VARCHAR2(150) DEFAULT NULL, global_attribute4 VARCHAR2(150) DEFAULT NULL, global_attribute5 VARCHAR2(150) DEFAULT NULL, global_attribute6 VARCHAR2(150) DEFAULT NULL, global_attribute7 VARCHAR2(150) DEFAULT NULL, global_attribute8 VARCHAR2(150) DEFAULT NULL, global_attribute9 VARCHAR2(150) DEFAULT NULL, global_attribute10 VARCHAR2(150) DEFAULT NULL, global_attribute11 VARCHAR2(150) DEFAULT NULL, global_attribute12 VARCHAR2(150) DEFAULT NULL, global_attribute13 VARCHAR2(150) DEFAULT NULL, global_attribute14 VARCHAR2(150) DEFAULT NULL, global_attribute15 VARCHAR2(150) DEFAULT NULL, global_attribute16 VARCHAR2(150) DEFAULT NULL, global_attribute17 VARCHAR2(150) DEFAULT NULL, global_attribute18 VARCHAR2(150) DEFAULT NULL, global_attribute19 VARCHAR2(150) DEFAULT NULL, global_attribute20 VARCHAR2(150) DEFAULT NULL, global_attribute21 VARCHAR2(150) DEFAULT NULL, global_attribute22 VARCHAR2(150) DEFAULT NULL, global_attribute23 VARCHAR2(150) DEFAULT NULL, global_attribute24 VARCHAR2(150) DEFAULT NULL, global_attribute25 VARCHAR2(150) DEFAULT NULL, global_attribute26 VARCHAR2(150) DEFAULT NULL, global_attribute27 VARCHAR2(150) DEFAULT NULL, global_attribute28 VARCHAR2(150) DEFAULT NULL, global_attribute29 VARCHAR2(150) DEFAULT NULL, global_attribute30 VARCHAR2(150) DEFAULT NULL);
The following table lists standard API parameters that are common to all the routines in the Commitment (Deposit) API.
Note: If required parameters are not passed in a call to this API, then the call will fail. However, depending on the business scenario, you will have to pass in values for other parameters to successfully create the business object; otherwise, error messages will be reported.
Parameter | Type | Data-type | Required | Default Value | Description |
---|---|---|---|---|---|
p_api_version | IN | NUMBER | Yes | Used to compare version numbers of incoming calls to its current version number. Unexpected error is raised if version incompatibility exists. In the current version of the API, you should pass a value of 1.0 for this parameter. | |
p_init_msg_list | IN | VARCHAR2 | FND_API.G_FALSE | Allows API callers to request that the API does initialization of the message list on their behalf. | |
p_commit | IN | VARCHAR2 | FND_API.G_FALSE | Used by API callers to ask the API to commit on their behalf. | |
p_validation_level | IN | NUMBER | FND_API.G_VALID_LEVEL_FULL | Not to be used currently as this is a public API. | |
x_return_status | OUT | VARCHAR2 | Represents the API overall return status. | ||
x_msg_count | OUT | NUMBER | Number of messages in the API message list. | ||
x_msg_data | OUT | VARCHAR2 | This is the message in encoded format if x_msg_count=1. |
The following table lists the parameters that pertain specifically to the deposit.
Parameter | Type | Data-type | Required* | Description |
---|---|---|---|---|
p_deposit_number | IN | VARCHAR2 | The deposit number of the deposit to be created. Default: Null Validation: If AR_RA_BATCH_AUTO_NUM_FLAG set by batch source is true, then it is derived automatically; else it is required to be present. Error: AR_DAPI_DEPOSIT_NO_NULL |
|
p_deposit_date | IN | DATE | The deposit date of the entered deposit. Default: System date Validation: This field is mandatory. Error: None |
|
p_usr_currency_code | IN | VARCHAR2 | The translated currency code. Used to derive the p_currency_code if it is not entered. Default: None Validation: Should be a valid currency, so that the corresponding currency code can be derived. Error: AR_RAPI_USR_CURR_CODE_INVALID |
|
p_currency_code | IN | VARCHAR2 | The actual currency code that gets stored in AR tables. Default: Derived from p_usr_currency_code if entered, else defaults to the functional currency code. Validation: Validated against the currencies in FND_CURRENCIES table. Error: AR_RAPI_CURR_CODE_INVALID Warning: AR_RAPI_FUNC_CURR_DEFAULTED |
|
p_usr_exchange_rate_type | IN | VARCHAR2 | The translated exchange rate type. Used to derive the p_exchange_rate_type if it has not been entered. Default: None Validation: Should be a valid rate type. Error: AR_RAPI_USR_X_RATE_TYP_INVALID |
|
p_exchange_rate_type | IN | VARCHAR2 | Exchange rate type stored in AR tables. Default: In case of foreign currency receipt, the value is derived from p_usr_exchange_rate_type. If p_usr_exchange_rate_type is null, then the value defaults from the AR: Default Exchange Rate Type profile option. Validation: Validated against values in GL_DAILY_CONVERSION_TYPES table. Error: AR_RAPI_X_RATE_TYPE_INVALID |
|
p_exchange_rate | IN | NUMBER | The exchange rate between the receipt currency and the functional currency. Default: Derived from the Daily Rates table for rate_type <> User in case of nonfunctional currency. If Journals: Display Inverse Rate profile option = Y, set user-entered value to 1/ p_exchange_rate. The entered value is rounded to a precision of 38. Validation: In case of nonfunctional currency, the rate should have a positive value for rate type=User For nonfunctional currency and type is <> User, do not specify any value. Error: AR_RAPI_X_RATE_INVALID AR_RAPI_X_RATE_NULL |
|
p_exchange_rate_date | IN | DATE | The date on which the exchange rate is valid. Default: Receipt date Validation: For a nonfunctional currency and type is <>User, there should be a valid rate existing in the database for this date. This is a cross validation of type, currency, and date. Error: AR_NO_RATE_DATA_FOUND |
|
p_batch_source_id | IN | NUMBER | Batch source identifier for the commitment. Default: Same as ar_ra_batch_source profile option. Validation: It should be a valid batch source and it should exist in the database. This field is mandatory if not defined in profile option. Error: AR_DAPI_BS_NAME_INVALID AR_DAPI_BS_NAME_IGN AR_DAPI_BS_ID_INVALID |
|
p_batch_source_name | IN | VARCHAR2 | Batch source name for the commitment. Default: Same as ar_ra_batch_source_name profile option. Validation: It should be a valid batch source and it should exist in the database. Error: AR_DAPI_BS_NAME_INVALID AR_DAPI_BS_NAME_IGN AR_DAPI_BS_ID_INVALID |
|
p_cust_trx_type_id | IN | NUMBER | Transaction Type identifier. Default: Based on the value of batch source Validation: It should be a valid transaction type. This field is mandatory. Error: AR_DAPI_TRANS_TYPE_INVALID AR_RAPI_TRANS_TYPE_IGN AR_DAPI_TRANS_TYPE_ID_INVALID |
|
p_cust_trx_type | IN | VARCHAR2 | Transaction Type name. Default: Based on the value of batch source Validation: It should be a valid transaction type. Error: AR_DAPI_TRANS_TYPE_INVALID AR_RAPI_TRANS_TYPE_IGN AR_DAPI_TRANS_TYPE_ID_INVALID |
|
p_class | IN | VARCHAR2 | Constant value = DEP. Keeping as an input for a future enhancement. | |
p_gl_date | IN | DATE | Date that this deposit will be posted to the general ledger. Default: Gets defaulted to the current date if it is a valid gl_date, otherwise:
Validation: The gl date is valid if the following conditions are true:
Error: AR_INVALID_APP_GL_DATE |
|
p_bill_to_customer_id | IN | NUMBER | The CUSTOMER_ID for the bill-to customer. Default: Defaulted from customer name/number. If all name, number, and ID are null, then it is same as ship-to CUSTOMER_ID. Validation: Customer exists and has prospect code = CUSTOMER. Customer has a profile defined at the customer level. Either bill-to or ship-to customer must exist. Error: AR_RAPI_CUST_ID_INVALID AR_RAPI_CUS_NAME_INVALID AR_RAPI_CUS_NUM_INVALID AR_RAPI_CUS_NAME_NUM_INVALID AR_RAPI_CUS_NAME_NUM_IGN AR_DAPI_BILL_OR_SHIP_CUST_REQ |
|
p_bill_to_customer_name | IN | VARCHAR2 | The name for the entered customer. Used to default the customer ID if not specified. Default: None Validation: None Error: AR_RAPI_CUS_NAME_INVALID |
|
p_bill_to_customer_number | IN | VARCHAR2 | The number for the entered customer. Used to default the customer ID if not specified. Default: None Validation: None Error: AR_RAPI_CUS_NAME_INVALID |
|
p_bill_to_location | IN | VARCHAR2 | The location for the bill-to customer. Default: Defaulted from the primary bill-to customer location, if defined. Otherwise, null. Validation: This field is mandatory. Error: AR_DAPI_CUS_LOC_INVALID |
|
p_bill_to_contact_id | IN | NUMBER | The contact identifier for the bill-to customer. Default: Defaulted from the bill-to customer site level, then customer level, if defined. Otherwise, null. Validation: Yes Error: AR_DAPI_BIll_CONTACT_NAME_INV AR_DAPI_CUS_CONTACT_INVALID |
|
p_bill_to_contact_first_name | IN | VARCHAR2 | The first name of contact for the bill-to customer. Default: Defaulted from bill-to customer site level, then customer level, if defined. Otherwise, null. Validation: This field is mandatory. Error: AR_DAPI_BIll_CONTACT_NAME_INV AR_DAPI_CUS_CONTACT_INVALID |
|
p_bill_to_contact_last_name | IN | VARCHAR2 | The last name of contact for the bill-to customer. Default: Defaulted from bill-to customer site level, then customer level, if defined. Otherwise, null. Validation: This field is mandatory. Error: AR_DAPI_BIll_CONTACT_NAME_INV AR_DAPI_CUS_CONTACT_INVALID |
|
p_ship_to_customer_id | IN | NUMBER | The CUSTOMER_ID for the ship-to customer. Default: Defaulted from customer name/number. Null otherwise. Validation: Customer exists and has prospect code = CUSTOMER. Customer has a profile defined at the customer level. Either bill-to or ship-to customer must exist. Error: AR_RAPI_CUST_ID_INVALID AR_RAPI_CUS_NAME_INVALID AR_RAPI_CUS_NUM_INVALID AR_RAPI_CUS_NAME_NUM_INVALID AR_RAPI_CUS_NAME_NUM_IGN AR_DAPI_BILL_OR_SHIP_CUST_REQ |
|
p_ship_to_customer_name | IN | VARCHAR2 | The name for the entered customer. Used to default the customer ID, if not specified. Default: None Validation: None Error: AR_RAPI_CUS_NAME_INVALID |
|
p_ship_to_customer_number | IN | VARCHAR2 | The number for the entered customer. Used to default the customer ID, if not specified. Default: None Validation: None Error: AR_RAPI_CUS_NAME_INVALID |
|
p_ship_to_location | IN | VARCHAR2 | The location for the bill-to customer. Default: Defaulted from primary bill-to customer location, if defined. Otherwise, null. Validation: This field is mandatory. Error: AR_DAPI_CUS_LOC_INVALID |
|
p_ship_to_contact_id | IN | NUMBER | The contact identifier for the bill-to customer. Default: Defaulted from bill-to customer site level, then from customer level, if it is defined. If not defined, then it is not defaulted. Validation: Yes Error: AR_DAPI_BIll_CONTACT_NAME_INV AR_DAPI_CUS_CONTACT_INVALID |
|
p_ship_to_contact_first_name | IN | VARCHAR2 | The first name of contact for the bill-to customer. Default: Defaulted from bill-to customer site level, then customer level, if defined. Otherwise, null. Validation: This field is mandatory. Error: AR_DAPI_BIll_CONTACT_NAME_INV AR_DAPI_CUS_CONTACT_INVALID |
|
p_ship_to_contact_last_name | IN | VARCHAR2 | The last name of contact for the bill-to customer. Default: Defaulted from bill-to customer site level, then customer level, if defined. Otherwise, null. Validation: This field is mandatory. Error: AR_DAPI_BIll_CONTACT_NAME_INV AR_DAPI_CUS_CONTACT_INVALID |
|
p_term_id | IN | NUMBER | Payment terms identifier for the transactions. You can override payment terms. Default: Following hierarchy is used to default payment terms:
Validation: It should be a valid payment term. Error: AR_DAPI_TERM_NAME_INVALID AR_DAPI_TERM_ID_INVALID |
|
p_term_name | IN | VARCHAR2 | Payment terms name for the transactions. You can override payment terms. Default: Following hierarchy is used to default payment terms name:
Validation: It should be a valid payment term. Error: AR_DAPI_TERM_NAME_INVALID AR_DAPI_TERM_ID_INVALID |
|
p_salesrep_id | IN | NUMBER | Salesperson identifier for the transactions. You can override salesperson. Default: Default the primary ID from the bill-to customer. If salescredits are required and no ID is defaulted from the bill-to customer, then p_salesrep_id is set to -3, which means "No sales credit". Validation: It should be a valid salesperson in the system. Error: AR_DAPI_SALESREP_NAME_INVALID AR_DAPI_SALESREP_ID_INVALID |
|
p_salesrep_name | IN | VARCHAR2 | Salesperson name for the transactions. You can override salesperson. Default: Default the primary from the bill-to customer. If salescredits are required and no salesperson is defaulted from the bill-to customer, then p_salesrep_name is set to -3, which means "No sales credit". Validation: It should be a valid salesperson in the system. Error: AR_DAPI_SALESREP_NAME_INVALID AR_DAPI_SALESREP_ID_INVALID |
|
p_interface_header_context | IN | VARCHAR2 | Interface header context. Default: Null Validation: Null Error: Null |
|
p_interface_header_attribute1 to p_interface_header_attribute15 | IN | VARCHAR2 | Interface header attribute value Default: Null Validation: Null Error: Null |
|
p_attribute_category | IN | VARCHAR2 | Descriptive Flexfield structure defining column. Default: Null Validation: It should be a valid structure. Error: Null |
|
p_attribute1 to p_attribute15 | IN | VARCHAR2 | Descriptive Flexfield segment column. Default: Null Validation: It should be a valid segment. Error: Validate_Desc_Flexfield |
|
p_global_attr_cust_rec | IN | global_ attr_rec_ type | This is a record type that contains all the 25 global descriptive flexfield segments and one global descriptive flexfield structure defining column. Default: None Validation: None Error: |
|
p_document_number | IN | NUMBER | Value assigned to document receipt. Default: Null. Validation: User should not pass the value if the current document sequence is automatic. Document sequence value should not be entered if the Sequential Numbering profile option is set to Not Used. Error: AR_RAPI_DOC_SEQ_AUTOMATIC AR_RAPI_DOC_SEQ_NOT_EXIST_A AR_RAPI_DOC_SEQ_NOT_EXIST_P |
|
p_ussgl_transaction_code | IN | VARCHAR2 | Code defined by public sector accounting. Default: None Validation: None Error: None |
|
p_printing_option | IN | VARCHAR2 | Printing option for the invoice. Default: Default is print option of transaction type. Validation: Can be 'PRI' or 'NOT' Error: AR_DAPI_PO_INVALID |
|
p_default_tax_exempt_flag | IN | VARCHAR2 | Tax exempt flag. You can enter value for the field only if the TAX: Allow Override of Customer Exception profile option is yes. Default: 'S' i.e. Standard Validation: From lookup table for lookup_type = 'TAX_CONTROL_FLAG' Error: AR_DAPI_STATUS_TRX_INVALID |
|
p_status_trx | IN | VARCHAR2 | Status of the transaction. This is a user-maintainable field and it can be defined in lookup table. Default: OP, can be CL, PEN, VD Validation: from lookup table for LOOKUP_TYPE = 'INVOICE_TRX_STATUS' Error: AR_DAPI_STATUS_TRX_INVALID |
|
p_financial_charges | IN | VARCHAR2 | Indicates whether financial charges are calculated. Default: Null Validation: can be null, Y, N Error: AR_DAPI_FC_INVALID |
|
p_agreement_id | IN | NUMBER | Agreement associated with transaction for the customer. Default: Null Validation: Null Error: Null |
|
p_special_instructions | IN | VARCHAR2 | Any special instruction for the transaction, up to 240 characters. Default: Null Validation: Null Error: Null |
|
p_comments | User's comments. | |||
p_purchase_order | IN | VARCHAR2 | Purchase order number. Default: Null Validation: Null Error: Null |
|
p_purchase_order_revision | IN | VARCHAR2 | Purchase order revision number. Default: Null Validation: Null Error: Null |
|
p_purchase_order_date | IN | DATE | Purchase order date. Default: Null Validation: Null Error: Null |
|
p_remit_to_address_id | IN | NUMBER | Remit-to address ID for the customer Default: Remit_to_address assigned to country, state, and postal code combination for the customer's address. Validate from the view: AR_ACTIVE_REMIT_TO_ADDRESSES_V Error: AR_DAPI_LOC_SITE_NUM_IGN AR_DAPI_REMIT_ADDR_ID_INVD |
|
p_sold_to_customer_id | IN | NUMBER | The customer_id for the sold-to customer. Default: Bill_to_customer_id Validation:
Error: AR_DAPI_SOLD_CUST_COM_INVALID AR_DAPI_SOLD_CUS_IGN AR_DAPI_SOLD_CUST_ID_INVALID |
|
p_sold_to_customer_name | IN | VARCHAR2 | The name for the entered/defaulted sold-to customer. Default: none Validation:
Error: AR_DAPI_SOLD_CUST_NAME_INVALID AR_DAPI_SOLD_CUST_COM_INVALID |
|
p_sold_to_customer_number | IN | VARCHAR2 | The number for the entered/defaulted sold-to customer. Default: None Validation: Customer exists and has prospect code = CUSTOMER. Customer has a profile defined at customer level. Either bill-to or ship-to customer must exist. Error: AR_DAPI_SOLD_CUST_NUM_INVALID AR_DAPI_SOLD_CUST_COM_INVALID |
|
p_paying_customer_id | The customer_id associated with the customer bank account assigned to your transaction. Default: Same as bill-to customer Validation: Customer exists and has prospect code = CUSTOMER. Customer has a profile defined at customer level. Either bill-to or ship-to customer must exist. Error: AR_DAPI_CUS_NAME_NUM_IGN AR_DAPI_PAY_CUST_ID_INVALID |
|||
p_paying_customer_name | The name for the entered/defaulted paying customer. Default: None Validation: Customer exists and has prospect code = CUSTOMER. Customer has a profile defined at customer level. Either bill-to or ship-to customer must exist. Error: AR_DAPI_PAY_CUST_NAME_INVALID AR_DAPI_PAY_CUST_COM_INVALID |
|||
p_paying_customer_number | The number for the entered/defaulted paying customer. Default: None Validation: Customer exists and has prospect code = CUSTOMER. Customer has a profile defined at customer level. Either bill-to or ship-to customer must exist. Error: AR_DAPI_PAY_CUST_NUM_INVALID AR_DAPI_PAY_CUST_COM_INVALID |
|||
p_paying_location | The location for the paying customer. Default: Null Validation: This field is mandatory. Error: AR_DAPI_CUS_LOC_INVALID |
|||
p_receipt_method_id | IN | NUMBER | Identifies the receipt method of the transactions. Default: From receipt method name. Validation: Validation detailed in Example. Error: AR_RAPI_RCPT_MD_NAME_IGN AR_RAPI_RCPT_MD_ID_INVALID |
|
p_receipt_method_name | IN | VARCHAR2 | The receipt method name of the transactions. Default: None Validation: None Error: AR_RAPI_RCPT_MD_NAME_INVALID |
|
p_cust_bank_account_id | IN | NUMBER | Customer bank account identifier. Default: None Validation: From AP_BANK_ACCOUNTS table. Error: AR_RAPI_CUS_BK_NAME_NUM_IGN AR_RAPI_CUS_BK_AC_ID_INVALID |
|
p_cust_bank_account_name | IN | VARCHAR2 | Customer bank account name. Default: None Validation: From AP_BANK_ACCOUNTS table. Error: AR_RAPI_CUS_BK_AC_NAME_INVALID AR_RAPI_CUS_BK_AC_2_INVALID |
|
p_cust_bank_account_number | IN | VARCHAR2 | Customer bank account number. Default: None Validation: From AP_BANK_ACCOUNTS table. Error: AR_RAPI_CUS_BK_AC_NUM_INVALID AR_RAPI_CUS_BK_AC_2_INVALID |
|
p_start_date_commitment | IN | DATE | Start date of commitment. Default: Sysdate Validation: Based on end date, etc. Error: AR_TW_BAD_COMMITMT_DATE_RANGE AR_TW_COMMIT_END_TRX_DATE AR_TW_BAD_DATE_COMMITMENT |
|
p_end_date_commitment | IN | DATE | End date of commitment. Default: Null Validation: Based on start date, etc. Error: AR_TW_BAD_COMMITMT_DATE_RANGE AR_TW_COMMIT_END_TRX_DATE AR_TW_BAD_DATE_COMMITMENT |
|
p_amount | IN | NUMBER | Deposit amount. Default: Cannot be negative. Validation: Based on start date, etc. This field is mandatory. Error: AR_DAPI_COMM_AMOUNT_NULL AR_TW_COMMIT_AMOUNT_NEGATIVE |
|
p_inventory_id | IN | NUMBER | Item ID of commitment. You can enter memo or item ID. Default: Null Validation: Based on MTL_SYSTEM_ITEMS_B table. Error: AR_DAPI_INV_ID_INVALID AR_DAPI_INV_MEMO_COM |
|
p_memo_line_id | IN | NUMBER | Memo line ID. You can enter memo or item ID. Default: Null Validation: Based on AR_MEMO_LINES table. Error: AR_DAPI_MEMO_NAME_INVALID AR_DAPI_MEMO_WRG AR_DAPI_INV_MEMO_COM |
|
p_memo_line_name | IN | VARCHAR2 | Deposit amount. Default: Null Validation: Based on AR_MEMO_LINES table. Error: AR_DAPI_MEMO_NAME_INVALID AR_DAPI_MEMO_WRG |
|
p_description | IN | VARCHAR2 | Description of deposit. Default: Null Validation: Null Error: Null |
|
p_comm_interface_line_ context | IN | VARCHAR2 | Interface line context for deposit. Default: Null Validation: Null Error: Null |
|
p_comm_interface_line_ attr1 to p_comm_interface_line_ attr15 | IN | VARCHAR2 | NULL | Interface line attribute value for deposit. Default: Null Validation: Null Error: Null |
p_comm_attr_category | IN | VARCHAR2 | NULL | Descriptive Flexfield structure defining column for deposit lines. Default: Null Validation: It should be a valid structure. Error: Null |
p_comm_attr1 to p_comm_attr15 | IN | VARCHAR2 | NULL | Descriptive Flexfield segment column for deposit lines. Default: Null Validation: It should be a valid segment. Error: Validate_Desc_Flexfield |
p_global_attr_cust_lines_ rec | IN | global_attr_rec_type | NULL | This is a record type that contains all the 25 global descriptive flexfield segments for deposit lines and one global descriptive flexfield structure defining column. Default: None Validation: None Error: None |
p_owner_id | IN | NUMBER | Null | ID of the commitment owner. Default: None Validation: Yes (same as customer contact). Error: N/A |
p_owners_name | IN | NUMBER | Null | Name of the commitment owner. Default: None Validation: Yes (same as customer contact) Error: N/A |
X_new_trx_number | OUT | VARCHAR2 | New transaction number, if generated. | |
X_new_customer_trx_id | OUT | VARCHAR2 | New CUSTOMER_TRX_ID of the deposit created. | |
X_new_customer_trx_line_ id | OUT | VARCHAR2 | New CUSTOMER_TRX_LINE_ID of the deposit created. | |
X_new_rowid | OUT | VARCHAR2 | Row ID of the deposit created. | |
X_new_status | OUT | VARCHAR2 | Status of the deposit created. |
Objective:
To create a deposit using a call to ar_deposit_api_pub.Create_deposit and passing a minimum number of Input parameters.
Entered parameters:
p_api_version =1.0 , p_init_msg_list ='F' , p_deposit_number = 'Your Deposit Number' p_deposit_date = sysdate, p_currency_code ='USD', p_batch_source_id = Choose a Valid Batch source ID p_cust_trx_type_id = Choose a Valid Transaction Type ID of class "Deposit' p_class ='DEP' i.e. Depsoit p_bill_to_customer_number = Choose a Valid Customer Number p_start_date_commitment = sysdate p_amount = Choose deposit Amount p_description = Your Deposit Description
Before calling the APIs you should set up the application, responsibility and the user in the context of Oracle Applications by calling the following FND API.
fnd_global.apps_initialize ( user_id =>'Your user id', resp_id => 'Your Responsibility id', resp_appl_id => 'Your Application id');
For example:
fnd_global.apps_initialize ( user_id => 1318, resp_id => 50559, resp_appl_id => 222);
The API call in this case would be:
DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; l_msg_data VARCHAR2(240); l_count NUMBER; l_new_trx_number ra_customer_trx.trx_number%type; l_new_customer_trx_id ra_customer_trx.customer_trx_id%type; l_new_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type; l_new_rowid VARCHAR2(240); l_new_status VARCHAR2(240); BEGIN fnd_global.apps_initialize ( user_id => 1318, resp_id => 50559, resp_appl_id => 222); ar_deposit_api_pub.CREATE_DEPOSIT(
Standard API parameters.
p_api_version => 1.0, p_init_msg_list => FND_API.G_TRUE, p_commit => FND_API.G_TRUE, p_validation_level => FND_API.G_VALID_LEVEL_FULL, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data, p_deposit_number => 'dapi_'||userenv('SESSIONID'), p_deposit_date => sysdate, p_currency_code => 'USD', p_batch_source_id => 'Choose a Valid Batch source ID', p_cust_trx_type_id => 'Choose a Valid Transaction Type ID of class Deposit', p_class => 'DEP' , p_bill_to_customer_number => 'Choose a Valid Customer Number', p_start_date_commitment => sysdate, p_amount => 'Choose deposit Amount', p_description => 'Your Deposit Description', X_new_trx_number =>l_new_trx_number, X_new_customer_trx_id =>l_new_customer_trx_id, X_new_customer_trx_line_id =>l_new_customer_trx_line_id, X_new_rowid =>l_new_rowid, X_new_status =>l_new_status ) ; IF l_msg_count = 1 Then
There is one message raised by the API, so it has been sent out.
In the parameter x_msg_data, get it.
dbms_output.put_line('l_msg_data '||l_msg_data); ELSIF l_msg_count > 1 Then
The messages on the stack are more than one, so call them in a loop.
And print the messages.
LOOP IF nvl(l_count,0) < l_msg_count THEN l_count := nvl(l_count,0) +1 ; l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE); IF l_count = 1 THEN dbms_output.put_line('l_msg_data 1 '||l_msg_data); ELSIF l_count = 2 THEN dbms_output.put_line('l_msg_data 2 '||l_msg_data); ELSIF l_count = 3 THEN dbms_output.put_line('l_msg_data 3 '||l_msg_data); ELSIF l_count = 4 THEN dbms_output.put_line('l_msg_data 4 '||l_msg_data); ELSIF l_count = 5 THEN dbms_output.put_line('l_msg_data 5 '||l_msg_data); ELSIF l_count = 6 THEN dbms_output.put_line('l_msg_data 6 '||l_msg_data); END IF; dbms_output.put_line('l_msg_data '||to_char(l_count)||': '||l_msg_data); ELSE EXIT; END IF; END LOOP; END IF; Commit; END;
Depending on the message level threshold set the profile option FND_API_MSG_LEVEL_THRESHOLD, the messages put on the message stack may contain both the error messages and the warnings.
This routine is called to assign nonrevenue sales credit to salespersons for a deposit. You can create as many of the nonrevenue credit assignments as you need.
This API routine has 4 output and 22 input parameters in total.
The following is the breakdown of the parameters:
Standard API parameters: 4
Owners parameters: 22
Standard API parameters: 3
Owners parameters: 0
The following table lists the API parameters.
Parameter | Type | Data-type | Required | Default Value | Description |
---|---|---|---|---|---|
p_api_version | IN | NUMBER | Yes | Used to compare version numbers of incoming calls to its current version number. Unexpected error is raised if version incompatibility exists. In the current version of the API, you should pass in a value of 1.0 for this parameter. | |
p_init_msg_list | IN | VARCHAR2 | FND_API.G_FALSE | Allows API callers to request that the API does initialization of the message list on their behalf. | |
p_commit | IN | VARCHAR2 | FND_API.G_FALSE | Used by API callers to ask the API to commit on their behalf. | |
p_validation_level | IN | NUMBER | FND_API.G_VALID_LEVEL_FULL | Not to be used currently as this is a public API. | |
x_return_status | OUT | VARCHAR2 | Represents the API overall return status. | ||
x_msg_count | OUT | NUMBER | Number of messages in the API message list. | ||
x_msg_data | OUT | VARCHAR2 | This is the message in encoded format if x_msg_count=1. |
The following table lists the parameters relevant to the deposit.
Parameter | Type | Data-type | Required | Description |
---|---|---|---|---|
p_deposit_number | IN | VARCHAR2 | Null | Deposit number, same as trx_number for the transaction number. Default: None Validation: Yes Error: N/A |
p_customer_trx_id | IN | NUMBER | Customer_trx_id of the deposit created. Default: None Validation: Yes Error: N/A |
|
p_salesrep_number | IN | NUMBER | Null | Salesperson number. Default: None Validation: Yes (same as customer contact). Error: N/A |
p_salesrep_id | IN | NUMBER | Salesrep_id of the salesperson. Default: None Validation: Yes Error: N/A |
|
p_non_revenue_amount_split | IN | NUMBER | Nonrevenue credit amount associated with salesperson. Default: None Validation: Yes Error: N/A |
|
p_non_revenue_percent_split | IN | NUMBER | Nonrevenue credit percent associated with salesperson. Default: None Validation: Yes Error: N/A |
|
p_attribute_category | IN | VARCHAR2 | Descriptive Flexfield structure defining column. Default: Null Validation: It should be a valid structure. Error: Null |
|
p_attribute1 to p_attribute15 | IN | VARCHAR2 | Descriptive Flexfield segment column. Default: Null Validation: It should be a valid segment. Error: Validate_Desc_Flexfield |
Objective:
To create owner assignment using ar_deposit_api_pub. insert_non_rev_salescredit and passing a minimum number of Input parameters.
Entered parameters:
p_api_version => 1.0 , p_init_msg_list => 'F', ,p_customer_trx_id => 'Valid Customer Trx ID, Must be a deposit' ,p_salesrep_id => -3 , means no Sales Rep p_non_revenue_percent_split => 300
Before calling the APIs you should set up the application, responsibility and the user in the context of Oracle Application by calling the following FND API.
fnd_global.apps_initialize ( user_id =>'Your user id', resp_id => 'Your Responsibility id', resp_appl_id => 'Your Application id');
For example:
fnd_global.apps_initialize ( user_id => 1318, resp_id => 50559, resp_appl_id => 222);
The API call in this case would be:
DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; l_msg_data VARCHAR2(240); l_count NUMBER; BEGIN fnd_global.apps_initialize ( user_id => 1318, resp_id => 50559, resp_appl_id => 222); ar_deposit_api_pub.insert_non_rev_salescredit(
Standard API parameters.
p_api_version => 1.0, p_init_msg_list => FND_API.G_TRUE, p_commit => FND_API.G_TRUE, p_validation_level => FND_API.G_VALID_LEVEL_FULL, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data, p_customer_trx_id => ' Valid Customer Trx ID , Must be a deposit', p_salesrep_id => -3, p_non_revenue_amount_split => 300); dbms_output.put_line('return status '||l_return_status); dbms_output.put_line('l_msg_count '||to_char(l_msg_count)); IF l_msg_count = 1 Then
There is one message raised by the API, so it has been sent out.
In the parameter x_msg_data, get it.
dbms_output.put_line('l_msg_data '||l_msg_data); ELSIF l_msg_count > 1 Then
The messages on the stack are more than one, so call them in a loop.
And print the messages.
LOOP IF nvl(l_count,0) < l_msg_count THEN l_count := nvl(l_count,0) +1 ; l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE); IF l_count = 1 THEN dbms_output.put_line('l_msg_data 1 '||l_msg_data); ELSIF l_count = 2 THEN dbms_output.put_line('l_msg_data 2 '||l_msg_data); ELSIF l_count = 3 THEN dbms_output.put_line('l_msg_data 3 '||l_msg_data); ELSIF l_count = 4 THEN dbms_output.put_line('l_msg_data 4 '||l_msg_data); ELSIF l_count = 5 THEN dbms_output.put_line('l_msg_data 5 '||l_msg_data); ELSIF l_count = 6 THEN dbms_output.put_line('l_msg_data 6 '||l_msg_data); END IF; dbms_output.put_line('l_msg_data '||to_char(l_count)||': '||l_msg_data); ELSE EXIT; END IF; END LOOP; END IF; Commit; END;
Depending on the message level threshold set the profile option FND_API_MSG_LEVEL_THRESHOLD, the messages put on the message stack may contain both the error messages and the warnings.
Messages play an important role in the effectiveness of your API calls. The right message is raised at the right point to convey to you the exact error that has occurred or any warnings that have been raised.
In the Commitment (Deposit) API, all error messages and warnings raised during the execution are put on the message stack and can be retrieved by the user as described in Exception Handling and Result Messages.
The following table contains the list of all the error messages raised by the Commitment (Deposit) API.
Message Number | Message Code | Message Text | Type |
---|---|---|---|
294849 | AR_DAPI_COMM_AMOUNT_NULL | The commitment amount requires a value. | E |
294850 | AR_DAPI_CUS_LOC_INVALID | The customer location is invalid. | E |
294851 | AR_DAPI_CUS_SITE_DFT_INVALID | The customer site use ID could not be defaulted. | E |
294852 | AR_DAPI_CUS_CONTACT_INVALID | The customer contact is invalid. | E |
294853 | AR_DAPI_CUST_NULL | A value for the customer ID, name, or number is required. | E |
294854 | AR_DAPI_COMM_BATCH_INVALID | The batch name or ID is invalid. | E |
294855 | AR_DAPI_TRANS_TYPE_ID_INVALID | The transaction type ID is invalid. | E |
294856 | AR_DAPI_TRANS_TYPE_INVALID | The transaction type is invalid. | E |
294857 | AR_DAPI_TERM_NAME_INVALID | The term name is invalid. | E |
294858 | AR_DAPI_TERM_ID_INVALID | The term ID is invalid. | E |
294859 | AR_DAPI_SALESREP_NAME_INVALID | The sales representative name is invalid. | E |
294860 | AR_DAPI_SALESREP_ID_INVALID | The sales representative ID is invalid. | E |
294861 | AR_DAPI_BS_NAME_INVALID | The batch source name is invalid. | E |
294862 | AR_DAPI_BS_ID_INVALID | The batch source ID is invalid. | E |
AR_DAPI_BS_NAME_IGN | The batch source name has been ignored. | W | |
294863 | AR_DAPI_SOLD_CUST_NAME_INVALID | The sold-to customer name is invalid. | E |
294864 | AR_DAPI_SOLD_CUST_COM_INVALID | The combination of sold-to customer name and number must be valid. | E |
294865 | AR_DAPI_PAY_CUST_NAME_INVALID | The paying customer name is invalid. | E |
AR_DAPI_SOLD_CUST_DFT | The sold-to customer defaulted to the bill-to customer. | W | |
294866 | AR_DAPI_PAY_CUST_COM_INVALID | The combination of paying customer name and number must be valid. | E |
294867 | AR_DAPI_PAY_CUST_NUM_INVALID | The paying customer number is invalid. | E |
AR_DAPI_CUS_NAME_NUM_IGN | The paying customer name and number have been ignored. | W | |
294868 | AR_DAPI_PAY_CUST_ID_INVALID | The paying customer ID is invalid. | E |
294869 | AR_DAPI_SOLD_CUST_ID_INVALID | The sold-to customer ID is invalid. | E |
AR_DAPI_SOLD_CUS_IGN | The sold-to customer name and number have been ignored. | W | |
AR_DAPI_PO_INVALID | The printing option is invalid. | E | |
294871 | AR_DAPI_STATUS_TRX_INVALID | The transaction status is invalid. | E |
294872 | AR_DAPI_TAX_FLAG_INVALID | The default tax flag is invalid. | E |
AR_DAPI_NO_BATCH | A batch or a batch in the profile is required. | E | |
294874 | AR_DAPI_MEMO_NAME_INVALID | The memo name is invalid. | E |
AR_DAPI_MEMO_WRG | The memo ID, not the provided memo name, has been used. | W | |
AR_DAPI_TRANS_TYPE_IGN | The type ID, not the provided type, has been used. | W | |
AR_DAPI_INV_ID_INVALID | The inventory item ID is invalid. | E | |
AR_DAPI_INV_MEMO_COM | Enter either a memo or inventory item ID. | E | |
294877 | AR_DAPI_BILL_OR_SHIP_CUST_REQ | A bill-to or ship-to customer is required. | E |
294878 | AR_DAPI_BILL_CONTACT_NAME_INV | Both a first and last name are required for the bill-to contact. | E |
294879 | AR_DAPI_SHIP_CONTACT_NAME_INV | Both a first and last name are required for the ship-to contact. | E |
AR_DAPI_DEPOSIT_NO_NULL | A deposit number is required. | E | |
294881 | AR_DAPI_FC_INVALID | The finance charges are invalid. | E |
AR_DAPI_LOC_SITE_NUM_IGN | The location site number has been ignored. | W | |
294882 | AR_DAPI_REMIT_ADDR_ID_INVD | The remit-to address ID is invalid. | E |
294883 | AR_DAPI_CUST_LOC_SITE_NUM_INV | The customer location site number is invalid. | E |
294884 | AR_DAPI_REMIT_ADDRESS_DFT_ERR | The remit-to address did not successfully default. | E |
294885 | AR_DAPI_TRANS_TYPE_NULL | A value for either the transaction type or ID is required. | E |
294886 | AR_DAPI_BIll_CONTACT_COM_INV | The combination of the bill-to contact's first and last name must be valid. | E |
294887 | AR_DAPI_SHIP_CONTACT_COM_INV | The combination of the ship-to contact's first and last name must be valid. | E |
294888 | AR_DAPI_POST_COMMIT_ST | The deposit did not successfully post. | E |
294889 | AR_DAPI_INSERT_HEADER_ST | The header was not successfully inserted for the deposit. | E |
AR_DAPI_BILL_VAL_SHIP_IGN | The bill-to customer was defaulted from the ship-to customer because a value for the bill-to customer did not exist. | W | |
294890 | AR_DAPI_LOC_INV | The location is invalid. | E |
294891 | AR_DAPI_SALESREP_ST | The salesperson was not successfully inserted for the deposit. | E |
294892 | AR_DAPI_SALESREP_NO_ID_NAME | The salesperson ID and name are required. | E |
294893 | AR_DAPI_NON_REV_AMT_PCT | A percentage or amount of nonrevenue sales credit is required. | E |
294894 | AR_DAPI_DEP_NO_ID_REQ | A deposit number or customer transaction ID is required. | |
AR_DAPI_DEP_NO_ING | The deposit number has been ignored. | W | |
294895 | AR_DAPI_DEP_ID_INVALID | The customer transaction ID is invalid. | E |
294896 | AR_DAPI_DEP_NO_INVALID | The deposit number is invalid. | E |
AR_DAPI_REV_AMT_IGN | The nonrevenue sales credit amount has been ignored. | W |