Skip Headers

Oracle Receivables Reference Guide
Release 12.1
Part Number E13512-04
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

Receipt API User Notes

Overview

This document outlines the specifications and the methodology for using the various Receipt APIs. These APIs provide an extension to existing functionality of creating and manipulating receipts through standard AR Receipts forms and lockboxes.

You can access these APIs:

Basic Business Needs

The Receipt API provides the following basic functionality via different API calls:

Integration with Oracle Payments

The following table illustrates the integration between Oracle Payments and the Receipt API routines that create receipts:

Receipt API Routine Calls Oracle Payments?
Ar_receipt_api_pub.Create_cash No
Ar_receipt_api_pub.Create_and_apply Yes
Ar_receipt_api_pub.Create_misc No
Ar_receipt_api_pub.Create_apply_on_acc Yes

API Usage

To create, apply, unapply, or reverse a cash receipt, you can call the following PL/SQL APIs:

Ar_receipt_api_pub.Create_cash

This routine is called to create cash receipts for the payment received in the form of a check or cash. Cash receipts can be created as identified (with a customer) or as unidentified (without a customer).

Note: This routine does not call Oracle Payments directly. See Integration with Oracle Payments.

This API routine has 4 output and 47 input parameters in total. As one of the output parameters, the API returns the cash_receipt_id of the cash receipt created. The following is the breakdown of the parameters:

Input

Standard API parameters: 4

Cash Receipt parameters: 41 + 1 (descriptive flexfield parameter)

+ 1 (global descriptive flexfield parameter)

Output

Standard API parameters: 3

Cash Receipt parameters: 1

Parameter Descriptions

The input descriptive flexfield parameter is a record of type attribute_rec_type.

TYPE attribute_rec_type IS RECORD
    (p_attribute_category    IN VARCHAR2,
     p_attribute1            IN VARCHAR2,
     p_attribute2            IN VARCHAR2,
     p_attribute3            IN VARCHAR2,
     p_attribute4            IN VARCHAR2,
     p_attribute5            IN VARCHAR2,
     p_attribute6            IN VARCHAR2,
     p_attribute7            IN VARCHAR2,
     p_attribute8            IN VARCHAR2,
     p_attribute9            IN VARCHAR2,
     p_attribute10           IN VARCHAR2,
     p_attribute11           IN VARCHAR2,
     p_attribute12           IN VARCHAR2,
     p_attribute13           IN VARCHAR2,
     p_attribute14           IN VARCHAR2,
     p_attribute15           IN VARCHAR2);

The input global descriptive flexfield parameter is a record of type global_ attribute_rec_type.

TYPE global_attribute_rec_type IS RECORD
    (p_global_attribute_category     IN VARCHAR2,
     p_global_attribute1             IN VARCHAR2,
     p_global_attribute2             IN VARCHAR2,
     p_global_attribute3             IN VARCHAR2,
     p_global_attribute4             IN VARCHAR2,
     p_global_attribute5             IN VARCHAR2,
     p_global_attribute6             IN VARCHAR2,
     p_global_attribute7             IN VARCHAR2,
     p_global_attribute8             IN VARCHAR2,
     p_global_attribute9             IN VARCHAR2,
     p_global_attribute10           IN VARCHAR2,
     p_global_attribute11           IN VARCHAR2,
     p_global_attribute12           IN VARCHAR2,
     p_global_attribute13           IN VARCHAR2,
     p_global_attribute14           IN VARCHAR2,
     p_global_attribute15           IN VARCHAR2,
     p_global_attribute16           IN VARCHAR2,
     p_global_attribute17           IN VARCHAR2,
     p_global_attribute18           IN VARCHAR2,
     p_global_attribute19           IN VARCHAR2,
     p_global_attribute20           IN VARCHAR2);

The following table lists standard API parameters that are common to all the routines in the Receipt API.

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. Detailed in 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 cash receipt routine.

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 Description
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:
  1. Derived from p_usr_currency_code if entered, else

  2. 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:
  1. In case of foreign currency receipt, derived from p_usr_exchange_rate_type.

  2. In case of foreign currency receipt, defaults from profile option 'AR: Default Exchange Rate Type'


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:
  1. Derived from the Daily Rates table for rate_type <>'User' in case of non-functional currency

  2. If profile option Journals: Display Inverse Rate = 'Y', set user entered value to 1/ p_exchange_rate

  3. The entered value is rounded to a precision of 38.


Validation:
  1. In case of non-functional currency the rate should have a positive value for rate type= 'User'

  2. For non-functional 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 non-functional 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_amount IN NUMBER Yes The cash receipt amount.
Default: Null
Validation: >0
Error: AR_RAPI_REC_AMT_NEGATIVE AR_RAPI_RCPT_AMOUNT_NULL
p_factor_discount_amount IN NUMBER   The bank charges on the cash receipt.
Default: None
Validation:
  1. Bank charges not allowed if profile option AR: Create Bank Charges = 'No'.

  2. Bank charges not allowed if the receipt state, derived from the receipt class of the receipt method <> 'CLEARED'.

  3. If allowed then >=0


Error: AR_JG_BC_AMOUNT_NEGATIVE AR_BK_CH_NOT_ALLWD_IF_NOT_CLR
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be created.
Default: If not specified, the receipt number is defaulted from the document sequence value.
Validation: Receipt number should not be null.
Error: AR_RAPI_RCPT_NUM_NULL
p_receipt_date IN DATE   The receipt date of the entered cash receipt.
Default: System date
Validation: None
Error: None
p_gl_date IN DATE   Date that this receipt will be posted to the General Ledger.
Default: Gets defaulted to the receipt date if it is a valid gl_date.
Validation: The date is valid if the following conditions are true:
  • The date is in an Open or Future period

  • The period cannot be an Adjustment period


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE
p_maturity_date IN DATE   Receipt maturity date.
Default: Deposit date
Validation: >= p_receipt_date
Error: AR_RW_MAT_BEFORE_RCT_DATE
p_postmark_date IN DATE   The postmark date
Default: None
Validation: None
Error: None
p_customer_id IN NUMBER(15)   The customer_id for the paying customer.
Default: Defaulted from customer name/number
Validation:
  1. Customer exists and has prospect code = 'CUSTOMER'

  2. Customer has a profile defined at the customer level


Error: AR_RAPI_CUST_ID_INVALID
p_customer_name IN VARCHAR2(50)   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_customer_number IN     The customer number. Used to default the customer_id if not specified
Default: None
Validation: None
Error: AR_RAPI_CUS_NUM_INVALID
p_customer_bank_account_id IN NUMBER(15)   The customer bank account id.
Default: From bank account id/number
Validation:
  1. It must be a valid Bank Account of the paying customer

  2. The inactive date (if defined) of the Bank Account, should be greater than the receipt_date

  3. The receipt date has to be within the Start date and the End date of the Bank Account


Error: AR_RAPI_CUS_BK_AC_2_INVALID AR_RAPI_CUS_BK_AC_ID_INVALID
p_customer_bank_account_num IN VARCHAR2(30)   The customer bank account number. Used to default the customer bank account id, if not specified
Default: None
Validation: None
Error: None
p_customer_bank_account_name IN VARCHAR2(80)   The customer bank account name. Used to default the customer bank account id, if not specified
Default: None
Validation: None
Error: None
p_location IN VARCHAR2(40)   The Bill_To location for the customer. Used to derive the p_customer_site_use_id
Default: None
Validation: None
Error: AR_RAPI_CUS_LOC_INVALID
p_customer_site_use_id IN NUMBER(15)   The Bill_To site_use_id for the customer
Default:
  1. Defaulted from customer location, else

  2. Primary Bill_To customer site_use_id of the customer.


Validation: It should be a valid Bill_To site of the paying customer.
Error: AR_RAPI_CUS_SITE_USE_ID_INVALID
p_customer_receipt_reference IN VARCHAR2(30)   This column is used to store a customer receipt reference value supplied by the customer at the confirmation time.
Default: None
Validation: None
Error: None
p_override_remit_bank_account_flag IN VARCHAR2(1)   The flag value decides when the remittance bank account can be overridden by the remittance selection process.
Default: 'Y'
Validation: valid values 'Y' and 'N'
Error: AR_RAPI_INVALID_OR_REMIT_BK_AC
p_remittance_bank_account_id IN NUMBER(15)   Identifies the user's bank account for depositing the receipt.
Default:
  1. From remittance bank account number

  2. From the receipt method based on logic mentioned in Defaulting.


Validation: Validation logic detailed in Validation.
Error: AR_RAPI_REM_BK_AC_ID_INVALID AR_RAPI_REM_BK_AC_ID_NULL
p_remittance_bank_account_num IN VARCHAR2(30)   The remittance bank account number. Used to default the remittance bank account id if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NUM_INVALID
p_remittance_bank_account_name IN VARCHAR2(50)   The remittance bank account name. Used to default the remittance bank account id if not specified
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NAME_INVALID
p_deposit_date IN DATE   The deposit date.
Default: receipt date
Validation: None
Error: None
p_receipt_method_id IN NUMBER(15)   Identifies the receipt method of the receipt
Default: From receipt method name
Validation: Validation detailed in Validation
Error: AR_RAPI_INVALID_RCT_MD_ID
p_receipt_method_name IN VARCHAR2(30)   The receipt method name of the receipt. Used to default the receipt method id if not specified.
Default: None
Validation: None
Error: AR_RAPI_RCPT_MD_NAME_INVALID
p_doc_sequence_value IN NUMBER   Value assigned to document receipt.
Default: Detailed in Defaulting
Validation:
  • User should not pass in the value if the current document sequence is automatic.

  • Document sequence value should not be entered if profile option Sequential Numbering is set to Not Used


Error: AR_RAPI_DOC_SEQ_AUTOMATIC AR_RAPI_DOC_SEQ_VAL_INVALID
p_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_anticipated_clearing_date IN DATE   Date the receipt is expected to be cleared.
Default: None
Validation: >= gl_date
Error: AR_RW_EFFECTIVE_BEFORE_GL_DATE
p_event IN VARCHAR2   The event that resulted in the creation of the receipt. Currently used only by Bills Receivable.
Default: None
Validation: None
Error: None
p_called_from IN VARCHAR2(20)   This parameter is used to identify the calling routine. Currently used to identify only the 'BR_REMIT' program.
Default: None
Validation: None
Error: None
p_attribute_record IN attribute_rec_type (PL/SQL defined record type)   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_record IN global_attribute_rec_type   This is a record type which contains all the 20 global descriptive flexfield segments and one global descriptive flexfield structure defining column.
Default: None
Validation: None
Error:
p_comments IN VARCHAR2 (240)   User's comments
p_issuer_name IN VARCHAR2(50)   Issuer name of Notes Receivable (Asia Pacific Requirement)
Default: None
Validation: None
Error:
p_issue_date IN DATE   Date Notes receivable was issued (Asia Pacific Requirement)
Default: None
Validation: None
Error: None
p_issuer_bank_branch_id IN NUMBER(15)   Bank/ Branch issuing the Notes Receivable (Asia Pacific Requirement)
Default: None
Validation: None
Error: None
p_cr_id OUT NUMBER(15) Yes The cash receipt id of the receipt created by the API call.
p_default_site_use IN VARCHAR2 No Indicates if you want to default the site use from p_customer_site_use_id.
The default value is Y. Pass N to default nothing.
If the Require Billing Location for Receipts system option is selected, then no value is required here.
p_payment_trxn_extension_id       Payment transaction extension identifier
p_org_id        
p_installment IN NUMBER(15)   The installment (or term_sequence_number) of the debit item. Used in conjunction with customer_trx_id to derive the applied payment schedule id if not specified.
Default: 1, if only one installment exists for the debit item
Validation:
  1. >0;

  2. valid installment of transaction.

Validation

This section explains the validation mechanisms for the various parameters of this API which are relatively more complex and could not be explained in the Description column of the preceding table.

Validating Receipt Method ID

The receipt method ID is validated per the following conditions:

Validating Remittance Bank Account ID

A remittance bank account ID, which is associated with a particular receipt method, is validated after validating the receipt method ID. If the receipt method ID is invalid, then the validation for the remittance bank account ID is not completed. An error message raised for an invalid value is AR_RAPI_INVALID_REMIT_BK_AC_ID.

The remittance bank account ID must:

Validating for Duplicate Receipt

If the combination of the receipt_date, receipt_number, and amount on this receipt matches any existing receipts which have not been reversed, then the error message AR_RW_CASH_DUPLICATE_RECEIPT is raised.

Defaulting

This section explains the defaulting mechanisms for the various parameters of this API which are relatively more complex and could not be explained in the Description column of the preceding table.

Defaulting the Remittance Bank Account ID

In addition to being defaulted from the remittance bank account name and/or remittance bank account number, the remittance bank account identifier is defaulted from the receipt method that is specified for the cash receipt. If only one remittance bank account is associated with the specified receipt method that has the multi-currency flag = 'Y' or has same currency as the receipt currency, and the receipt date is within its start date and end date range, then that remittance bank account is used as the default value.

Example

Objective:

To create an identified cash receipt using a call to Ar_receipt_api_pub.Create_cash and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_init_msg_list FND_API.G_TRUE  
p_receipt_number 'aj_test_api_1'  
p_amount 1000  
p_receipt_method_id 1001  
p_customer_name 'Computer Service and Rentals'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_customer_id   1006
p_currency_code   USD
p_receipt_date   10-FEB-2000
p_gl_date   10-FEB-2000
p_deposit_date   10-FEB-2000
p_customer_site_use_id   1025
p_override_remit_bank_account_flag   'Y'
p_remittance_bank_account_id   10001
p_maturity_date   10-FEB-2000

The API call in this case would be:

Ar_receipt_api_pub.Create_cash(
     p_api_version       => 1.0,
     p_init_msg_list     => FND_API.G_TRUE,
     p_receipt_number    => 'aj_test_api_1',
     p_amount            => 1000,
     p_receipt_method_id => 1001,
     p_customer_name     => 'Computer Service and Rentals',
     p_cr_id             => l_cr_id,
     x_return_status     => l_return_status, 
     x_msg_count         => l_msg_count,
     x_msg_data          => l_msg_data);

The warnings and the error messages that the API puts on the message stack are retrieved after execution of this API by the calling program in the following manner:

  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.
   l_msg_data_out := 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 put the messages in a PL/SQL table.
     loop     
      count := count +1 ;
      l_mesg := FND_MSG_PUB.Get;
       If l_mesg  IS NULL Then
        EXIT;
      else
        Mesg_tbl(count).message := l_mesg;
      End if;
   end loop;
  END IF;

Depending on the message level threshold set by the profile option FND_API_MSG_LEVEL_THRESHOLD, the messages put on the message stack may contain both the error messages and the warnings.

Result:

We were able to create an identified cash receipt by specifying only six input parameters in our call to this API.

Similarly, without initializing the message stack (p_init_msg_list not passed and defaulted), you can create an unidentified cash receipt (without a customer) by passing only four input parameters to this API call.

Ar_receipt_api_pub.Apply

Call this routine to apply the cash receipts of a customer (identified cash receipt) to a debit item. This debit item could be of the same customer or related customer, or an unrelated customer, depending on the value of the Allow Payment of Unrelated Transactions system option. This API routine has 3 output and 34 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 28 + 1 (descriptive flexfield record parameters)

+ 1 (global descriptive flexfield record parameters)

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the parameters that pertain specifically to the Apply routine.

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 Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt which needs to be applied to a given debit item.
Default: None
Validation:
  1. Type must be 'CASH'

  2. Status must not be Reversed or Approved

  3. The receipt must not be Unidentified


Error: AR_RAPI_CASH_RCPT_ID_INVALID AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be applied. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_customer_trx_id IN NUMBER(15)   The customer_trx_id of the debit item to which the receipt is to be applied
Default: None
Validation: Detailed in Validation
Error: Detailed in Validation
p_trx_number IN VARCHAR2(20)   The trx_number of the debit item to which the receipt is to be applied. Used to default the customer_trx_id
Default: None
Validation: None
Error: AR_RAPI_TRX_NUM_INVALID
p_installment IN NUMBER(15)   The installment (or term_sequence_number) of the debit item. Used in conjunction with customer_trx_id to derive the applied payment schedule id if not specified.
Default: 1, if only one installment exists for the debit item
Validation:
  1. >0;

  2. valid installment of transaction.


Also see Validation
Error: AR_RAPI_INSTALL_NULL
p_applied_payment_schedule_id IN NUMBER(15)   The payment schedule id of the debit item. Also used to derive the customer_trx_id if not specified
Default: Defaulted based on the installment and the customer_trx_id
Validation:
  1. > 0

  2. It must correspond to Customer trx id and installment specified.

  3. It must have the status <> 'CL' if the show closed invoices flag <> 'Y'


Error: AR_RAPI_APP_PS_ID_INVALID
p_amount_applied IN NUMBER   The transaction amount to which the receipt is to be applied, in the transaction currency.
Default: The default amount applied can be either the open amount of the transaction or the unapplied amount of the receipt, but you can change it. Use the AR: Always Default Transaction Balance for Applications profile option, Oracle Receivables Implementation Guide to control how Receivables defaults the applied amount.
The profile option's defaulting rules are:
  • If you set the profile option to Yes, then the default amount applied is the remaining transaction amount.

  • If you set the profile option to No, or if a null value exists, then the defaulting rule is:

    1. If the unapplied receipt amount is greater than or equal to the transaction, then the default amount applied is the remaining transaction amount.

    2. If the unapplied receipt amount is less than the remaining transaction amount, then the default amount applied is the unapplied receipt amount.

    3. If the unapplied receipt amount is negative, then the default amount applied is the remaining transaction amount.


Discounts, if applicable, are taken into account by the discounts routine which calculates the amount applied.
Validation: Detailed in Validation
Error: Detailed in Validation
p_amount_applied_from IN NUMBER   The allocated receipt amount in receipt currency.
Use only for cross currency receipt applications. Do not use when transaction and receipt currencies are the same.
Default:
  • For a same currency application, defaults to null

  • For the cross currency application, defaults to trans_to_receipt_rate * amount_applied


Validation: Detailed in Validation
Error: Detailed in Validation
p_trans_to_receipt_rate IN NUMBER   For cross currency receipts, the exchange rate used to convert an amount from a foreign currency to functional currency
Default: Detailed in Defaulting
Validation: Detailed in Validation
Error: Detailed in Validation
p_discount IN NUMBER   Discount on the debit item, entered in the invoice currency
Default: Detailed in Defaulting
Validation: Detailed in Validation
Error: Detailed in Validation
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date

  2. System date, if receipt date < system date


Validation: apply date >= transaction date apply date >= receipt date
Error: AR_APPLY_BEFORE_TRANSACTION AR_APPLY_BEFORE_RECEIPT
p_gl_date IN DATE   Date that this application will be posted to the General Ledger
Default: Detailed in Defaulting
Validation:
  1. Validated as per standard gl date validation described for the gl date in Create_cash routine

  2. >= transaction gl date

  3. >= receipt gl date


Error:
AR_INVALID_APP_GL_DATE
AR_VAL_GL_INV_GL
AR_RW_GL_DATE_BEFORE_REC_GL
p_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_customer_trx_line_id IN NUMBER(15)   The customer trx line id of the debit item to which the payment is applied.
Default: From the line number if specified
Validation: This should be a valid line id for the specified customer trx id.
Error: AR_RAPI_TRX_LINE_ID_INVALID
p_line_number IN NUMBER   The line number of the debit item to which the payment is applied.
Default: None
Validation: None
Error: AR_RAPI_TRX_LINE_NO_INVALID
p_show_closed_invoices IN VARCHAR2(1)   This flag decides whether to do the receipt application against closed invoices. The valid values are 'Y' and 'N'
Default: 'N'
Validation: Any other value is treated as 'N'.
Error: None
p_event IN VARCHAR2(50)   The event that resulted in the creation of the receipt. Currently used only by Bills Receivables.
Default: None
Validation: None
Error: None
p_move_deferred_tax IN VARCHAR2(1)   Depending on maturity date, this flag indicates when deferred tax should be moved on the accounting event.
Default: None
Validation: None
Error: None
p_attribute_record IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_record IN global_attribute_rec_type   This is a record type which contains all the 20 global descriptive flexfield segments and One global descriptive flexfield structure defining column.
Default: None
Validation: None
Error: None
p_comments IN VARCHAR2 (240)   User's comments
p_payment_set_id IN NUMBER(15)   Payment set ID is populated only for a prepayment receipt that needs to be applied to a given debit item.
Default: None
Validation: None
p_application_ref_type IN VARCHAR2(30)   Application reference type – this determines the context of the application reference fields.
Default: None
Validation: Must be Null or, if a Trade Management deduction is being created, then must be ‘CLAIM' (Trade Management must be installed).
Error: AR_RAPI_INVALID_APP_REF
p_application_ref_id IN NUMBER(15)   Must be NULL.
p_application_ref_num IN VARCHAR2(30)   The reference number relating to the application reference type. If application reference type is ‘CLAIM', then this would be a deduction number.
Default: None
Validation: If populated, then must be an existing deduction number in Trade Management.
Error: AR_RAPI_INVALID_CLAIM_NUM
p_secondary_application_ref_id IN NUMBER(15)   The secondary application reference ID related to the application reference type.
Default: None
Validation: If populated, and if the application reference type is ‘CLAIM', then this must contain a valid claim ID in Trade Management.
Error: AR_RW_INVALID_CLAIM_ID
p_application_ref_reason IN VARCHAR2(30)   The reason code related to the application reference type.
Default: None
Validation: If populated, and if the application reference type is ‘CLAIM', then this must contain a valid reason code ID in Trade Management.
Error: AR_RAPI_INVALID_REF_REASON
p_customer_reference IN VARCHAR2(100)   Reference supplied by customer.
p_customer_reason IN VARCHAR2(30)   Reason code supplied by customer, in the context of an application reference type of ‘CLAIM'.
Default: None
Validation: None in Oracle Receivables (the attempt to match to an Oracle reason code is made in Trade Management).

Defaulting

This section explains the defaulting mechanisms for the various parameters of this API, which are relatively more complex in nature and could not be explained in the Description column of the preceding table.

Trans to receipt rate

For a cross currency application, the transaction to receipt rate is defaulted by the following rules:

GL Date

The application GL date is defaulted to the greater of the Receipt GL date or, depending on the value of the profile option AR: Application GL Date Default, the system date or transaction GL date.

Discount

Defaults to the maximum discount available on the transaction, as of the date of application, which is internally calculated by the discounts routine.

Validation

This section explains the validation mechanisms for the various parameters of this API which are relatively more complex in nature and could not be explained in the Description column of the preceding table.

Customer Trx ID

The customer_trx_id is validated using the conditions mentioned below:

Depending on the specified input parameters, one of the following error messages is raised for an invalid transaction:

For details of these messages, refer to Messages.

Amount Applied

Amount Applied From

Trans to Receipt Rate

Discount

If the Allow Unearned Discounts system option = 'N,' then the discount must be less than or equal to the allowed earned discount, which gets internally calculated in the API by the discounts routine for the given transaction. The error message raised for an invalid value is AR_RW_VAL_UNEARNED_DISCOUNT.

Application Ref Num

If p_application_ref_type is 'CLAIM', then the application reference number can be populated with a valid deduction number from Trade Management. This deduction/overpayment must be in the same currency as the debit item being applied to. Otherwise, the error message raised is AR_RAPI_INVALID_CLAIM_NUM.

Secondary Application Ref ID

If p_application_ref_type is 'CLAIM', then the secondary application reference ID can be populated with a valid claim ID from Trade Management. This deduction/overpayment must be in the same currency as the debit item being applied to. Otherwise, the error message raised is AR_RAPI_INVALID_CLAIM_NUM.

If both the application reference number and the secondary application reference ID are left null, and p_application_ref_type is 'CLAIM', then a new claim will be created in Trade Management.

Example

Objective:

To apply a cash receipt in functional currency to an invoice in functional currency having only one installment using a call to the API Ar_receipt_api_pub.Apply and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_trx_number 'aj_test_trx_1'  
p_receipt_number 'aj_test_cr_2'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_customer_trx_id   187807
p_installment   1
p_cash_receipt_id   23927
p_gl_date   10-FEB-2000
p_applied_payment_schedule_id   36271
p_apply_date   10-FEB-2000
p_amount_applied   98
p_amount_applied_from   98
p_discount   2
p_show_closed_invoices   'N'

Result:

We were able to apply the cash receipt against the specified transaction by specifying only three input parameters in our call to this API. The retrieval and handling of the warnings and the error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Create_and_apply

Call this routine to create a cash receipt and apply it to a specified installment of a debit item. This debit item could be for the same customer or related customer, or for an unrelated customer, depending on the Allow Payment of Unrelated Transactions system option.

This is essentially a superset of the ar_receipt_api_pub.Create_cash and Ar_receipt_api_pub.Apply APIs, and contains the same parameters as contained in those two APIs. During the call to this API, if the creation of the receipt is successfully completed but its application to the debit item fails, then the receipt creation is also rolled back.

This routine calls Oracle Payments, where required. See Integration with Oracle Payments.

Note: To create credit card receipts that need to be processed by Oracle Payments APIs, you must pass the p_call_payment_processor parameter as fnd_api.g_true. Additionally, you must specify the p_customer_bank_account_id parameter.

This API routine has 3 output and 59 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 47 + 2 (descriptive flexfield record parameter)

+ 2 (global descriptive flexfield record parameter)

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the parameters that are relevant to the receipt creation and application for the 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 Description
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 we can derive the corresponding currency code.
Error: AR_RAPI_USR_CURR_CODE_INVALID
p_currency_code IN VARCHAR2(15)   The actual currency code that gets stored in AR tables.
Default:
  1. Derived from p_usr_currency_code if entered. Otherwise,

  2. Defaulted 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(30)   Exchange rate type stored in AR tables.
Default:
  1. In case of foreign currency receipt, derived from p_usr_exchange_rate_type

  2. If p_usr_exchange_rate_type is null, then defaulted from AR: Default Exchange Rate Type profile option

  3. Should be left null, if the receipt is in the same denomination as functional currency


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:
  1. Derived from the Daily Rates table for rate_type <>'User' in case of non-functional currency

  2. If profile option Journals: Display Inverse Rate = 'Y', set user entered value to 1/ p_exchange_rate

  3. The entered value is rounded to a precision of 38.


Validation:
  1. In case of non-functional currency the rate should have a positive value for rate type= 'User'

  2. For non-functional currency and type <> 'User' the user should 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 non-functional currency and type <> '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_amount IN NUMBER Yes The cash receipt amount.
Default: Null
Validation: >0
Error: AR_RAPI_REC_AMT_NEGATIVE AR_RAPI_RCPT_AMOUNT_NULL
p_factor_discount_amount IN NUMBER   The bank charges on the cash receipt.
Default: None
Validation:
  1. Bank charges are not allowed if profile option AR: Create Bank Charges = 'No'.

  2. Bank charges not allowed if the receipt state, derived from the receipt class of the receipt method, <> 'CLEARED'.

  3. If allowed, then >= 0.


Error: AR_BK_CH_NOT_ALLWD_IF_NOT_CLR AR_JG_BC_AMOUNT_NEGATIVE
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be created.
Default: If not specified, the receipt number is defaulted from the document sequence value.
Validation: Receipt number should not be null
Error: AR_RAPI_RCPT_NUM_NULL
p_receipt_date IN DATE   The receipt date of the entered cash receipt.
Default: System date
Validation: None
Error: None
p_gl_date IN DATE   Date that this receipt will be posted to the General Ledger.
Default: Gets defaulted to the receipt date if it is a valid gl_date.
Validation: The date is valid if the following conditions are true:
  • The date is in an Open or Future period

  • The period cannot be an Adjustment period


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE
p_maturity_date IN DATE   Receipt maturity date.
Default: Deposit date
Validation: >= p_receipt_date
Error: AR_RW_MAT_BEFORE_RCT_DATE
p_customer_id IN NUMBER(15)   The customer_id for the paying customer.
Default: Refer to Defaulting
Validation:
  1. Customer exists and has prospect code = 'CUSTOMER'

  2. Customer has a profile defined a customer level


Error: AR_RAPI_CUST_ID_INVALID
p_customer_name IN VARCHAR2(50)   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_customer_number IN VARCHAR2(30)   The customer number. Used to default the customer_id if not specified.
Default: None
Validation: None
Error: AR_RAPI_CUS_NUM_INVALID
p_customer_bank_account_id IN NUMBER(15)   The customer bank account ID.
Default: From bank account ID/number.
Validation:
  1. It must be a valid bank account of the paying customer.

  2. The inactive date (if defined) of the bank account should be greater than the receipt_date.

  3. The receipt date must be within the Start date and the End date of the bank account uses.


Error: AR_RAPI_CUS_BK_AC_2_INVALID AR_RAPI_CUS_BK_AC_ID_INVALID
p_customer_bank_account_num IN VARCHAR2(30)   The customer bank account number. Used to default the customer bank account id, if not specified.
Default: None
Validation: None
Error: None
p_customer_bank_account_name IN VARCHAR2(80)   The customer bank account name. Used to default the customer bank account id, if not specified.
Default: None
Validation: None
Error: None
p_customer_location IN VARCHAR2(40)   The Bill_To location for the customer. Used to derive the p_customer_site_use_id.
Default: None
Validation: None
Error: AR_RAPI_CUS_LOC_INVALID
p_customer_site_use_id IN NUMBER(15)   The Bill_To site_use_id for the customer.
Default:
  1. Defaulted from customer location. Otherwise,

  2. Primary Bill_To customer site_use_id of the customer.


Validation: It should be a valid Bill_To site of the paying customer.
Error: AR_RAPI_CUS_SITE_USE_ID_INVALID
p_customer_receipt_reference IN VARCHAR2(30)   This column is used to store a customer receipt reference value that the customer supplies at the confirmation time.
Default: None
Validation: None
Error: None
p_override_remit_bank_account_flag IN VARCHAR2(1)   The flag value decides when the remittance bank account can be overridden by the remittance selection process.
Default: 'Y'
Validation: valid values 'Y' and 'N'
Error: AR_RAPI_INVALID_OR_REMIT_BK_AC
p_remittance_bank_account_id IN NUMBER(15)   Identifies the user's bank account for depositing the receipt.
Default:
  1. From remittance bank account number

  2. From the receipt method based on logic mentioned in Defaulting


Validation: Validation logic detailed in Validation
Error: AR_RAPI_REM_BK_AC_ID_INVALID AR_RAPI_REM_BK_AC_ID_NULL
p_remittance_bank_account_num IN VARCHAR2(30)   The remittance bank account number. Used to default the remittance bank account id if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NUM_INVALID
p_remittance_bank_account_name IN VARCHAR2(50)   The remittance bank account name. Used to default the remittance bank account id if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NAME_INVALID
p_deposit_date IN DATE   The deposit date.
Default: receipt date
Validation: None
Error: None
p_receipt_method_id IN NUMBER(15)   Identifies the receipt method of the receipt.
Default: From receipt method name
Validation: Validation detailed in Validation
Error: AR_RAPI_INVALID_RCT_MD_ID
p_receipt_method_name IN VARCHAR2(30)   The receipt method name of the receipt. Used to default the receipt method id if not specified.
Default: None
Validation: None
Error: None

Note: To use credit card refund functionality, ensure that remittance of the original receipt is performed within Oracle Receivables. Do this by setting the remittance method on the receipt method's associated receipt class to Standard.

Warning: If you use this API to both authorize and capture credit card payments, then set the remittance method to None. Note, however, that with this setting, you cannot use standard credit card refund functionality. Instead, you must refund such payments outside Receivables.

p_doc_sequence_value IN NUMBER   Value assigned to document receipt.
Default: Detailed in Defaulting.
Validation:
  • You should not pass a value, if the current document sequence is automatic.

  • Document sequence value should not be entered if profile option Sequential Numbering is set to Not Used.


Error: AR_RAPI_DOC_SEQ_AUTOMATIC AR_RAPI_DOC_SEQ_VAL_INVALID
p_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_anticipated_clearing_date IN DATE   Date the receipt is expected to be cleared.
Default: None
Validation: >= gl_date
Error: AR_RW_EFFECTIVE_BEFORE_GL_DATE
p_event IN VARCHAR2   The event that resulted in the creation of the receipt. Currently used only by Bills Receivables.
Default: None
Validation: None
Error: None
p_called_from IN VARCHAR2(20)   This parameter is used to identify the calling routine. Currently used to identify only the 'BR_REMIT' program.
Default: None
Validation: None
Error: None
p_attribute_record IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_record IN global_attribute_rec_type   This is a record type which contains all the 20 global descriptive flexfield segments and one global descriptive flexfield structure defining column.
Default: None
Validation: None
Error:
p_issuer_name IN VARCHAR2(50)   Issuer name of Notes Receivable (Asia Pacific Requirement).
Default: None
Validation: None
Error: None
p_issue_date IN DATE   Date when the note receivable was issued (Asia Pacific Requirement).
Default: None
Validation: None
Error: None
p_customer_trx_id IN NUMBER(15)   The customer_trx_id of the debit item to which the receipt is to be applied.
Default: None
Validation: Detailed in Validation
Error: Detailed in Validation
p_trx_number IN VARCHAR2(20)   The trx_number of the debit item to which the receipt is to be applied. Used to default the customer_trx_id.
Default: None
Validation: None
Error: AR_RAPI_TRX_NUM_INVALID
p_installment IN NUMBER(15)   The installment (or term_sequence_number) of the debit item. Used in conjunction with customer_trx_id to derive the applied payment schedule id if not specified.
Default: 1, if only one installment exists for the debit item
Validation:
  1. >0

  2. valid installment of transaction.


Also see Validation
Error: AR_RAPI_INSTALL_NULL
p_applied_payment_schedule_id IN NUMBER(15)   The payment schedule id of the debit item. Also used to derive the customer_trx_id if not specified.
Default: Defaulted based on the installment and the customer_trx_id
Validation:
  1. > 0

  2. It must correspond to Customer trx id and installment specified.

  3. It must have the status <> 'CL' if the show closed invoices flag <> 'Y'


Error: AR_RAPI_APP_PS_ID_INVALID
p_amount_applied IN NUMBER   The transaction amount to which the receipt is to be applied. This in the transaction currency.
Default: The default amount applied can be either the open amount of the transaction or the unapplied amount of the receipt, but you can change it. Use the AR: Always Default Transaction Balance for Applications profile option, Oracle Receivables Implementation Guide to control how Receivables defaults the applied amount.
For the profile option's defaulting rules, see Ar_receipt_api_pub.Apply.
Discounts, if applicable, are taken into account by the discounts routine which calculates the amount applied.
Validation: Detailed in Validation.
Error: Detailed in Validation.
p_amount_applied_from IN NUMBER   The allocated receipt amount in receipt currency.
Use only for cross currency receipt applications. Do not use when transaction and receipt currencies are the same.
Default:
  • For a same currency application, defaults to null.

  • For the cross currency application, defaults to trans_to_receipt_rate * amount_applied.


Validation: Detailed in Validation.
Error: Detailed in Validation.
p_trans_to_receipt_rate IN NUMBER   For cross currency receipts, the exchange rate used to convert an amount from a foreign currency to functional currency.
Default: Detailed in Defaulting
Validation: Detailed in Validation
Error: Detailed in Validation
p_discount IN NUMBER   Discount on the debit item, entered in the invoice currency.
Default: Detailed in Defaulting
Validation: Detailed in Validation
Error: Detailed in Validation
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date

  2. System date, if receipt date < system date


Validation: apply date >= transaction date apply date >= receipt date
Error: AR_APPLY_BEFORE_TRANSACTION AR_APPLY_BEFORE_RECEIPT
p_apply_gl_date IN DATE   Date that this application will be posted to the General Ledger.
Default: Detailed in Defaulting
Validation:
  1. Validated as per standard gl date validation described for the gl date in Create_cash routine

  2. Greater than or equal to transaction gl date

  3. Greater than or equal to receipt gl date


Error:
AR_INVALID_APP_GL_DATE
AR_VAL_GL_INV_GL
AR_RW_GL_DATE_BEFORE_REC_GL
p_app_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error:
p_customer_trx_line_id IN NUMBER(15)   The customer trx line id of the debit item to which the payment is applied.
Default: From the line number if specified
Validation: This should be a valid line id for the specified customer trx id.
Error: AR_RAPI_TRX_LINE_ID_INVALID
p_line_number IN NUMBER   The line number of the debit item to which the payment is applied.
Default: None
Validation: None
Error: AR_RAPI_TRX_LINE_NO_INVALID
p_show_closed_invoices IN VARCHAR2(1)   This flag decides whether to do the receipt application against closed invoices. The valid values are 'Y' and 'N'.
Default: 'N'
Validation: Check for the valid values.
Error: AR_RAPI_INVALID_SHOW_CL_INV
p_event IN VARCHAR2(50)   The event that resulted in the creation of the receipt. Currently used only by Bills Receivables.
Default: None
Validation: None
Error: None
p_move_deferred_tax IN VARCHAR2(1)   Depending on maturity date, this flag indicates when deferred tax should be moved on the accounting event.
Default: None
Validation: None
Error: None
p_app_attribute_record IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_app_global_attribute_record IN global_attribute_rec_type   This is a record type which contains all the 20 global descriptive flexfield segments and one global descriptive flexfield structure defining column.
Default: None
Validation: None
Error:
p_comments IN VARCHAR2(240)   User's comments for the application.
p_call_payment_processor IN VARCHAR2 (1) FND_API.G_FALSE This is the payment processing indicator flag. Pass as FND_API.G_TRUE, if you want to call Oracle Payments for credit card processing.
p_default_site_use IN VARCHAR2 No Indicates if you want to default the site use from p_customer_site_use_id.
The default value is Y. Pass N to default nothing.
If the Require Billing Location for Receipts system option is selected, then no value is required here.
p_payment_trxn_extension_id       Payment transaction extension identifier
p_org_id        

Defaulting

This section explains the defaulting mechanisms for the various parameters of this API which are relatively more complex in nature and could not be explained in the Description column of the preceding table.

Customer ID

The p_customer_id is required for the create_and_apply routine because an unidentified receipt cannot be applied to a transaction. If not specified, then the customer ID gets defaulted from one of the following:

If the customer ID is not defaulted by one of the above, then the AR_RAPI_CUST_ID_NULL error is raised.

Example

Objective:

To create a cash receipt in the functional currency against an invoice in USD having only one installment, using a call to the API Ar_receipt_api_pub.Create_and_Apply and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_api_3'  
p_amount 1000  
p_receipt_method_id 1001  
p_customer_name 'Computer Service and Rentals'  
p_trx_number 'aj_test_trx_3'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_customer_id   1006
p_currency_code   USD
p_receipt_date   10-FEB-2000
p_gl_date   10-FEB-2000
p_deposit_date   10-FEB-2000
p_customer_site_use_id   1025
p_override_remit_bank_account_flag   'Y'
p_remittance_bank_account_id   10001
p_maturity_date   10-FEB-2000
p_customer_trx_id   187809
p_installment   1
p_apply_gl_date   10-FEB-2000
p_applied_payment_schedule_id   36277
p_apply_date   10-FEB-2000
p_amount_applied   1000
p_amount_applied_from   1000
p_discount   0
p_show_closed_invoices   'N'

Result:

We were able to create the cash receipt 'aj_test_api_3' and then apply it against the invoice 'aj_test_trx_3' by specifying only six input parameters in our call to this API. Both the receipt and the invoice are in the functional currency. The retrieval and handling of the warnings and the error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Unapply

Call this routine to unapply a cash receipt application against a specified installment of a debit item or payment_schedule_id. This API routine has 3 output and 14 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 10

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the parameters that are specific to the unapplication for the 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 Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt whose application has to be unapplied.
Default: None
Validation:
  1. Status must not be Reversed or Approved

  2. The receipt should have an application on it.


Error: AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt whose application is to be unapplied. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID AR_RAPI_TRX_NUM_INST_INVALID
p_customer_trx_id IN NUMBER(15)   The customer_trx_id of the debit item against which the specified receipt has an application.
Default: None
Validation: The transaction must have an application against the specified receipt.
Error: AR_RAPI_CUST_TRX_ID_INVALID AR_RAPI_TRX_ID_INST_INVALID
p_trx_number IN VARCHAR2(20)   The trx_number of the debit item against which the specified receipt has an application. Used to default the customer_trx_id.
Default: None
Validation: None
Error: None
p_installment IN NUMBER(15)   The installment (or term_sequence_number) of the debit item. Used in conjunction with customer_trx_id to derive the applied payment schedule id if not specified.
Default: 1, if only one installment exists for the debit item
Validation:
  1. >0

  2. valid installment of transaction


Error: AR_RAPI_INSTALL_NULL AR_RAPI_TRX_ID_INST_INVALID AR_RAPI_TRX_NUM_INST_INVALID
p_applied_payment_schedule_id IN NUMBER(15)   The payment schedule id of the debit item. Also used to derive the customer_trx_id, if not specified.
Default: Derived from the installment and the customer_trx_id.
Validation:
  1. > 0

  2. It must correspond to Customer trx id and installment, if specified.

  3. For applications with Bills Receivables installed, you cannot unapply a bill that is in the process of remittance.


Error: AR_RAPI_APP_PS_ID_INVALID
p_receivable_application_id IN NUMBER(15)   Identifies the receivable application. Used to derive the customer_trx_id, cash_receipt_id, and the applied_payment_schedule_id, if not specified.
Default: Defaulted from the specified transaction and the receipt.
Validation:
  1. Application type must be 'CASH'.

  2. Display flag = 'Y' (latest application).

  3. The applied payment schedule id of the receivable application record must correspond to the p_applied_payment_schedules_id, if specified.

  4. The cash receipt id must correspond to the cash receipt id specified.

  5. For applications with Bills Receivables installed, you cannot unapply the application of a bill that is in the process of remittance.


