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 MAY 22, 2017

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
-----------------------
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.

STEPS
-----------------------
The issue can be reproduced with the following steps:


1. Run Create Accounting program.

2. Check the output from Create Accounting program - Subledger Accounting Program Report.




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

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

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

 

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.

 

Changes

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms