Sie sind auf Seite 1von 9

Doc Content Type: TEXT/PL

Note:1057131.6
ID: AIN
Subj HOW TO ENSURE THAT AR IS Creation Date:
20-AUG-
ect: POSTING TO GL AND THAT
1998
CONTENT MATCHES
Type Last Revision 13-JAN-
PROBLEM
: Date: 2004
Statu
PUBLISHED
s:
Overview
--------

This article contains information on how to ensure that Accounts


Receivable (AR) data is posted correctly to General Ledger (GL) and
that the content of GL matches that in AR.

Reports
-------

In order to do this, select one General Ledger account, such as one


code combination id from Trade Receipts (AR). An Account Analysis
Report in General Ledger for a given Accounting Period shows the Trade
Receivables Category. You may choose a particular General Ledger
account from here.

The report shows detail by General Ledger Batch. The Batch name
includes
the Accounts Receivable Posting Control Id. This Id can be used to tie
the transactions together.

In Accounts Receivable, run the Journal Entries Report by Category


Summary,
for:

o the same accounting period


o posted transaction
o Trade Receipts

If you are Multi-Org and have more than one install of Accounts
Receivable,
then run the Journal Entries Report for each Accounts Receivable.
Combine
these results and compare them to the Account Analysis Report.
Accounts
Receivable can be divided into several Organizations, but General
Ledger
is always combined.

Preparation
-----------

Before running the reports, ensure that everything in Accounts


Receivable
has been posted to General Ledger, and that the accounting period in
Accounts Receivable has been closed.

Also ensure that there are no transactions in the accounting period


that
are sitting on the General Ledger interface table. When posting from
Accounts Receivable to General Ledger, you are asked on the form
whether
you want to run the interface into General Ledger.

If you reply 'N', the records are waiting on the GL_interface table.
You
must go into General Ledger, run the Interface, and import all rows
before
running the Account Analysis in General Ledger.

When you run your reports, restrict them by period, not by accounts.
For
the Account Analysis Report, look for actual transactions, not budgeted
ones.

At this point, you have completed the following:

o Selected the General Ledger Period


o Ran the Account Analysis and Journal Entries Reports
o Selected the General Ledger Account for Trade Receipts (AR)

Now, you are ready to run several scripts to verify the data.

Additional Search Words


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

Interface Accounts Receivable ARGLTP Report track trace tie tieback


reconcile reconciliation ARRGTA

Accounts Receivable Posting


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

When you run a posting in Accounts Receivable, the following occurs:

1. The next posting_control_id is selected from sequence on the table


AR_POSTING_CONTROL.

2. The following information is selected from various tables:

o records that meet the gl_date range selected and are


available for posting
o approved adjustments
o completed invoices/credit memos
o receipt applications
o credit memo applications
o miscellaneous cash
These rows are locked and written in detail to the GL_Interface
table.

3. Rows are read from the GL_Interface table. The posting control id
and
gl_posted date are updated on the original Accounts Receivable
tables.

4. If the General Ledger interface was selected to be run, the rows


are
removed from GL_Interface and sent to the following General Ledger
tables:

o GL_JE_BATCHES
o GL_JE_HEADERS
o GL_JE_LINES

5. The AR_POSTING_CONTROL table is updated with the start/end dates,


gl_posted_date, and request_id of the ARGLTP and GL jobs.

6. The General Ledger account number that is displayed in the forms or


on the reports is the exploded value from the Key Accounting
flexfield.
This value is stored in the tables as the code_combination_id from
the
GL_CODE_COMBINATIONS table.

7. The following are the Accounts Receivable tables and their


contents.
For simplicity sake, assume that everything is in the same home
currency.

AR_RECEIVABLE_APPLICATIONS_ALL

Applications of all Credit Memos and Invoice/Customer


related
Receipts.

For Receipts, the amount is stored in amount_applied,


acctd_amt_applied_from, earned_discount_taken,
unearned_discount_taken.

For Credit memos, the rows stored on this table are the
transactions against the Receivable account of the
invoice, and
the opposing entry is the REC of the credit memo stored on
RA_CUST_TRX_LINE_GL_DIST_ALL.

This table stores information at the opposite sign of what


goes
to General Ledger

AR_MISC_CASH_DISTRIBUTIONS_ALL

Applications of all non invoice related Receipts.


Field used is Amount.

Again, this table stores information at the opposite sign


of
what goes to General Ledger.

AR_CASH_RECEIPT_HISTORY_ALL

These rows represent the Cash side of a transaction, and


are
tied to AR_DISTRIBUTIONS_ALL by a match of
cash_receipt_history_id on AR_CASH_RECEIPT_HISTORY_ALL to
source_id on AR_DISTRIBUTIONS_ALL.

The amount of the transaction and code_combination_id are


stored
on AR_DISTRIBUTIONS_ALL.

If a receipt has several levels of approval, or has been


reversed, there will be more than one row on
AR_CASH_RECEIPT_HISTORY_ALL which will tie to one or more
rows
on AR_DISTRIBUTIONS_ALL.

Field used is AMOUNT_DR ,AMOUNT_CR ,CODE_COMBINATION_ID


from table AR_DISTRIBUTIONS_ALL.

AR_ADJUSTMENTS_ALL

This table stores adjustments, and when these pass to


General
Ledger, the amount, and code_combination_id is the offset
against the invoices receivable account. The invoices
receivable account is stored in the
RA_CUST_TRX_LINE_GL_DIST
table.

RA_CUST_TRX_LINE_GL_DIST_ALL

This table stores all invoices, debit memos, and credit


memos.
When these records are sent to General Ledger, the REC row
is
sent with its original sign, all other account_classes
send the
transaction with the opposite of the sign that is stored.

Fields used are amount and code_combination_id.

The category used on the Journal Entries and Account Analysis


Report
determine which table the transactions originated from:

Category: Misc Receipts -AR_DISTRIBUTIONS_ALL


AR_CASH_RECEIPT_HISTORY_ALL

Category: Trade Receipts -AR_DISTRIBUTIONS_ALL


AR_CASH_RECEIPT_HISTORY_ALL)

Category: Trade Receipts (AR)


-AR_RECEIVABLE_APPLICATIONS_ALL

Category: Misc Receipts (Distributions)


-AR_MISC_CASH_DISTRIBUTIONS_ALL
)

Category: Sales Invoices -RA_CUST_TRX_LINE_GL_DIST_ALL

Category: CM Applications -RA_CUST_TRX_LINE_GL_DIST_ALL

Category: Adjustment -AR_ADJUSTMENTS_ALL


RA_CUST_TRX_LINE_GL_DIST_ALL

Category: CM Applications (AR)


-AR_RECEIVABLE_APPLICATIONS_ALL
RA_CUST_TRX_LINE_GL_DIST_ALL

SQL Scripts
-----------

The SQL scripts in this article are written for Applications Release
10.7.
Remove the '_all' for the scripts to work on lower versions of Release
10.

Follow the steps below to perform the analysis:

1. To obtain the code_combination_id, find out how many segments are


used
in the Key Accounting Flexfield, and see if they are assigned in
order.
For example, we will use 7 segments and account
01.110.000.1515.000.000000:

Select code_combination_id,
segment1,segment2,segment3,segment4,
segment5,segment6, segment7 from gl_code_combinations
where segment1 like '01%'
and segment2 like '110%'
and segment3 like '000%'
and segment4 like '1515%'
and segment6 like '000%'
and segment7 like '000000%';

1234, 01,110,000,1515,000,000000

The code_combination_id is 1234 in this example which is stored


in all of the tables you will check.

2. Determine how many posting runs were performed in Accounts


Receivable.
Use the start and end date to delineate the start and end gl_dates
of
the accounting period:
Select posting_control_id,ARGLTP_REQUEST_ID, GLLEZL_REQUEST_ID,
START_DATE, POST_THRU_DATE,INTERFACE_RUN_ID, STATUS,
GL_POSTED_DATE,
RUN_GL_JOURNAL_IMPORT_FLAG from ar_posting_control where
start_date = '01-MMM-98' and post_thru_date = '30-MMM-98';

Look for all the posting_control_id that have been created in this
period. Check the RUN_GL_JOURNAL_IMPORT_FLAG to see if any of the
runs show an 'N'. If so, they have not been passed to General
Ledger
yet.

Check GLLEZL_REQUEST_ID to see if it has been filled in. This


indicates
that the GL interface has been run.

Check the status of the row to see if ARGLTP completed correctly.

3. See if the records exist on the gl_interface tables:

select count(*) from gl_interface where group_id =


&postingcontrolid;

Note: Fill in the posting_control_id from the query in step 2.

If you find records here, then pull them into the General Ledger.
This can be done by rerunning the General Ledger Interface from
Accounts Receivable if you have a close pending on your Accounts
Receivable General Ledger period. Or, you can run it from the
General
Ledger.

4. For Category Trade Receipts (AR), you can run the query below
against
your table to determine the total for the rows. Use the
code_combination_id that you decided upon in Step 1:

Select sum(amount_applied),sum(EARNED_DISCOUNT_TAKEN),
sum(UNEARNED_DISCOUNT_TAKEN)
,code_combination_id,posting_control_id
from ar_receivable_applications_all where application_type =
'CASH'
and gl_date between '&start' and '&end'
and code_combination_id = &ccid
group by code_combination_id,posting_control_id;

If you see any rows where posting_control_id = -3, then you have
not
posted everything in the period. Go back and post them again.
Then,
start the procedure from the start, rerunning all the reports and
scripts.