Error: AR_RAPI_REC_APP_ID_NULL AR_RAPI_REC_APP_ID_INVALID
p_reversal_gl_date IN DATE   The reversal gl date.
Default: Gets defaulted to the application gl date if it is a valid gl_date.
Validation:
It is valid if the following conditions are true:
  • The date is in an Open or Future period.

  • The period cannot be an Adjustment period.

  • The reversal GL date >= application GL date.

  • The reversal GL date >= receipt GL date.


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE AR_RW_BEFORE_APP_GL_DATE AR_RW_BEFORE_RECEIPT_GL_DATE
p_called_from IN VARCHAR2(20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_cancel_claim_flag IN VARCHAR2(1)   Not used – leave null.

Defaulting

This section explains the defaulting mechanisms for the various parameters of this API which are relatively more complex and could not be explained in the Description column of the preceding table.

Receivable Application ID

If not specified, then the receivable application ID can be defaulted by one of the following:

Validation

This section explains the cross validations for the various parameters of this API which are relatively more complex and could not be explained in the Description column of the preceding table.

Cross validation between customer_trx_id, applied_payment_schedule_id, cash_receipt_id, and receivable_application_id

Example

Objective:

To unapply the receipt application against an invoice using the call to API Ar_receipt_api_pub.Unapply and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_api_4'  
p_applied_payment_schedule_id 1001  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   1006
p_customer_trx_id   USD
p_reversal_gl_date   10-FEB-2000
p_receivable_application_id   29711

The retrieval and handling of the warnings and the error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Apply_on_account

Call this routine to apply an on-account application of the specified cash receipt. This API routine has 3 output and 21 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 14 + 1 (descriptive flexfield record type)

+ 1 (global descriptive flexfield record type)

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the on-account application-related parameters of the 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 Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt which is to be applied on account.
Default: None
Validation:
  1. Type must be 'CASH'

  2. Status must not be Reversed or Approved


The receipt must not be Unidentified
Error:
AR_RAPI_CASH_RCPT_ID_INVALID
AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be applied on account. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_amount_applied IN NUMBER   The amount on the cash receipt that is to be applied on account.
Default: Amount due remaining on the receipt.
Validation:
  1. Greater than or equal to 0.

  2. Less than or equal to the amount due remaining on the receipt.


Error:
AR_RAPI_APPLIED_AMT_NULL
AR_RW_APP_NEG_UNAPP
AR_RW_AMOUNT_LESS_THAN_APP
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date

  2. System date, if receipt date < system date


Validation: apply date >= receipt date
Error: AR_APPLY_BEFORE_RECEIPT
p_apply_gl_date IN DATE   Date that this application will be posted to the General Ledger.
Default: Defaulted to greater of the receipt date and the system date.
Validation:
  1. Validated as per standard gl date validation described for the gl date in Create_cash routine.

  2. >= receipt gl date.


Error:
AR_INVALID_APP_GL_DATE
AR_RW_GL_DATE_BEFORE_REC_GL
p_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_attribute_rec IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_rec IN global_attribute_rec_type   This is a record type which contains all the global descriptive flexfields: One global descriptive flexfield structure defining column and 20 segments.
Default: None
Validation: None
Error: None
p_comments IN VARCHAR2(240)   User comments.
p_application_ref_num IN VARCHAR2(30)   Deduction number, if resulting from Trade Management claim settlement.
p_secondary_application_ref_id IN NUMBER(15)   Claim ID, if resulting from Trade Management claim settlement.
p_customer_reference IN VARCHAR2(100)   Reference supplied by customer.
p_called_from IN VARCHAR2(20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_customer_reason IN VARCHAR2(30)   Reason code supplied by customer.
p_secondary_app_ref_type IN VARCHAR2(30)   Used for automated receipt handling. Leave null.
p_secondary_app_ref_num IN VARCHAR2(30)   Used for automated receipt handling. Leave null.

Note: With an on-account application, you cannot apply a negative amount, as you can do in a regular application of a receipt to a debit item.

Example

Objective:

To apply a cash receipt in the functional currency to an invoice in the functional currency having only one installment, using a call to the API Ar_receipt_api_pub.Apply_on_account and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_cr_2'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   23927
p_gl_date   01-JUN-2000
p_apply_date   01-JUN-2000
p_amount_applied   100

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Unapply_on_account

Call this routine to unapply an on-account application on the specified cash receipt. This API routine has 3 output and 9 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 5

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the parameters that are relevant to the on-account unapplication for the 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 Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt whose application has to be unapplied.
Default: None
Validation:
  1. Status must not be Reversed or Approved.

  2. The receipt must have an on-account application on it.


Error: AR_RAPI_CASH_RCPT_ID_INVALID
p_receipt_number IN VARCHAR2 (30)   The receipt number of the receipt which is to be unapplied. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_receivable_application_id IN NUMBER(15)   Identifies the receivable application. Used to derive the customer trx id, cash_receipt_id and the applied_ps_id, if not specified.
Default: Refer to Validation.
Validation:
  1. Application type = 'CASH'.

  2. Display flag = 'Y' (latest application) and status = 'ACC'.

  3. The applied payment schedule id of the receivable application record must correspond to the p_applied_payment_schedules_id, if specified.

  4. The cash receipt id must correspond to the cash receipt id specified.


Error: AR_RAPI_REC_APP_ID_INVALID
p_reversal_gl_date IN DATE   The reversal gl date.
Default: Gets defaulted to the application gl date if it is a valid gl_date.
Validation:
It is valid if the following conditions are true:
  • The date is in an Open or Future period.

  • The period cannot be an Adjustment period.

  • The reversal GL date >= application GL date.

  • The reversal GL date >= receipt GL date.


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date first date of the last open period


Error: AR_INVALID_APP_GL_DATE AR_RW_BEFORE_APP_GL_DATE AR_RW_BEFORE_RECEIPT_GL_DATE
p_org_id        

Defaulting

This section explains the defaulting mechanisms for the various parameters of this API which could not be explained in the Description column of the preceding table.

Receivable Application ID

The value for p_receivable_application_id, if not specified, is defaulted from the p_cash_receipt_id (or p_receipt_number). If the receipt does not have an on-account application, then the error AR_RAPI_CASH_RCPT_ID_INVALID is raised. If there is more than one on-account application on the receipt and the value for p_receivable_application_id has not been specified, then the error AR_RAPI_MULTIPLE_ON_AC_APP is raised.

Example

Objective:

To unapply the receipt application using the call to API Ar_receipt_api_pub.Unapply_on_account and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_api_6'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   20338
p_reversal_gl_date   01-JUN-2000

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Reverse

Call this routine to reverse cash as well as miscellaneous receipts. This API routine has 3 output and 15 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 12 + 1 (descriptive flexfield record type)

1 (global descriptive flexfield record type)

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the reversal-related parameters of the 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 Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt which needs to be reversed.
Default: None
Validation: Detailed in Defaulting.
Error:
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be reversed. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_reversal_category_code IN VARCHAR2(20)   Identifies the reason why the payment entry was reversed.
Default: None
Validation: Validated against the values in ar_lookups for lookup_type = 'REVERSAL_CATEGORY_TYPE
Error:
AR_RAPI_REV_CAT_CD_NULL
AR_RAPI_REV_CAT_CD_INVALID
p_reversal_category_name IN VARCHAR2(80)   This is the translated lookup meaning for the reversal category code. Used to default the reversal category code if not specified.
Default: None
Validation: None
Error: AR_RAPI_REV_CAT_NAME_INVALID
p_reversal_gl_date IN DATE   The General Ledger Date that is used to credit the Account CCID for the reversed receipt.
Default: System date
Validation:
  1. Validated as per standard gl date validation described for the gl date in Create_cash routine

  2. Greater than or equal to receipt gl date


Error:
AR_INVALID_APP_GL_DATE
AR_RW_BEFORE_RECEIPT_GL_DATE
p_reversal_date IN DATE   Date on which the payment entry reversed
Default:
  • System date if system date >= receipt date, else

  • Receipt date if receipt date > system date


Validation: Greater than or equal to receipt date
Error: AR_RW_REV_BEFORE_RCT_DATE
p_reversal_reason_code IN VARCHAR2(30)   Indicates the reason for reversing receipt
Default: None
Validation: Validated against the values in ar_lookups for lookup_type = 'CKAJST_REASON'
Error: AR_RAPI_REV_REAS_CD_INVALID AR_RAPI_REV_REAS_CD_NULL
p_reversal_reason_name IN VARCHAR2(80)   This is the translated lookup meaning for reversal reason code. Used for defaulting the reversal reason code if not specified.
Default: None
Validation: None
Error: AR_RAPI_REV_REAS_NAME_INVALID
p_reversal_comments IN VARCHAR2 (240)   Comments regarding reversal
p_atttribute_rec IN p_attribute_rec   This is a record type which contains all the descriptive flexfields: One descriptive flexfield structure defining column and 15 segments.
Default: None
Validation: None
Error: None
p_global_attribute_rec IN global_attribute_rec_type   This is a record type which contains all the global descriptive flexfields: One global descriptive flexfield structure defining column and 20 segments.
Default: None
Validation: None
Error: None
p_cancel_claims_flag IN VARCHAR2(1)   Not used. Leave null.
p_called_from IN VARCHAR2(20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_org_id        

Validation

This section explains the validation mechanisms for the various parameters of this API which are relatively more complex in nature and could not be explained in the Description column of the preceding table.

Cash Receipt ID

We have to validate whether this is a valid cash receipt ID, and whether we can reverse this receipt.

The validation steps are:

The receipt is not standard reversible if any two of the following conditions are true:

The AR_RAPI_NON_REVERSIBLE error message is raised for invalid values. In these cases, you can create a debit memo reversal to reverse the receipt. Since the Receipt API does not currently support debit memo reversals, you can manually create them using the Receipts workbench.

Example

Objective:

To reverse a cash receipt using a call to the API Ar_receipt_api_pub.Reverse and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_cr_7'  
p_reversal_category_code 'NSF'  
p_reversal_reason_code 'PAYMENT REVERSAL'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   20340
p_reversal_date   01-JUN-2000
p_reversal_gl_date   01-JUN-2000

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.activity_application

Call this routine to do an activity application on a cash receipt. Such applications include Short Term Debit (STD) and Receipt Write-off applications.

This API routine has 4 output and 41 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 35 + 1 (descriptive flexfield record type)

1 (global descriptive flexfield record type)

Output

Standard API parameters: 3

Application parameters: 1

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the activity application-related parameters of the 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* Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt which is to be used for the activity application.
Default: None
Validation:
  1. Type must be 'CASH'

  2. Status must not be Reversed or Approved

  3. The receipt must not be Unidentified


Error: AR_RAPI_CASH_RCPT_ID_INVALID AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be applied. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_amount_applied IN NUMBER   The amount on the cash receipt that is to be applied against the specified activity.
Default: Amount due remaining on the receipt.
Validation:
  1. Greater than or equal to 0.

  2. Less than or equal to the amount due remaining on the receipt.

  3. If a receipt write-off, then must fall within user and system limits (limits must be set).


Error:
AR_RAPI_APPLIED_AMT_NULL
AR_RW_APP_NEG_UNAPP
AR_RW_AMOUNT_LESS_THAN_APP
AR_WR_NO_LIMIT
AR_WR_USER_LIMIT
AR_SYSTEM_WR_NO_LIMIT_SET
AR_WR_TOTAL_EXCEED_MAX_AMOUNT
p_applied_payment_schedule_id IN NUMBER(15) Yes The payment schedule identifier here corresponds to special seeded values, such as -2.
Default:
Validation: The value should correspond to the special seeded values, such as: -2 (Short Term Debt).
Error: AR_RAPI_APP_PS_ID_INVALID
p_link_to_customer_trx_id IN NUMBER(15)   The customer_trx_id of the Bill for which the activity (e.g. Short Term Debt) application is being done.
Default:
Validation: The customer_trx_id should correspond to that of a Bill which has a current status of FACTORED or MATURED_PEND_RISK_ELIMINATION.
Error: AR_RAPI_LK_CUS_TRX_ID_INVALID
p_receivables_trx_id IN NUMBER(15)   Identifier of the receivables activity.
Default: None
Validation:
  1. Valid database value.

  2. The activity_type for the receivables_trx_id should be in sync with the applied payment schedule identifier passed in.


Error:
AR_RAPI_REC_TRX_ID_INVALID
AR_RAPI_ACTIVITY_X_INVALID
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date.

  2. System date, if receipt date < system date.


Validation: apply date >= receipt date
Error: AR_APPLY_BEFORE_RECEIPT
p_apply_gl_date IN DATE   Date that this application will be posted to the General Ledger.
Default: Defaulted to greater of the receipt date and the system date.
Validation:
  1. Validated as per standard GL date validation described for the GL date in Create_cash routine.

  2. >= receipt GL date


Error: AR_INVALID_APP_GL_DATE AR_RW_GL_DATE_BEFORE_REC_GL
p_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_attribute_rec IN attribute_rec_type   This is a record type which contains all 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_rec IN global_attribute_rec_type   This is a record type which contains all the global descriptive flexfields: one global descriptive flexfield structure defining column and 20 segments.
Default: None
Validation: None
Error: None
p_comments IN VARCHAR2 (240)   User's comments for the activity application.
p_application_ref_type IN VARCHAR2(30)   Not used. Leave null.
p_application_ref_id IN NUMBER(15)   Not used. Leave null.
p_application_ref_num IN VARCHAR2(30)   If resulting from a settlement of a claim, then this will contain the deduction number.
p_secondary_application_ref_id IN NUMBER(15)   If resulting from a settlement of a claim, then this will contain the claim ID.
p_payment_set_id IN NUMBER(15)   Payment set ID is populated only when doing a prepayment activity application on a prepayment receipt.
Default: None
Validation: None
p_receivable_application_id OUT NUMBER(15)   The ID of the resulting activity receivable application.
p_customer_reference IN VARCHAR2 (100)   Customer supplied reference.
p_val_writeoff_limits_flag IN VARCHAR2(1)   Flag to indicate whether user-level write-off limits should apply.
Default: Y
Validation: None
Error: None
p_called_from IN VARCHAR2(20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_netted_receipt_flag IN VARCHAR2(1)   Used for payment netting. Leave null.
p_netted_cash_receipt_id IN NUMBER(15)   Used for payment netting. Leave null.
p_secondary_app_ref_type IN VARCHAR2(30)   Used for automated receipt handling. Leave null.
p_secondary_app_ref_num IN VARCHAR2(30)   Used for automated receipt handling. Leave null.
p_org_id        
p_pay_group_lookup_code IN FND_LOOKUPS.lookup_code%TYPE    
p_pay_alone_flag IN VARCHAR2    
p_payment_method_code IN ap_invoices.payment_method_code%TYPE    
p_payment_reason_code IN ap_invoices.payment_reason_code%TYPE    
p_payment_reason_comments IN ap_invoices.payment_reason_comments%TYPE    
p_delivery_channel_code IN ap_invoices.delivery_channel_code%TYPE    
p_remittance_message1 IN ap_invoices.remittance_message1%TYPE    
p_remittance_message2 IN ap_invoices.remittance_message2%TYPE    
p_remittance_message3 IN ap_invoices.remittance_message3%TYPE    
p_party_id IN hz_parties.party_id%TYPE    
p_party_site_id IN hz_party_sites.party_site_id%TYPE    
p_bank_account_id IN ar_cash_receipts.customer_bank_account_id%TYPE    

Example

Objective:

To apply a cash receipt in then functional currency to a receipt write-off activity in the functional currency, using a call to the API Ar_receipt_api_pub.activity_application and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_cr_2'  
p_receivables_trx_id 1300  
p_applied_payment_schedule_id -3  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   23927
p_gl_date   01-JUN-2000
p_apply_date   01-JUN-2000
p_amount_applied   100

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.activity_unapplication

Call this routine to do a reversal of an activity application on a cash receipt. Such applications include Short Term Debt and Receipt write-off.

This API routine has 3 output and 10 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 6

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the activity unapplication-related parameters of the 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 Description
p_cash_receipt_id IN NUMBER(15)   The cash_receipt_id of the receipt on which the activity application needs to be reversed.
Default: None
Validation:
  1. Type must be 'CASH'

  2. Status must not be Reversed or Approved

  3. The receipt must not be Unidentified


Error: AR_RAPI_CASH_RCPT_ID_INVALID AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be reversed. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_receivable_application_id IN NUMBER(15)   Identifies the receivable application. Used to derive the customer trx id, cash_receipt_id and the applied_ps_id if not specified.
Default: Refer to Validation.
Validation:
  1. Application type = 'CASH'.

  2. Display flag = 'Y' (latest application) and status = 'ACTIVITY'.

  3. The applied payment schedule id of the receivable application record must correspond to the p_applied_payment_schedule_id, if specified.

  4. Must correspond to the cash receipt id specified.


Error: AR_RAPI_REC_APP_ID_INVALID
p_reversal_gl_date IN DATE   The reversal GL date.
Default: Gets defaulted to the application GL date if it is a valid gl_date.
Validation:
It is valid if the following conditions are true:
  • The date is in an Open or Future period

  • The period cannot be an Adjustment period

  • Reversal GL date >= application GL date

  • Reversal GL date >= receipt GL date


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE AR_RW_BEFORE_APP_GL_DATE AR_RW_BEFORE_RECEIPT_GL_DATE
p_called_from IN VARCHAR2(20) Yes Indicates which program is calling this API. For example, the BR_REMIT program would be calling this routine for short term debt applications.
Default: None
Validation: None
Error: None
p_org_id        

Example

Objective:

To unapply an activity application, using a call to the API Ar_receipt_api_pub.activity_unapplication and passing minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receivable_application_id 10051  
p_called_from NULL  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   20338
p_reversal_gl_date   01-JUN-2000

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Create_misc

Call this routine to create a miscellaneous receipt.

Note: This routine does not call Oracle Payments directly. See Integration with Oracle Payments.

This API routine has 4 output and 37 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 33

Output

Standard API parameters: 3

Application parameters: 1

Parameter Descriptions

The following table lists the standard API parameters, which are common to all the routines in the Receipt API:

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. Detailed in 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 are relevant to the miscellaneous receipt:

Parameter Type Data-type Required Description
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:
  1. Derived from p_usr_currency_code if entered. Otherwise,

  2. 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:
  1. In case of foreign currency receipt, derived from p_usr_exchange_rate_type.

  2. In case of foreign currency receipt, defaults from profile option AR: Default Exchange Rate Type


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:
  1. Derived from the Daily Rates table for rate_type <> 'User' in case of non-functional currency

  2. If profile option Journals: Display Inverse Rate = 'Y', set user-entered value to 1/p_exchange_rate

  3. The entered value is rounded to a precision of 38


Validation:
  1. In case of non-functional currency, the rate should have a positive value for rate type = 'User'

  2. For non-functional 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 non-functional 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_amount IN NUMBER Yes The miscellaneous receipt amount.
Default: Null
Validation: None
Error: None
p_receipt_number IN VARCHAR2(30)   The receipt number of the receipt to be created.
Default: If not specified, the receipt number is defaulted from the document sequence value.
Validation: Receipt number should not be null
Error: AR_RAPI_RCPT_NUM_NULL
p_receipt_date IN DATE   The receipt date of the entered cash receipt.
Default: System date
Validation: None
Error: None
p_gl_date IN DATE   Date when this receipt will be posted to the general ledger.
Default: Gets defaulted to the receipt date if it is a valid gl_date, otherwise:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Validation: It is valid if the following conditions are true:
  • The date is in an Open or Future period

  • The period cannot be an Adjustment period


Error: AR_INVALID_APP_GL_DATE
p_receivables_trx_id IN NUMBER(15)   Identifies the receivables activity.
Default: If not specified, it is derived from p_activity.
Validation: Validates it against the values in the ar_receivables_trx table
  • Type column having values: 'MISCCASH', 'BANK_ERROR', 'CCREFUND'.

  • Checks the receipt_date to be within start_date_active and end_date_active column values.

  • Status is Active or null.

  • Not null.


Error: AR_RAPI_ACTIVITY_INVALID AR_RAPI_REC_TRX_ID_INVALID AR_RAPI_REC_TRX_ID_NULL
p_activity IN VARCHAR2(50)   Name of the receivables activity. This is used to derive the p_receivables_trx_id.
Default: None
Validation: None
Error: None
p_misc_payment_source IN VARCHAR2(30)   Identifies the source of the miscellaneous receipt.
Default: None
Validation: None
Error: None
p_tax_code IN VARCHAR2(50)   Depending on the sign of the amount entered, it is the asset tax code (for positive sign or zero) or the liability tax code (negative sign). This is used to derive the p_vat_tax_id.
Default: None
Validation: None
Error: None
p_vat_tax_id IN NUMBER(15)   The VAT tax identifier for the current miscellaneous receipt.
Default:
  • defaulted from p_tax_code

  • defaulted from receivables_trx_id/activity


Validation:
  1. For 'Accrual' accounting method, the vat_tax_id is validated against the values in ar_vat_tax having

    • receipt_date between start_date_active and end_date_active column values

    • enabled_flag = 'Y'

    • tax_type should not be 'TAX_GROUP', 'LOCATION', 'SALES_TAX'

    • displayed_flag = 'Y'

    • The tax_class is 'O' (output) for positive or zero amount and 'I' (input) for negative amount

    • ledger should match the current ledger

  2. For 'Cash basis' accounting method, the vat_tax_id should not be specified.


Error: AR_RAPI_VAT_TAX_ID_INVALID AR_RAPI_TAX_CODE_INVALID
p_tax_rate IN NUMBER   The new tax rate specified when you override the rate for an ad-hoc tax code.
Default:
  1. Defaulted from the tax rate on the tax code (p_tax_code/p_vat_tax_id).

  2. Defaulted from the p_tax_amount when the tax amount is specified for the ad-hoc tax code case.


Validation: For 'Accrual' accounting method, tax rate can be specified only in case of an ad-hoc tax code (p_tax_code/p_vat_tax_id) and the profile option 'Tax: Allow Ad Hoc Tax Changes' set to Yes. For 'Cash basis' accounting method, the tax_rate should never be specified.
Error: AR_RAPI_TAX_RATE_INVALID AR_RAPI_TAX_RATE_AMT_X_INVALID
p_tax_amount IN NUMBER   The tax amount specified in case where you override the rate for an ad-hoc tax code. It is used to derive the tax_rate.
Default: None
Validation: This needs to be specified only in case of an ad-hoc tax code (p_tax_code/p_vat_tax_id) and the profile option 'Tax: Allow Ad Hoc Tax Changes' set to Yes. For 'Cash basis' accounting method, the tax_amount should never be specified
Error: AR_RAPI_TAX_RATE_AMT_X_INVALID
p_deposit_date IN DATE   The deposit date.
Default: Receipt date
Validation: None
Error: None
p_reference_type IN VARCHAR2(30)   Indicates whether this miscellaneous receipt is a 'PAYMENT', 'RECEIPT', 'PAYMENT_BATCH' or 'REMITTANCE'.
Default: None
Validation:
  • Check it for the specified valid values.

  • Should not have a null value if either p_reference_id or p_reference_num is specified.


Error: AR_RAPI_REF_TYPE_INVALID AR_RAPI_REF_TYPE_NULL
p_reference_id IN NUMBER(15)   A foreign key to AR_BATCHES, AR_CASH_RECEIPTS, AP_INVOICE_SELECTION_CRITERIA or AP_CHECKS, depending on the specified value of p_reference_type.
Default: None
Validation: Detailed in Validation.
Error: AR_RAPI_REF_NUM_INVALID AR_RAPI_REF_ID_INVALID
p_reference_num IN VARCHAR2(30)   The reference number. It is used for deriving the p_reference_id.
Default: None
Validation: None
Error: None
p_remittance_bank_account_id IN NUMBER(15)   Identifies the user's bank account for depositing the receipt.
Default:
  1. From remittance bank account number

  2. From the receipt method based on logic mentioned in Defaulting.


Validation: In addition to the validation logic detailed in Validation, those receipt methods which have notes_receivable = 'Y' or bill_of_exchange_flag = 'Y' on the receipt class are excluded for miscellaneous receipts.
Error: AR_RAPI_REM_BK_AC_ID_INVALID AR_RAPI_REM_BK_AC_ID_NULL
p_remittance_bank_account_num IN VARCHAR2(30)   The remittance bank account number. Used to default the remittance bank account id if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NUM_INVALID
p_remittance_bank_account_name IN VARCHAR2(50)   The remittance bank account name. Used to default the remittance bank account id if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NAME_INVALID
p_ussgl_transaction_code IN VARCHAR2(30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_receipt_method_id IN NUMBER(15)   Identifies the receipt method of the receipt.
Default: From receipt method name
Validation: In addition to the validation logic detailed in Validation, those receipt methods which have notes_receivable = 'Y' or bill_of_exchange_flag = 'Y' on the receipt class are excluded for the miscellaneous receipts.
Error: AR_RAPI_INVALID_RCT_MD_ID
p_receipt_method_name IN VARCHAR2(30)   The receipt method name of the receipt. Used to default the receipt method id if not specified
Default: None
Validation: None
Error: AR_RAPI_RCPT_MD_NAME_INVALID
p_doc_sequence_value IN NUMBER   Value assigned to document receipt.
Default: Detailed in Defaulting.
Validation:
  • User should not pass in the value if the current document sequence is automatic

  • Document sequence value should not be entered if profile option Sequential Numbering is set to Not Used


Error: AR_RAPI_DOC_SEQ_AUTOMATIC AR_RAPI_DOC_SEQ_VAL_INVALID
p_anticipated_clearing_date IN DATE   Date the receipt is expected to be cleared.
Default: None
Validation: greater than or equal to gl_date
Error: AR_RW_EFFECTIVE_BEFORE_GL_DATE
p_attribute_rec IN attribute_rec_type   This is a record type which contains all 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Information flexfield.
Default: DFF APIs used to do the defaulting and validation
Validation: DFF APIs used to do the defaulting and validation
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_rec IN global_attribute_rec_type   This is a record type which contains all 20 global descriptive flexfield segments and one global descriptive flexfield structure defining column.
Default: None
Validation: None
Error:
p_comments IN VARCHAR2(240)   User's comments.
p_misc_receipt_id OUT NUMBER(15) Yes The cash_receipt_id of the receipt created by the API call.
p_called_from IN VARCHAR2 (20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_org_id        

Ar_receipt_api_pub.apply_other_account

Call this routine to do an "other" account application on a cash receipt. Typically this would be to create a claim investigation application with a noninvoice-related deduction or overpayment in Trade Management (if installed).

This API routine has 4 output and 27 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 19 + 1 (descriptive flexfield record type)

1 (global descriptive flexfield record type)

Output

Standard API parameters: 3

Application parameters: 1

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the other account application-related parameters of the API:

Parameter Type Data-type Required Description
p_cash_receipt_id IN NUMBER (15)   The cash_receipt_id of the receipt which is to be applied to the "other" account.
Default: None
Validation:
  1. Type must be ‘CASH'.

  2. Status must not be Reversed or Approved.

  3. The receipt must not be Unidentified.


Error: AR_RAPI_CASH_RCPT_ID_INVALID AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2 (30)   The receipt number of the receipt to be applied to the "other" account. Used to default the cash_receipt_id.
Default: None
Validation: None
Error : AR_RAPI_RCPT_NUM_INVALID
p_amount_applied IN NUMBER   The amount on the cash receipt that is to be applied to the "other" account.
Default: Amount due remaining on the receipt.
Validation: Less than or equal to the amount due remaining on the receipt.
Error:
AR_RAPI_APPLIED_AMT_NULL
AR_RW_AMOUNT_LESS_THAN_APP
p_applied_payment_schedule_id IN NUMBER (15) Yes This payment schedule identifier corresponds to special seeded values, such as –4 (for Claim Investigation).
Default:
Validation: The value should correspond to the special seeded values, such as -4 (Claim Investigation).
Error: AR_RAPI_APP_PS_ID_INVALID
p_receivables_trx_id IN NUMBER (15)   Identifier of receivables activity.
Default: None
Validation:
  1. Valid database value.

  2. The activity_type for the receivables_trx_id should be in sync with the provided applied payment schedule identifier.


Error :
AR_RAPI_REC_TRX_ID_INVALID
AR_RAPI_ACTIVITY_X_INVALID
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date.

  2. System date, if receipt date < system date.


Validation: apply date >= receipt date
Error: AR_APPLY_BEFORE_RECEIPT
p_apply_gl_date IN DATE   Date when this application will be posted to the General Ledger.
Default: Defaulted to greater of the receipt date and the system date.
Validation:
  1. Validated as per standard gl date validation described for the gl date in the Create_cash routine.

  2. >= receipt gl date


Error:
AR_INVALID_APP_GL_DATE
AR_RW_GL_DATE_BEFORE_REC_GL
p_ussgl_transaction_code IN VARCHAR2 (30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_attribute_rec IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs used to do the defaulting and validation.
Validation: DFF APIs used to do the defaulting and validation.
Error : AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_rec IN global_attribute_rec_type   This is a record type which contains all the global descriptive flexfields: one global descriptive flexfield structure defining column and 20 segments.
Default: None
Validation: None
Error: None
p_comments IN VARCHAR2 (240)   User's comments for the other account application.
p_application_ref_type IN VARCHAR2 (30) Yes Defines the context of the application reference columns. For Trade Management, the value should be ‘CLAIM'.
Default: None
Validation: Must be ‘CLAIM' if a Trade Management deduction is being created (Trade Management must be installed).
Error: AR_RAPI_INVALID_APP_REF
p_application_ref_id IN NUMBER (15)   Not used. Leave null.
p_application_ref_num IN VARCHAR2 (30)   The reference number relating to the application reference type. If application reference type is ‘CLAIM', then this would be a deduction number.
Default: None
Validation: If populated, then must be an existing deduction number in Trade Management.
Error: AR_RAPI_INVALID_CLAIM_NUM
p_secondary_application_ref_id IN NUMBER (15)   The secondary application reference ID related to the application reference type.
Default: None
Validation: If populated, and if application reference type is ‘CLAIM', then this must contain a valid claim ID in Trade Management.
Error: AR_RW_INVALID_CLAIM_ID
p_payment_set_id IN NUMBER (15)   Payment set ID is populated only for a prepayment receipt which is to be applied to the "other" account.
Default: None
Validation: None
p_receivable_application_id OUT NUMBER (15)   The ID of the resulting activity receivable application.
p_application_ref_reason IN VARCHAR2 (30)   The reason code related to the application reference type.
Default: None
Validation: If populated, and if application reference type is ‘CLAIM', then this must contain a valid reason code ID from Trade Management.
Error: AR_RAPI_INVALID_REF_REASON
p_customer_reference IN VARCHAR2 (100)   Customer supplied reference.
p_customer_reason IN VARCHAR2 (30)   Reason code supplied by customer, in the context of an application reference type of ‘CLAIM'.
Default: None
Validation: None in Oracle Receivables (the attempt to match to an Oracle reason code is made in Trade Management).
p_called_from IN VARCHAR2 (20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_org_id        

Example

Objective:

To apply a cash receipt in functional currency to Claim Investigation, and to create a non-invoice overpayment in the functional currency using a call to the API Ar_receipt_api_pub.apply_other_account and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_cr_2'  
p_receivables_trx_id 1400  
p_application_ref_type 'CLAIM'  
p_applied_payment_schedule_id -4  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   23927
p_gl_date   01-JUN-2000
p_apply_date   01-JUN-2000
p_amount_applied   100

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.unapply_other_account

Call this routine to do a reversal of an "other" account application on a cash receipt.

This API routine has 3 output and 11 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 7

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the other account unapplication-related parameters of the API:

Parameter Type Data-type Required Description
p_cash_receipt_id IN NUMBER (15)   The cash_receipt_id of the receipt which is to be applied to the "other" account.
Default: None
Validation:
  1. Type must be ‘CASH'.

  2. Status must not be Reversed or Approved.

  3. The receipt must not be Unidentified.


Error:
AR_RAPI_CASH_RCPT_ID_INVALID
AR_RAPI_CASH_RCPT_ID_NULL
p_receipt_number IN VARCHAR2 (30)   The receipt number of the receipt from which the "other" account application is to be unapplied. Used to default the cash_receipt_id.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID
p_receivable_application_id IN NUMBER (15)   Identifies the receivable application. Used to derive the customer trx id, cash_receipt_id, and the applied_ps_id, if not specified.
Default: Refer to Validation.
Validation:
  1. Application type = ‘CASH'.

  2. Display flag = ‘Y' (latest application) and status = ‘OTHER ACC'.

  3. The applied payment schedule id of the receivable application record must correspond to the p_applied_payment_schedules_id, if specified.

  4. The cash receipt id must correspond to the cash receipt id specified.


Error: AR_RAPI_REC_APP_ID_INVALID
p_reversal_gl_date IN DATE   The reversal gl date.
Default: Gets defaulted to the application gl date if it is a valid gl_date.
Validation:
It is valid if the following conditions are true:
  • The date is in an Open or Future period.

  • The period cannot be an Adjustment period.

  • The reversal GL date >= application GL date.

  • The reversal GL date >= receipt GL date.


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE AR_RW_BEFORE_APP_GL_DATE AR_RW_BEFORE_RECEIPT_GL_DATE
p_called_from IN VARCHAR2 (20)   Indicates which program is calling this API.
Default: None
Validation: None
Error: None
p_cancel_claim_flag IN VARCHAR2 (1)   Not used. Leave null.
p_org_id        

Example

Objective:

To unapply an "other" account application using the call to API Ar_receipt_api_pub.unapply_other_account and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receivable_application_id 10053  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   20338
p_reversal_gl_date   01-JUN-2000

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.apply_open_receipt

Call this routine to apply a cash receipt to another open receipt. Open receipts include unapplied cash, on-account cash, and claim investigation applications. Claim investigation applications can be applied only if Trade Management is installed.

This API routine has 8 output and 19 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 13 + 2 (descriptive and global descriptive flexfield record type)

Output

Standard API parameters: 3

Application parameters: 5

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the apply open receipt-related parameters of the API:

Parameter Type Data-type Required Description
p_cash_receipt_id IN NUMBER (15)   The cash_receipt_id of the receipt which is to be applied to an open receipt.
Default: None
Validation:
  1. Type must be ‘CASH'.

  2. Status must not be Reversed or Approved.

  3. The receipt must not be Unidentified.

  4. The receipt being applied and the open receipt must have the same currency.


Error: AR_RAPI_CASH_RCPT_ID_INVALID AR_RAPI_CASH_RCPT_ID_NULL AR_RW_NET_DIFF_RCT_CURR
p_receipt_number IN VARCHAR2 (30)   The receipt number of the receipt to be applied to an open receipt. Used to default the cash_receipt_id. The receipt being applied and the open receipt must have the same currency.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID AR_RW_NET_DIFF_RCT_CURR
p_applied_payment_schedule_id IN NUMBER (15)   Not used. Leave null.
p_open_cash_receipt_id IN NUMBER (15)   The cash_receipt_id of the open receipt which is to be applied to.
Default: None
Validation:
  1. Type must be ‘CASH'.

  2. Status must not be Reversed or Approved.

  3. The receipt must not be Unidentified.

  4. The receipt being applied and the open receipt must have the same currency.


Error: AR_RAPI_CASH_RCPT_ID_INVALID AR_RAPI_CASH_RCPT_ID_NULL AR_RW_NET_DIFF_RCT_CURR
p_open_receipt_number IN VARCHAR2 (30)   The receipt number of the open receipt. Used to default the open cash_receipt_id. The receipt being applied and the open receipt must have the same currency.
Default: None
Validation: None
Error: AR_RAPI_RCPT_NUM_INVALID AR_RW_NET_DIFF_RCT_CURR
p_open_rec_app_id IN NUMBER (15)   The ID of the receivable application of the open receipt, if on-account or claim investigation.
Default: None
Validation: Must have status of ACC or OTHER ACC, and display must be ‘Y'.
Errors: AR_RAPI_REC_APP_ID_INVALID AR_RW_NET_OPEN_RCT_ONLY
p_amount_applied IN NUMBER (15)   The amount on the cash receipt that is to be applied to an open receipt.
Default: None
Validation: Must be a natural application, i.e. it must move the balance on the open receipt closer to zero.
Error:
AR_RAPI_APPLIED_AMT_NULL
AR_RW_AMOUNT_LESS_THAN_APP
AR_RW_NET_OPEN_AMT_INC
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date.

  2. System date, if receipt date < system date.


Validation: apply date >= receipt date.
Error: AR_APPLY_BEFORE_RECEIPT
p_apply_gl_date IN DATE   Date when this application will be posted to the General Ledger.
Default: Defaulted to greater of the receipt GL date, the open receipt GL date, and the system date.
Validation:
  1. Validated as per standard gl date validation described for the gl date in the Create_cash routine.

  2. >= receipt gl date.


Error:
AR_INVALID_APP_GL_DATE
AR_RW_GL_DATE_BEFORE_REC_GL
AR_RW_GL_DATE_BEFORE_OPEN_REC
p_ussgl_transaction_code IN VARCHAR2 (30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_attribute_rec IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs used to do the defaulting and validation.
Validation: DFF APIs used to do the defaulting and validation.
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_rec IN global_attribute_rec_type   This is a record type which contains all the global descriptive flexfields: One global descriptive flexfield structure defining column and 20 segments.
Default: None
Validation: None
Error: None
p_comments IN VARCHAR2 (240)   User's comments for the other account application.
x_application_ref_num OUT VARCHAR2 (30)   The reference number from the open receipt application, if applicable. If the application reference type is ‘CLAIM', then this would be a deduction number.
x_receivable_application_id OUT NUMBER (15)   The ID of the resulting payment netting receivable application.
x_applied_rec_app_id OUT NUMBER (15)   The ID of the corresponding payment netting receivable application created on the applied-to receipt.
x_acctd_amount_applied_from OUT NUMBER (15)   Amount applied from the receipt, in functional currency and converted using the main receipt's exchange rate.
x_acctd_amount_applied_to OUT VARCHAR2 (30)   Amount applied to the open receipt, in functional currency and converted using the open receipt's exchange rate. Used in conjunction with x_applied_amount_applied_from to determine exchange gain/loss.
p_called_from IN VARCHAR2 (20)   This parameter is used to identify the calling routine.
Default: None
Validation: None
Error: None
p_org_id        

Example

Objective:

To apply a cash receipt in your functional currency to unapplied cash on another receipt, using a call to the API Ar_receipt_api_pub.apply_open_receipt and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number 'aj_test_cr_10'  
p_open_receipt_number 'aj_test_cr_30'  
p_amount_applied -200  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_cash_receipt_id   23935
p_open_cash_receipt_id   23973
p_gl_date   01-JUN-2000
p_apply_date   01-JUN-2000

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.unapply_open_receipt

Call this routine to reverse a payment netting application on a cash receipt.

This API routine has 3 output and 8 input parameters in total. Based on the type, the following is the breakdown of the parameters:

Input

Standard API parameters: 4

Application parameters: 4

Output

Standard API parameters: 3

Application parameters: 0

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the descriptions of the unapply open receipt-related parameters of the API:

Parameter Type Data-type Required Description
p_receivable_application_id IN NUMBER(15)   Identifies the receivable application to be unapplied.
Default: Refer to Validation.
Validation:
  1. Application type = ‘CASH'.

  2. Display flag = ‘Y' (latest application) and status = ‘ACTIVITY', receivables_trx_id = -163.

  3. Unapplying this application must not result in either receipt becoming negative.


Error: AR_RAPI_REC_APP_ID_INVALID AR_RW_NET_UNAPP_OVERAPP
p_reversal_gl_date IN DATE   The reversal gl date.
Default: Gets defaulted to the application gl date if it is a valid gl_date.
Validation:
It is valid if the following conditions are true:
  • The date is in an Open or Future period.

  • The period cannot be an Adjustment period.

  • The reversal GL date >= application GL date.

  • The reversal GL date >= receipt GL date.


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE AR_RW_BEFORE_APP_GL_DATE AR_RW_BEFORE_RECEIPT_GL_DATE
p_called_from IN VARCHAR2(20) Yes Indicates which program is calling this API.
Default: None
Validation: None
Error: None
p_org_id        

Example

Objective:

To unapply an open receipt/payment netting application using the call to API Ar_receipt_api_pub.unapply_open_receipt and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receivable_application_id 10055  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_reversal_gl_date   01-JUN-2000

The retrieval and handling of the warnings and error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Ar_receipt_api_pub.Create_apply_on_acc

This routine is called to create a cash receipt and place it on account. Use this routine when no specific debit item is referenced for receipt application, but you do not want to leave the cash as an unapplied liability.

This is essentially a superset of Ar_receipt_api_pub.Create_cash and Ar_receipt_api_pub.Apply_on_account APIs, and contains the same parameters as contained in those two APIs. During the call to this API, if the receipt is successfully created but its on-account application fails, then the receipt creation is also rolled back.

This routine calls Oracle Payments, where required. See Integration with Oracle Payments.

Note: To create credit card receipts that need to be processed by Oracle Payments APIs, you must pass the p_call_payment_processor parameter as fnd_api.g_true. Additionally, you must specify the p_customer_bank_account_id parameter.

This API routine has 4 output and 57 input parameters:

Input

Standard API parameters: 4

Application parameters: 49 + 2 (descriptive flexfield parameter)

+ 2 (global descriptive flexfield parameter)

Output

Standard API parameters: 3

Application parameters: 1

Parameter Descriptions

For a description of this routine's standard parameters, see Ar_receipt_api_pub.Create_cash.

The following table lists the parameters that pertain specifically to the receipt creation and on-account application routine:

Parameter Type Data-type Required Description
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 (15)   The actual currency code that gets stored in AR tables.
Default:
  1. Derived from p_usr_currency_code if entered, else

  2. Defaults to the functional currency code


Validation: Validated against the currencies in the 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 (30)   Exchange rate type stored in AR tables.
Default:
  1. In case of foreign currency receipt, derived from p_usr_exchange_rate_type.

  2. In case of foreign currency receipt, defaults from AR: Default Exchange Rate Type profile option.

  3. Should be left null, if receipt is in the same denomination as functional currency.


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:
  1. Derived from the Daily Rates table for rate_type <> 'User' in case of non-functional currency.

  2. If profile option Journals: Display Inverse Rate = ‘Y', set user-entered value to 1/ p_exchange_rate.

  3. The entered value is rounded to a precision of 38.


Validation:
  1. In case of non-functional currency, the rate should have a positive value for rate type='User'.

  2. For non-functional currency and type <> '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 non-functional currency and type <> 'User', a valid rate should exist in the database for this date. This is a cross validation of type, currency, and date.
Error: AR_NO_RATE_DATA_FOUND
p_amount IN NUMBER Yes The cash receipt amount.
Default: Null
Validation: > 0
Error: AR_RAPI_REC_AMT_NEGATIVE AR_RAPI_RCPT_AMOUNT_NULL
p_factor_discount_amount IN NUMBER   The bank charges on the cash receipt.
Default: None
Validation:
  1. Bank charges are not allowed if profile option AR: Create Bank Charges = ‘No'.

  2. Bank charges not allowed if the receipt state, derived from the receipt class of the receipt method, <> ‘CLEARED'.

  3. If allowed, then >= 0.


Error: AR_BK_CH_NOT_ALLWD_IF_NOT_CLR AR_JG_BC_AMOUNT_NEGATIVE
p_receipt_number IN VARCHAR2 (30)   The receipt number of the receipt to be created.
Default: If not specified, the receipt number is defaulted from the document sequence value.
Validation: Receipt number should not be null.
Error: AR_RAPI_RCPT_NUM_NULL
p_receipt_date IN DATE   The receipt date of the entered cash receipt.
Default: System date
Validation: None
Error: None
p_gl_date IN DATE   Date that this receipt will be posted to the general ledger.
Default: Gets defaulted to the receipt date if it is a valid gl_date.
Validation: The date is valid if the following conditions are true:
  • The date is in an Open or Future period

  • The period cannot be an Adjustment period


If the date is invalid, then:
  • If the most recent open period is prior to the receipt date: last date of that period

  • If there is a period open after the receipt date: first date of the last open period


Error: AR_INVALID_APP_GL_DATE
p_maturity_date IN DATE   Receipt maturity date.
Default: Deposit date
Validation: >= p_receipt_date
Error: AR_RW_MAT_BEFORE_RCT_DATE
p_customer_id IN NUMBER (15)   The customer_id for the paying customer.
Default: Refer to Defaulting.
Validation:
  1. Customer exists and has prospect code = ‘CUSTOMER'

  2. Customer has a profile defined at the customer level


Error: AR_RAPI_CUST_ID_INVALID
p_customer_name IN VARCHAR2 (50)   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_customer_number IN VARCHAR2 (30)   The customer number. Used to default the customer_id if not specified.
Default: None
Validation: None
Error: AR_RAPI_CUS_NUM_INVALID
p_customer_bank_account_id IN NUMBER (15)   The customer bank account id.
Default: From bank account id/number
Validation:
  1. It must be a valid bank account of the paying customer .

  2. The inactive date (if defined) of the bank account should be greater than the receipt_date.

  3. The receipt date must be within the Start date and the End date of the bank account uses.


Error: AR_RAPI_CUS_BK_AC_2_INVALID AR_RAPI_CUS_BK_AC_ID_INVALID
p_customer_bank_account_num IN VARCHAR2 (30)   The customer bank account number. Used to default the customer bank account id, if not specified.
Default: None
Validation: None
Error: None
p_customer_bank_account_name IN VARCHAR2 (80)   The customer bank account name. Used to default the customer bank account id, if not specified.
Default: None
Validation: None
Error: None
p_location IN VARCHAR2 (40)   The Bill_To location for the customer. Used to derive the p_customer_site_use_id.
Default: None
Validation: None
Error: AR_RAPI_CUS_LOC_INVALID
p_customer_site_use_id IN NUMBER (15)   The Bill_To site_use_id for the customer.
Default:
  1. Defaulted from customer location. Otherwise,

  2. Primary Bill_To customer site_use_id of the customer.


Validation: It should be a valid Bill_To site of the paying customer.
Error: AR_RAPI_CUS_SITE_USE_ID_INVALID
p_customer_receipt_reference IN VARCHAR2 (30)   This column is used to store a customer receipt reference value supplied by the customer at the confirmation time.
Default: None
Validation: None
Error: None
p_override_remit_bank_account_flag IN VARCHAR2 (1)   The flag value decides when the remittance bank account is can be overridden by the remittance selection process.
Default: ‘Y'
Validation: valid values ‘Y' and ‘N'
Error: AR_RAPI_INVALID_OR_REMIT_BK_AC
p_remittance_bank_account_id IN NUMBER (15)   Identifies the user's bank account for depositing the receipt.
Default:
  1. From remittance bank account number

  2. From the receipt method based on logic mentioned in Defaulting.


Validation: Validation logic detailed in Validation.
Error: AR_RAPI_REM_BK_AC_ID_INVALID AR_RAPI_REM_BK_AC_ID_NULL
p_remittance_bank_account_num IN VARCHAR2 (30)   The remittance bank account number. Used to default the remittance bank account id, if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NUM_INVALID
p_remittance_bank_account_name IN VARCHAR2 (50)   The remittance bank account name. Used to default the remittance bank account id, if not specified.
Default: None
Validation: None
Error: AR_RAPI_REM_BK_AC_NAME_INVALID
p_deposit_date IN DATE   The deposit date.
Default: receipt date
Validation: None
Error: None
p_receipt_method_id IN NUMBER (15)   Identifies the receipt method of the receipt.
Default: From receipt method name.
Validation: Validation detailed in Validation.
Error: AR_RAPI_INVALID_RCT_MD_ID
p_receipt_method_name IN VARCHAR2 (30)   The receipt method name of the receipt. Used to default the receipt method id if not specified.
Default: None
Validation: None
Error: None

Note: To use credit card refund functionality, ensure that remittance of the original receipt is performed within Oracle Receivables. Do this by setting the remittance method on the receipt method's associated receipt class to Standard.

Warning: If you use this API to both authorize and capture credit card payments, then set the remittance method to None. Note, however, that with this setting, you cannot use standard credit card refund functionality. Instead, you must refund such payments outside Receivables.

p_doc_sequence_value IN NUMBER   Value assigned to document receipt.
Default: Detailed in Defaulting.
Validation:
  • User should not pass in the value if the current document sequence is automatic.

  • Document sequence value should not be entered if profile option Sequential Numbering is set to Not Used.


Error: AR_RAPI_DOC_SEQ_AUTOMATIC AR_RAPI_DOC_SEQ_VAL_INVALID
p_ussgl_transaction_code IN VARCHAR2 (30)   Code defined by public sector accounting.
Default: None
Validation: None
Error: None
p_anticipated_clearing_date IN DATE   Date the receipt is expected to be cleared.
Default: None
Validation: >= gl_date
Error: AR_RW_EFFECTIVE_BEFORE_GL_DATE
p_event IN VARCHAR2   The event that resulted in the creation of the receipt. Currently used only by Bills Receivable.
Default: None
Validation: None
Error: None
p_called_from IN VARCHAR2 (20)   This parameter is used to identify the calling routine. Currently used to identify only the ‘BR_REMIT' program.
Default: None
Validation: None
Error: None
p_attribute_record IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Information flexfield.
Default: DFF APIs complete the defaulting and validation.
Validation: DFF APIs complete the defaulting and validation.
Error: AR_RAPI_DESC_FLEX_INVALID
p_global_attribute_record IN global_attribute_rec_type   This is a record type which contains all the 20 global descriptive flexfield segments and one global descriptive flexfield structure defining column.
Default: None
Validation: None
p_receipt_comments IN VARCHAR2 (240)   User's comments for the application.
p_issuer_name IN VARCHAR2 (50)   Issuer name of notes receivable (Asia Pacific requirement).
Default: None
Validation: None
Error: None
p_issue_date IN DATE   Date when notes receivable was issued (Asia Pacific requirement).
Default: None
Validation: None
Error: None
p_issuer_bank_branch_id IN NUMBER (15)   Bank/ Branch issuing the notes receivable (Asia Pacific Requirement).
Default: None
Validation: None
Error: None
p_cr_id OUT NUMBER (15)   The cash_receipt_id of the receipt created by the API call.
p_amount_applied IN NUMBER   The amount on the cash receipt that is to be applied to an account.
Default: The default amount applied can be either the open amount of the transaction or the unapplied amount of the receipt, but you can change it. Use the AR: Always Default Transaction Balance for Applications profile option, Oracle Receivables Implementation Guide to control how Receivables defaults the applied amount.
For the profile option's defaulting rules, see Ar_receipt_api_pub.Apply.
Validation: Less than or equal to the amount due remaining on the receipt.
Error: AR_RAPI_APPLIED_AMT_NULL AR_RW_AMOUNT_LESS_THAN_APP
p_apply_date IN DATE   Date the application was applied.
Default:
  1. Receipt date, if receipt date >= system date.

  2. System date, if receipt date < system date.


Validation: apply date >= receipt date
Error: AR_APPLY_BEFORE_RECEIPT
p_apply_gl_date IN DATE   Date that this application will be posted to the general ledger.
Default: Defaulted to greater of the receipt date and the system date.
Validation:
  1. Validated as per standard gl date validation described for the gl date in create_cash routine

  2. >= receipt gl date


Error: AR_INVALID_APP_GL_DATE AR_RW_GL_DATE_BEFORE_REC_GL
p_app_ussgl_transaction_code IN VARCHAR2 (30)   Code defined by public sector accounting.
Default: None
Validation: None
p_app_attribute_record IN attribute_rec_type   This is a record type which contains all the 15 descriptive flexfield segments and one descriptive flexfield structure defining column. It represents the Receipt Application Information flexfield.
Default: DFF APIs complete the defaulting and validation.
Validation: DFF APIs complete the defaulting and validation.
Error: AR_RAPI_DESC_FLEX_INVALID
p_app_global_attribute_record IN global_attribute_rec_type   This is a record type which contains all the 20 global descriptive flexfield segments and one global descriptive flexfield structure defining column.
Default: None
Validation: None
app_comments IN VARCHAR2 (240)   User's comments for the application.
p_application_ref_num IN VARCHAR2 (30)   Deduction number, if resulting from Trade Management claim settlement.
p_secondary_application_ref_id IN NUMBER (15)   Claim ID, if resulting from Trade Management claim settlement.
p_customer_reference IN VARCHAR2 (100)   Reference supplied by customer.
p_customer_reason IN VARCHAR2 (20)   Reason code supplied by customer.
p_secondary_app_ref_type IN VARCHAR2 (30)   Used for automated receipt handling, leave null.
p_secondary_app_ref_num IN VARCHAR2 (30)   Used for automated receipt handling, leave null.
p_call_payment_processor IN VARCHAR2 (1)   This is the payment processing indicator flag. Pass as FND_API.G_TRUE, if you want to call iPayment payment APIs for credit card processing.
p_default_site_use IN VARCHAR2 No Indicates if you want to default the site use from p_customer_site_use_id.
The default value is Y. Pass N to default nothing.
If the Require Billing Location for Receipts system option is selected, then no value is required here.

Example

Objective:

To create a cash receipt and apply to On Account in the functional currency using a call to the API Ar_receipt_api_pub.Create_Apply_on_acc and passing a minimum number of input parameters.

This table lists the entered parameters:

Parameter Entered Value Default Value
p_api_version 1.0  
p_receipt_number ‘aj_test_api_3'  
p_amount 1000  
p_receipt_method_id 1001  
p_customer_name ‘Computer Service and Rentals'  

This table lists the defaulted input parameters, which were not entered:

Parameter Entered Value Default Value
p_customer_id   1006
p_currency_code   USD
p_receipt_date   19-APR-2004
p_gl_date   19-APR-2004
p_deposit_date   19-APR-2004
p_customer_site_use_id   1025
p_override_remit_bank_account_flag   ‘Y'
p_remittance_bank_account_id   10001
p_maturity_date   19-APR-2004
p_apply_gl_date   19-APR-2004
p_apply_date   19-APR-2004
p_amount_applied   1000
p_amount_applied_from   1000
p_call_payment_processor*   fnd_api.g_false

Result:

We were able to create the cash receipt 'aj_test_api_3' and then apply it to 'On account' by specifying only 5 input parameters in our call to this API. The receipt is in the functional currency. The retrieval and handling of the warnings and the error messages, put on the message stack by the API during execution, are the same as described in Defaulting.

Messages

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.

The Receipt API puts on the message stack all error messages and warnings raised during execution. You can retrieve messages and warnings as described in Exception Handling and Result Messages.

WARNINGS AND ERRORS

The following table lists all the error messages raised by the Receipt API:

TYPE

E: Error message

W: Warning message

MESSAGE_CODE MESSAGE_TEXT EXPLANATION TYPE
AR_APPLY_BEFORE_RECEIPT Apply Date must be greater than or equal to the Receipt Date.   E
AR_APPLY_BEFORE_TRANSACTION Apply Date must be greater than or equal to the Transaction Date.   E
AR_BK_CH_NOT_ALLWD_IF_NOT_CLR For a receipt status other than cleared, bank charges are not allowed.   E
AR_EXCHANGE_RATE_NEGATIVE Please enter a positive exchange rate.   E
AR_EXCHANGE_RATE_ZERO The exchange rate cannot be zero.   E
AR_INVALID_APP_GL_DATE GL date, &GL_DATE, is not in an open or future-enterable period.   E
AR_JG_BC_AMOUNT_NEGATIVE The Bank Charges amount cannot be negative.   E
AR_NO_PARTIAL_DISC No discounts allowed on this installment unless it is fully paid.   E
AR_NO_RATE_DATA_FOUND There is no rate for this currency, rate date and rate type in the database.   E
AR_OVERR_REM_BK_FLAG_INVALID Override remittance bank flag has invalid value.   E
AR_RAPI_CUS_BK_NAME_NUM_IGN Customer bank account identifier has taken a precedence over the customer bank account name and number.   W
AR_RAPI_ACTIVITY_INVALID The receivables activity name is invalid.   E
AR_RAPI_ACTIVITY_IGN Both a receivables transaction identifier and a receivables activity exist for this record. The receivables transaction identifier takes precedence over the receivables activity.   W
AR_RAPI_TAX_RATE_AMT_X_INVALID Please enter a different combination of receipt amount, tax amount, and tax rate.   E
AR_RAPI_TAX_CODE_INVALID The tax code is invalid.   E
AR_RAPI_TAX_RATE_INVALID The tax rate is invalid.   E
AR_RAPI_TAX_CODE_IGN Both a VAT identifier and a tax code exist for this record. The VAT identifier takes precedence over the tax code.   W
AR_RAPI_REC_TRX_ID_NULL Please enter a receivables transaction identifier.   E
AR_RAPI_VAT_TAX_ID_INVALID The VAT identifier is invalid.   E
AR_RAPI_REF_TYPE_INVALID The reference type is invalid.   E
AR_RAPI_REF_NUM_INVALID The reference number is invalid.   E
AR_RAPI_REF_NUM_IGN Both a reference identifier and a reference number exist for this record. The reference identifier takes precedence over the reference number.   W
AR_RAPI_REF_ID_INVALID The reference identifier is invalid.   E
AR_RAPI_REF_ID_NULL Please enter a reference identifier.   E
AR_RAPI_REF_TYPE_NULL Please enter a reference type.   E
AR_RAPI_ACTIVITY_X_INVALID The specified combination of payment schedule identifier and receivables transaction identifier is invalid. The activity type derived from the receivables_trx_id does not match with the activity type of the specified payment_schedule_id. E
AR_RAPI_AMT_APP_FROM_INVALID The allocated receipt amount and the applied amount should be same for the functional currency receipt.   E
AR_RAPI_APP_PS_ID_INVALID Applied payment schedule identifier has an invalid value.   E
AR_RAPI_APP_PS_RA_ID_X_INVALID Invalid receivable application identifier for the specified applied payment schedule identifier.   E
AR_RAPI_APPLIED_AMT_NULL Applied amount could not be defaulted. The p_applied_amount was not specified by the user and it could not be defaulted from the specified receipt or the specified transaction. For explanation on defaulting mechanism refer Defaulting E
AR_RAPI_CASH_RCPT_ID_INVALID Invalid cash receipt identifier.   E
AR_RAPI_CASH_RCPT_ID_NULL Cash receipt identifier is null.   E
AR_RAPI_CC_RATE_AMTS_INVALID The entered combination of the applied amount, allocated amount and the cross currency rate is invalid. This error is raised if the following condition is violated in the cross currency applications: p_trans_to_receipt_rate* p_amount_applied = p_amount_applied_from. E
AR_RAPI_CC_RATE_INVALID Do not enter the cross currency rate if the receipt and the transaction are in same currency. For the same currency receipt application, p_trans_to_receipt_rate should not be specified. E
AR_RAPI_CC_RATE_NULL Cross currency rate is null. In case of a cross currency receipt application, the p_trans_to_receipt_rate could neither be defaulted nor derived. E
AR_RAPI_CURR_CODE_INVALID Currency code is invalid. The specified currency code has an invalid value. E
AR_RAPI_CUS_BK_AC_2_INVALID Invalid combination of customer bank account name and number. The specified combination of the p_customer_bank_account_number and p_customer_bank_account_name is invalid and cannot be used to derive the p_customer_bank_account_id. E
AR_RAPI_CUS_BK_AC_ID_INVALID Customer bank account identifier is invalid. The specified value of p_customer_bank_account_id is invalid. E
AR_RAPI_CUS_BK_AC_NAME_INVALID Customer bank account name is invalid. The specified value of p_customer_bank_account_name is invalid. E
AR_RAPI_CUS_BK_AC_NUM_INVALID Customer bank account number is invalid. The specified value of p_customer_bank_account_number is invalid. E
AR_RAPI_CUS_LOC_INVALID Customer location is invalid for the specified customer. The specified value of p_location has an invalid value. E
AR_RAPI_CUS_NAME_INVALID Invalid customer name.   E
AR_RAPI_CUS_NAME_NUM_INVALID Invalid combination of customer name and number.   E
AR_RAPI_CUS_NUM_INVALID Invalid customer number.   E
AR_RAPI_CUS_SITE_USE_ID_INVALID Customer site use identifier is invalid for the specified customer. The specified value of p_customer_site_use_id is invalid for the given customer. It should be a valid BILL_TO site_use_id for the customer. E
AR_RAPI_CUS_STE_USE_ID_NOT_DEF Location could not be defaulted for the specified customer. Neither the user had passed in any value for the p_location / p_customer_site_use_id, nor could it be defaulted to the primary Bill_To location for the given customer. W
AR_RAPI_CUST_ID_INVALID Customer identifier is invalid.   E
AR_RAPI_CUST_ID_NULL Customer identifier is null. The p_customer_id is null. For details, refer to API Usage. E
AR_RAPI_CUS_NAME_NUM_IGN Customer identifier has taken a precedence over name and number. The specified values of p_customer_number and/or p_customer_name are ignored if the value for p_customer_id has been passed in. W
AR_RAPI_CUST_TRX_ID_INVALID Invalid customer transaction identifier.   E
AR_RAPI_CUST_TRX_ID_NULL Customer transaction identifier is null.   E
AR_RAPI_DEF_TAX_FLAG_INVALID Invalid deferred tax flag. The valid values are 'Y'/'N' E
AR_RAPI_DESC_FLEX_INVALID The entered values for the descriptive flexfield &DFF_NAME is invalid.   E
AR_RAPI_DOC_SEQ_AUTOMATIC You have passed in the document sequence value, even though the current document sequence is automatic.   E
AR_RAPI_DOC_SEQ_NOT_EXIST_A Document sequence does not exist for the current document even though profile option Sequential Numbering is set to Always Used.   E
AR_RAPI_DOC_SEQ_NOT_EXIST_P Document sequence does not exist for the current document even though profile option Sequential Numbering is set to Partially Used.   W
AR_RAPI_DOC_SEQ_VAL_INVALID Document sequence value should not be entered if profile option Sequential Numbering is set to Not Used.   E
AR_RAPI_DOC_SEQ_VALUE_NULL_A The profile option Sequential Numbering is set to Always Used and the document sequence is manual. The document sequence value is null.   E
AR_RAPI_DOC_SEQ_VALUE_NULL_P The profile option Sequential Numbering is set to Partially Used and the document sequence is manual. The document sequence value is null.   W
AR_RAPI_FUNC_CURR_DEFAULTED Functional currency defaulted as the receipt currency.   W
AR_RAPI_INS_PS_NOT_DEF_CUS The customer could not be defaulted from the applied payment schedule identifier and the installment. This error is raised if the customer_id cannot be derived from the p_applied_payment_schedule_id and the p_installment specified in the create_and_apply routine. E
AR_RAPI_INSTALL_NULL The installment number is null.   E
AR_RAPI_INVALID_APP_REF Please supply a valid application reference type.   E
AR_RAPI_INVALID_CLAIM_ID A valid claim ID &CLAIM_ID does not exist for the specified receipt and amount.   E
AR_RAPI_INVALID_CLAIM_NUM The claim is invalid. Please enter a different claim number.   E
AR_RAPI_INVALID_REF_REASON Please supply a valid reference reason.   E
AR_RAPI_MULTIPLE_ON_AC_APP More than one On Account application exists for the current receipt. Please specify the receivable application identifier. This error is raised in the unapply_on_account routine if for the specified cash receipt, more than one On Account application exists and the p_receivable_application_id is not specified. E
AR_RAPI_NON_REVERSIBLE Standard reversal not possible for this receipt. Explanation: refer to Defaulting. E
AR_RAPI_PSID_NOT_DEF_CUS The customer could not be defaulted from the applied payment schedule identifier. This error is raised in the create_and_apply routine if the customer is not entered and cannot be derived from the specified p_applied_payment_schedule_id. E
AR_RAPI_RCPT_AMOUNT_NULL Receipt amount is null. This is a required field in the create_cash and the create_and_apply routines. E
AR_RAPI_RCPT_MD_ID_NULL Receipt method identifier is null.   E
AR_RAPI_RCPT_MD_NAME_IGN Receipt method identifier has taken precedence over receipt method name.   W
AR_RAPI_RCPT_MD_NAME_INVALID Invalid receipt method name. This error is raised if the p_receipt_method_id is not passed in and the specified p_receipt_method_name is invalid. E
AR_RAPI_RCPT_NOT_APP_TO_INV There is no application of the entered receipt against the entered transaction. This error is raised in the Unapply routine, if the specified receipt has no application against the specified transaction. E
AR_RAPI_RCPT_NUM_IGN Cash receipt identifier has taken a precedence over the receipt number.   W
AR_RAPI_RCPT_NUM_INVALID Invalid receipt number.   E
AR_RAPI_RCPT_RA_ID_X_INVALID Invalid combination of receivable application identifier and the cash receipt identifier. The p_cash_receipt_id derived from the p_receivable_application_id specified by the user does not match with the p_cash_receipt_id which is either specified by the user or defaulted from the p_receipt_number. E
AR_RAPI_RCT_MD_ID_INVALID Invalid receipt method identifier.   E
AR_RAPI_RCPT_MD_NAME_INVALID Invalid receipt method name.   E
AR_RAPI_REC_APP_ID_INVALID Invalid receivable application identifier.   E
AR_RAPI_REC_APP_ID_NULL Receivable application identifier is null. BR E
AR_RAPI_REC_TRX_ID_INVALID Invalid receivable transaction identifier.   E
AR_RAPI_REM_BK_AC_2_INVALID Invalid combination of remittance bank account name and number. The specified combination of the p_remittance_bank_account_number and p_remittance_bank_account_name is invalid, and cannot be used to derive the p_remittance_bank_account_id. E
AR_RAPI_REM_BK_AC_ID_INVALID Invalid remittance bank account identifier. This error is raised if the specified p_remittance_bank_account_id is not associated with the specified p_receipt_method_id. E
AR_RAPI_REM_BK_AC_ID_NULL Remittance bank account identifier is null.   E
AR_RAPI_REM_BK_AC_NAME_INVALID Invalid remittance bank account name.   E
AR_RAPI_REM_BK_AC_NAME_NUM_IGN Remittance bank account identifier has taken a precedence over the remittance bank account name and number.   W
AR_RAPI_REM_BK_AC_NUM_INVALID Invalid remittance bank account number.   E
AR_RAPI_REV_CAT_CD_INVALID Invalid reversal category code.   E
AR_RAPI_REV_CAT_CD_NULL Reversal category code is null.   E
AR_RAPI_REV_CAT_NAME_IGN Reversal category code has taken precedence over the reversal category name.   W
AR_RAPI_REV_CAT_NAME_INVALID Invalid reversal category name.   E
AR_RAPI_REV_GL_DATE_NULL Reversal GL date is null.   E
AR_RAPI_REV_REAS_CD_INVALID Invalid reversal reason code.   E
AR_RAPI_REV_REAS_CD_NULL Reversal reason code is invalid.   E
AR_RAPI_REV_REAS_NAME_IGN Reversal reason code has taken a precedence over the reversal reason name.   W
AR_RAPI_REV_REAS_NAME_INVALID Invalid reversal reason name.   E
AR_RAPI_TRX_ID_INST_INVALID Invalid combination of the customer transaction identifier and installment.   E
AR_RAPI_TRX_INS_NOT_DEF_CUS The customer could not be defaulted from the entered transaction and the installment. This error is raised in the create_and_apply routine if the customer is not entered and cannot be derived from the specified transaction and installment. E
AR_RAPI_TRX_INS_PS_NOT_DEF_CUS The customer could not be defaulted from the entered transaction, installment and applied payment schedule identifier. This error is raised in the create_and_apply routine if the customer is not entered and cannot be derived from the specified p_customer_trx_id/trx_number, p_installment and p_applied_payment_schedule_id. E
AR_RAPI_TRX_LINE_AMT_DEFLT Amount applied has been defaulted to the line amount of the specified transaction line.   W
AR_RAPI_TRX_LINE_ID_INVALID Invalid customer transaction line identifier.   E
AR_RAPI_TRX_LINE_NO_INVALID Invalid transaction line number.   E
AR_RAPI_TRX_NOT_DEF_CUST The customer could not be defaulted from the entered transaction. This error is raised in the create_and_apply routine if the customer is not entered and cannot be derived from the specified p_customer_trx_id/trx_number. E
AR_RAPI_TRX_NUM_IGN Customer transaction identifier has taken a precedence over the transaction number.   W
AR_RAPI_TRX_NUM_INST_INVALID Invalid combination of transaction number and installment.   E
AR_RAPI_TRX_NUM_INVALID Invalid transaction number.   E
AR_RAPI_TRX_PS_ID_X_INVALID Invalid applied payment schedule identifier for the specified transaction. The p_applied_payment_schedule_id specified by the user does not match with the payment_schedule_id derived from the p_customer_trx_id and the p_installment. E
AR_RAPI_TRX_PS_NOT_DEF_CUS The customer could not be defaulted from the entered transaction and the applied payment schedule identifier. This error is raised in the create_and_apply routine if the customer is not entered and cannot be derived from the specified p_customer_trx_id/trx_number and the p_applied_payment_schedule_id. E
AR_RAPI_TRX_RA_ID_X_INVALID The activity type for the entered receivable transaction identifier does not match with the activity of the entered payment schedule identifier. This message is to be used by the API, activity_application, added as part of the Bills Receivables changes. E
AR_RAPI_USR_CURR_CODE_IGN Currency code took a precedence over the user currency code.   W
AR_RAPI_USR_CURR_CODE_INVALID User currency code is invalid.   E
AR_RAPI_USR_X_RATE_TYP_INVALID User exchange rate type is invalid.   E
AR_RAPI_USR_X_RATE_TYPE_IGN Exchange rate type took a precedence over the User exchange rate type.   W
AR_RAPI_X_RATE_DATE_INVALID Invalid exchange rate date.   E
AR_RAPI_X_RATE_INVALID Exchange rate should not be entered. This would be raised if the exchange rate type is not 'User' and the exchange rate has been specified. E
AR_RAPI_X_RATE_NULL Exchange rate is null.   E
AR_RAPI_X_RATE_TYPE_INVALID Invalid exchange rate type.   E
AR_RAPI_X_RATE_TYPE_NULL Exchange rate type is null.   E
AR_RW_AMOUNT_LESS_THAN_APP The receipt amount cannot be less than the sum of the applied and on-account amounts.   E
AR_RW_APP_NEG_ON_ACCT Amount applied cannot be negative for an On Account application.   E
AR_RW_APP_NEG_UNAPP You may not apply more than the receipt amount. This error is raised if you try to apply more than the unapplied amount on the receipt against a transaction. E
AR_RW_APPLIED_GREATER_LINE Amount applied cannot be greater than the original line amount of &AMOUNT. This error is raised in the apply and create_and_apply routines if the line number of transaction has been specified and the amount applied is greater than the original line amount of the transaction line. E
AR_RW_BEFORE_APP_GL_DATE Reversal GL Date must be on or after original GL Date of &GL_DATE.   E
AR_RW_BEFORE_RECEIPT_GL_DATE The Reversal GL Date cannot be before the Receipt GL Date.   E
AR_RW_CASH_DUPLICATE_RECEIPT A cash receipt with this number, date, amount and customer already exists.   E
AR_RW_CC_RATE_POSITIVE Cross currency rate must be greater than zero. This error is raised in the apply and create_and_apply routines if the p_trans_to_receipt_rate has a negative value. E
AR_RW_GL_DATE_BEFORE_REC_GL The GL date cannot be before the receipt GL date. This error is raised in the apply and the create_and_apply routines if the apply gl_date is before the receipt gl_date. E
AR_RW_GL_DATE_BEFORE_OPEN_REC_GL The application GL date must be later than the open receipt GL date for a receipt-to-receipt application.   E
AR_RW_MAT_BEFORE_RCT_DATE The Maturity Date cannot be before the Receipt Date.   E
AR_RW_NET_DIFF_RCT_CURR Both receipts in a receipt to receipt application must have the same currency.   E
AR_RW_NET_OPEN_AMT_INC A receipt-to-receipt application must decrease the open receipt balance or bring the receipt balance closer to zero.   E
AR_RW_NET_OPEN_RCT_ONLY Netting is allowed on open receipts only (unapplied cash, on-account cash and claim investigation applications).   E
AR_RW_NET_UNAPP_OVERAPP Unapplying this payment netting application is not allowed because it would cause the applied receipt balance to become negative.    
AR_RW_NO_DISCNT Discounts are not permitted for transactions with a negative original balance.   E
AR_RW_PAID_INVOICE_TWICE You have paid the same invoice twice. Please correct.   E
AR_RW_RCT_AMOUNT_NEGATIVE You cannot enter a negative receipt amount for cash receipts.   E
AR_RW_VAL_DISCOUNT Discount taken is greater than the discount available (&DISC_AVAILABLE).   E
AR_RW_VAL_NEG_DISCNT Discount cannot be negative.   E
AR_RW_VAL_ONACC_DISC Discount not allowed for On Account application. Clear discount amount field or enter zero.   E
AR_RW_VAL_UNEARNED_DISCOUNT Cannot take unearned discount because the Allow Unearned Discount system option is set to No.   E
AR_SYSTEM_WR_NO_LIMIT_SET Please set the receipt write-off limits range system option.   E
AR_VAL_GL_INV_GL The GL date should not be prior to the invoice's GL date.   E
AR_WR_NO_LIMIT User Write-off limit does not exist.   E
AR_WR_TOTAL_EXCEED_MAX_AMOUNT The total write-off amount must fall within the receipt write-off limits range system option.   E
AR_WR_USER_LIMIT Total write-off amount must be in the range of &FROM_AMOUNT to &TO_AMOUNT.   E