My Oracle Support Banner

R12: AP: Create Accounting Process Ends In Error: The Account On The Gain Or Loss Line Is Invalid. For A Payment Event Related To Secondary Ledger (Doc ID 2268640.1)

Last updated on APRIL 25, 2023

Applies to:

Oracle Payables - Version 12.0.0 and later
Information in this document applies to any platform.

Symptoms

When attempting to account a payment, the following error occurs:


Error Number: 0

Error Message: The account on the gain or loss line is invalid. If you have a gain/loss journal line type defined, please verify the account derivation rule attached to it on the journal line definition. If not, verify the value of the source mapped to the accounting attributes Exchange Gain Account and Exchange Loss Account.






Also, the following can be mentioned:

 

A) The FND log while running online Create Accounting for the payment shows:

--------------------------------------------------------------------

BEGIN of procedure BUILD_MESSAGE
p_appli_s_name = XLA

p_msg_name = XLA_AP_GAIN_LOSS_INVALID_CCID

 

p_msg_name = AP_ACCTG_EVENT_SKIPPED

--------------------------------------------------------------------

p_entity_id = XXXXXXX
p_event_id = YYYYYYYY

p_ledger_id = abcd

p_ae_header_id = ZZZZZZZZ

--------------------------------------------------------------------

l_msg_number = 0
END of procedure STACK_ERROR
END of procedure BUILD_MESSAGE
BEGIN of procedure BUILD_MESSAGE

--------------------------------------------------------------------

B) The Realized Gain and Realized Loss accounts are correctly set-up on:

1) Go to: Payables responsibility - Setup - Payment - Bank Accounts - <A web page is diplayed>

Search for Account Name: <Related to that payment in error>  - Click to Go

When the account name is displayed, click on it Go to section:

 

2) Payables Options - Currency tab.

 

C) In accounting table XLA_DISTRIBUTION_LINKS, for that accounting header in error, related to secondary ledger, this Journal Line Type is retrieved: AUTO_GEN_GAIN_LOSS.


Note: The accounting header in error is related to secondary ledger, event_type is PAYMENT CREATED.

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.