Otherwise, total the three sum fields together and multiply by -1


for the amount to compare to General Ledger for this account and
period.
You can validate the total by associating a posting_control_id to
a
General Ledger batch name.

5. The posting_control_id becomes part of the je_batch name in


General
Ledger. Run the following query:

Select je_batch_id,name from gl_je_batches


where name like '%nnnn%';
where nnnn is the posting control id.

You will see results similar to the following:

1003875
AR 1003035 Receivables 1464146: A 1003035

1003875 is the je_batch_id. 1464146 is the posting_control_id.


This batch name appears on the account analysis report. You can
validate your totals at this point.

To see the detail in the General Ledger tables, continue.

6. Identify the je_batch_id's that you want and the category name
(Trade Receipts USD, Sales Invoices USD, Misc Receipts USD) and
use this information in the query below. In this example, Trade
Receipts is used:

Select je_header_id,name from gl_je_headers where


je_batch_id in
(&1batchid,&2batchid,&3batchid)
and name like 'Trade Receipts%';

The following is the result of the query in our example:

1004299
Trade Receipts USD

In our example, 1004299 is the je_header_id. Use the je_header_id


in the next step.

7. Enter the following query to obtain a total of debits and credits


for a particular General Ledger Account, header, and batch. Enter
the account (code combination id) that you want:

Select b.je_batch_id,a.je_header_id,a.code_combination_id,
a.entered_dr,a.entered_cr from gl_je_lines a,gl_je_headers
b
where a.code_combination_id = &ccid
and b.je_batch_id in (&1batchid,&2batchid,&3batchid)
and a.je_header_id = b.je_header_id
and b.name like 'Trade Receipts%'
order by b.je_batch_id,a.je_header_id;

If you post in detail, use the following to total the rows:

Select
b.je_batch_id,a.code_combination_id,sum(a.entered_dr),
sum(a.entered_cr) from gl_je_lines a,gl_je_headers b
where a.code_combination_id = &ccid
and b.je_batch_id in (&1batchid,&2batchid,&3batchid)
and a.je_header_id = b.je_header_id
and b.name like 'Trade Receipts%'
group by b.je_batch_id,a.code_combination_id;

Net the entered_dr and entered_cr and compare them by batch_id to


the posting_control_id that was used in AR.

This proves that the transactions were transferred to General


Ledger.

8. To see what is in GL and not in AR, you can run the opposite:

Select
b.je_batch_id,a.code_combination_id,sum(a.entered_dr),
sum(a.entered_cr) from gl_je_lines a,gl_je_headers b
where a.code_combination_id = &ccid
and a.period_name = '&mon-yy'
and a.je_header_id = b.je_header_id
and b.name like 'Trade Receipts%'
group by b.je_batch_id,a.code_combination_id;

The je_batch_id that was used in General Ledger is returned.


Use this to get the posting_control_id:

Select name,je_batch_id from gl_je_batches where


je_batch_id in
(&1,&2,&3);

Your results should be similar to:

AR 1003275 Receivables 1476816: A 1003275


1005055

In this example, 1476818 is the posting_control_id from Accounts


Receivable.

For trade receipts, run the following query to look for the total
in
AR:

Select sum(amount_applied),sum(EARNED_DISCOUNT_TAKEN),
sum(UNEARNED_DISCOUNT_TAKEN) ,
code_combination_id,posting_control_id,gl_posted_date
from ar_receivable_applications_all where application_type
= 'CASH'
and posting_control_id = &postincontrolid
and code_combination_id = &ccid
group by
code_combination_id,posting_control_id,gl_posted_date;

Your transactions my be in the wrong period in AR versus GL.


Usually,
you never find a discrepancy.
9. If the batch is completely missing in General Ledger, meaning you
did not find the je_batch_id for it, and it appears fine in
Accounts
Receivable, then it may have been removed from gl_interface or
deleted
in General Ledger.

The only way to recover from this is to unpost the run in Accounts
Receivable and post it again so that it goes into General Ledger.

Note: Refer to entry PR:1015419.6 entitled "HOW TO UNPOST


TRANSACTIONS IN ACCOUNTS RECEIVABLE" for the unpost
instructions.

10. If you use the Journal Entries Report to give you a total for a
particular General Ledger account, realize that this account can
be used in any given category.

There are no edits in Accounts Receivable that restrict how an


account can be used. It must be a valid account, however.

If your CASH and REC accounts are used as the same account, many
of your transactions will be invisible.

If you have a problem with the account being used, look at the
accounts
defined under your Receipt Class/Methods for Cash, Unapplied, and
On
Account.

For accounts used for anything else, look at your AutoAccounting


Rules in Accounts Receivable to see where they are defaulting
from.

Das könnte Ihnen auch gefallen