Query YTD Trial Balance
Hello
can any body help me in this query i need to get Ytd trial Balance
/* Formatted on 2011/10/31 12:59 (Formatter Plus v4.8.8) */
SELECT ACCOUNT, descacc, NVL (SUM (opening_balance), 0) opening_balance,
NVL (SUM (debit), 0) debit, NVL (SUM (credit), 0) credit,
NVL (SUM (ending_balance), 0) ending_balance, parent1, parent2,
parent3, parent4, parent5, :from_date,:chartid,:TO_DATE
FROM (SELECT m.segment5 ACCOUNT, w.description descacc,
(NVL (SUM (l.entered_dr), 0) - NVL (SUM (l.entered_cr), 0)
) opening_balance,
NULL debit, NULL credit, NULL ending_balance,
SUBSTR (m.segment5, 1, 1) || '0000000' parent1,
SUBSTR (m.segment5, 1, 2) || '000000' parent2,
SUBSTR (m.segment5, 1, 3) || '00000' parent3,
SUBSTR (m.segment5, 1, 4) || '0000' parent4,
SUBSTR (m.segment5, 1, 5) || '000' parent5
FROM gl_code_combinations m,
gl_je_batches c,
gl_je_categories n,
gl_je_headers h,
gl_je_lines l,
gl_ledgers t,
fnd_flex_values_vl w
WHERE h.default_effective_date < :from_date
AND m.chart_of_accounts_id = :chartid
AND h.je_header_id = l.je_header_id
AND h.je_batch_id = c.je_batch_id
AND l.code_combination_id = m.code_combination_id
AND m.chart_of_accounts_id = t.chart_of_accounts_id
AND h.currency_code IN 'SAR'
AND l.ledger_id = t.ledger_id
AND h.je_category = n.je_category_name
AND h.status = 'P'
AND w.flex_value = m.segment5
AND w.flex_value_set_id = 1014551
GROUP BY m.segment5, w.description
UNION ALL
(SELECT m.segment5 ACCOUNT, w.description descacc,
NULL opening_balance, NVL (SUM (l.entered_dr), 0) debit,
NVL (SUM (l.entered_cr), 0) credit, NULL ending_balance,
SUBSTR (m.segment5, 1, 1) || '0000000' parent1,
SUBSTR (m.segment5, 1, 2) || '000000' parent2,
SUBSTR (m.segment5, 1, 3) || '00000' parent3,
SUBSTR (m.segment5, 1, 4) || '0000' parent4,
SUBSTR (m.segment5, 1, 5) || '000' parent5
FROM gl_code_combinations m,
gl_je_batches c,
gl_je_categories n,
gl_je_headers h,
gl_je_lines l,
gl_ledgers t,
fnd_flex_values_vl w
WHERE h.default_effective_date BETWEEN :from_date AND :TO_DATE
AND m.chart_of_accounts_id = :chartid
AND h.je_header_id = l.je_header_id
AND h.je_batch_id = c.je_batch_id
AND l.code_combination_id = m.code_combination_id
AND m.chart_of_accounts_id = t.chart_of_accounts_id
AND h.currency_code IN 'SAR'
AND l.ledger_id = t.ledger_id
AND h.je_category = n.je_category_name
AND h.status = 'P'
AND w.flex_value = m.segment5
AND w.flex_value_set_id = 1014551
GROUP BY m.segment5, w.description)
UNION ALL
(SELECT m.segment5 ACCOUNT, w.description descacc,
NULL opening_balance, NULL debit, NULL credit,
(NVL (SUM (l.entered_dr), 0) - NVL (SUM (l.entered_cr), 0)
) ending_balance,
SUBSTR (m.segment5, 1, 1) || '0000000' parent1,
SUBSTR (m.segment5, 1, 2) || '000000' parent2,
SUBSTR (m.segment5, 1, 3) || '00000' parent3,
SUBSTR (m.segment5, 1, 4) || '0000' parent4,
SUBSTR (m.segment5, 1, 5) || '000' parent5
FROM gl_code_combinations m,
gl_je_batches c,
gl_je_categories n,
gl_je_headers h,
gl_je_lines l,
gl_ledgers t,
fnd_flex_values_vl w
WHERE h.default_effective_date <= :TO_DATE
AND m.chart_of_accounts_id = :chartid
AND h.je_header_id = l.je_header_id
AND h.je_batch_id = c.je_batch_id
AND l.code_combination_id = m.code_combination_id
AND m.chart_of_accounts_id = t.chart_of_accounts_id
AND h.currency_code IN 'SAR'
AND l.ledger_id = t.ledger_id
AND h.je_category = n.je_category_name
AND h.status = 'P'
AND w.flex_value = m.segment5
AND w.flex_value_set_id = 1014551
GROUP BY m.segment5, w.description))
GROUP BY ACCOUNT, descacc, parent1, parent2, parent3, parent4, parent5
ORDER BY ACCOUNT,parent5
thanks
Kamlesh,
Please note that this is a public forum and if members have something to share they would certainly reply your post. Gordon has nothing to do with this. If he has time like he usually does he may reply you with the query
But I would think that you need to make an attempt and then post to the forum if you have questions.
Good luck
Suda
Similar Messages
-
SAP B1 query for trial balance by Locations
Hi team
How i can take the trail report by location. or is there any query to take this report.
Thanks
Anantha DesaiHi,
Please check this thread:
http://scn.sap.com/thread/1188738
Thanks & Regards,
Nagarajan -
How can Get YTD in Trial Balance Custome In my query
Hello
can any body help me in this query i need to get Ytd trial Balance
/* Formatted on 2011/10/31 12:59 (Formatter Plus v4.8.8) */
SELECT ACCOUNT, descacc, NVL (SUM (opening_balance), 0) opening_balance,
NVL (SUM (debit), 0) debit, NVL (SUM (credit), 0) credit,
NVL (SUM (ending_balance), 0) ending_balance, parent1, parent2,
parent3, parent4, parent5, :from_date,:chartid,:TO_DATE
FROM (SELECT m.segment5 ACCOUNT, w.description descacc,
(NVL (SUM (l.entered_dr), 0) - NVL (SUM (l.entered_cr), 0)
) opening_balance,
NULL debit, NULL credit, NULL ending_balance,
SUBSTR (m.segment5, 1, 1) || '0000000' parent1,
SUBSTR (m.segment5, 1, 2) || '000000' parent2,
SUBSTR (m.segment5, 1, 3) || '00000' parent3,
SUBSTR (m.segment5, 1, 4) || '0000' parent4,
SUBSTR (m.segment5, 1, 5) || '000' parent5
FROM gl_code_combinations m,
gl_je_batches c,
gl_je_categories n,
gl_je_headers h,
gl_je_lines l,
gl_ledgers t,
fnd_flex_values_vl w
WHERE h.default_effective_date < :from_date
AND m.chart_of_accounts_id = :chartid
AND h.je_header_id = l.je_header_id
AND h.je_batch_id = c.je_batch_id
AND l.code_combination_id = m.code_combination_id
AND m.chart_of_accounts_id = t.chart_of_accounts_id
AND h.currency_code IN 'SAR'
AND l.ledger_id = t.ledger_id
AND h.je_category = n.je_category_name
AND h.status = 'P'
AND w.flex_value = m.segment5
AND w.flex_value_set_id = 1014551
GROUP BY m.segment5, w.description
UNION ALL
(SELECT m.segment5 ACCOUNT, w.description descacc,
NULL opening_balance, NVL (SUM (l.entered_dr), 0) debit,
NVL (SUM (l.entered_cr), 0) credit, NULL ending_balance,
SUBSTR (m.segment5, 1, 1) || '0000000' parent1,
SUBSTR (m.segment5, 1, 2) || '000000' parent2,
SUBSTR (m.segment5, 1, 3) || '00000' parent3,
SUBSTR (m.segment5, 1, 4) || '0000' parent4,
SUBSTR (m.segment5, 1, 5) || '000' parent5
FROM gl_code_combinations m,
gl_je_batches c,
gl_je_categories n,
gl_je_headers h,
gl_je_lines l,
gl_ledgers t,
fnd_flex_values_vl w
WHERE h.default_effective_date BETWEEN :from_date AND :TO_DATE
AND m.chart_of_accounts_id = :chartid
AND h.je_header_id = l.je_header_id
AND h.je_batch_id = c.je_batch_id
AND l.code_combination_id = m.code_combination_id
AND m.chart_of_accounts_id = t.chart_of_accounts_id
AND h.currency_code IN 'SAR'
AND l.ledger_id = t.ledger_id
AND h.je_category = n.je_category_name
AND h.status = 'P'
AND w.flex_value = m.segment5
AND w.flex_value_set_id = 1014551
GROUP BY m.segment5, w.description)
UNION ALL
(SELECT m.segment5 ACCOUNT, w.description descacc,
NULL opening_balance, NULL debit, NULL credit,
(NVL (SUM (l.entered_dr), 0) - NVL (SUM (l.entered_cr), 0)
) ending_balance,
SUBSTR (m.segment5, 1, 1) || '0000000' parent1,
SUBSTR (m.segment5, 1, 2) || '000000' parent2,
SUBSTR (m.segment5, 1, 3) || '00000' parent3,
SUBSTR (m.segment5, 1, 4) || '0000' parent4,
SUBSTR (m.segment5, 1, 5) || '000' parent5
FROM gl_code_combinations m,
gl_je_batches c,
gl_je_categories n,
gl_je_headers h,
gl_je_lines l,
gl_ledgers t,
fnd_flex_values_vl w
WHERE h.default_effective_date <= :TO_DATE
AND m.chart_of_accounts_id = :chartid
AND h.je_header_id = l.je_header_id
AND h.je_batch_id = c.je_batch_id
AND l.code_combination_id = m.code_combination_id
AND m.chart_of_accounts_id = t.chart_of_accounts_id
AND h.currency_code IN 'SAR'
AND l.ledger_id = t.ledger_id
AND h.je_category = n.je_category_name
AND h.status = 'P'
AND w.flex_value = m.segment5
AND w.flex_value_set_id = 1014551
GROUP BY m.segment5, w.description))
GROUP BY ACCOUNT, descacc, parent1, parent2, parent3, parent4, parent5
ORDER BY ACCOUNT,parent5
thanksThanks a lot for your reply.
I think I should have a database as a service trial.
I can't find service instance in my service.
I want to connect it by java application, but I can't get the service instance name.
Could you please tell me how to get the service instance?
Thanks a lot,
Amanda -
Hi Guys,
What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?
I have to write an AP Invoice Aging Report in Discoverer to show all unpaid invoices that have been transferred into GL... Business wants it to match one-to-one with the AP Trial Balance standard report...
Business wants to run the report for any date in a past...
The report has two parameters:
As Of Date - the same as As of Date for the AP Trial Report
Trial Balance Run Date - the date when Trial Balance was run...
Conditions are:
TRUNC(Invoice Date) <=TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
TRUNC(NVL(Payment Date,'01-JAN-5000')) > TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
TRUNC(Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
Distr Accounting Date <= TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
NVL(Distr Creation Date,Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
Show_Flag = 'YES', where:
Show_Flag = CASE WHEN ( NVL(Cancelled Date,'01-JAN-1901') > NVL(:As Of Date,SYSDATE) AND NVL(Inv Amount Aud,0) = 0 ) THEN 'YES' ELSE ( CASE WHEN NVL(Inv Amount Aud,0) = 0 THEN 'NO' ELSE 'YES' END ) END
There is a difference between the logic of my report, and the logic of AP Trial Balance...
Could you please advise what I'm missing?
Thanks,
IanaWhat is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10? You can get the code by opening the report in Reports Builder and get the query.
Or, enable trace/debug as per (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
Thanks,
Hussein -
AP Subledger Trial Balance query in R12
I have to display below columns in the output(AP Subledger Trial Balance) in R12:
GL_CODE_COMBINATIONS(Segment1,segment3,segment4)
GL_PERIODS(END_DATE)
XLA_TRIAL_BALANCES(remaining amount)
I have written a sql query but i need to satisfy below conditions in the below query. I am facing issues with the joins.can any one please help me to solve issue.
‘Accounting Period’ parameter needs to be added in the below query.
The sql query will generate the AP subledger balance data for the particular operating unit from where the report is run.
The report will give ‘at point in time’ data for the entire period for which the extract is run.
Example:
When the report is run on 01-Jul-2014 for the period ‘JUL-14′, then the report will extract all the data for JUL-14 at that point in time , i.e. the sysdate would be considered
SELECT gcc.segment1,
gcc.segment3,
gcc.segment4,
tb1.diff remaining_amount,
glp.end_date –join condition required
FROM gl_code_combinations gcc,
gl_periods glp,
(SELECT tb.code_combination_id,tb.ledger_id,
SUM (NVL (tb.acctd_rounded_cr, 0)),
SUM (NVL (tb.acctd_rounded_dr, 0)),
SUM (NVL (tb.acctd_rounded_cr, 0))
– SUM (NVL (tb.acctd_rounded_dr, 0)) diff,
tb.gl_date
FROM xla_trial_balances tb
WHERE tb.definition_code IN(‘XX_US’,’XX_CA’)
AND TRUNC(tb.gl_date) <= TRUNC(SYSDATE) –TO_DATE ('1-JUN-2014')
GROUP BY tb.code_combination_id,
tb.gl_date,tb.ledger_id
HAVING SUM (NVL (tb.acctd_rounded_cr, 0))
SUM (NVL (tb.acctd_rounded_dr, 0))) tb1
WHERE tb1.code_combination_id = gcc.code_combination_id
–Join condition required for gl_periods table to display end_date column.
–org_id and period_name parameters are requiredHi Vamsi,
I've recreated the standard oracle Trial balance package & XML file . Now i'm able to populate the data into custom table as well as standard table . But the report out doesn't show data in it . it just shows report title, columns bUT NO DATA. the xml file itself doesnt contain data. The custom report completes in 2 mins. But standard report completes in 7 mins
Steps
1. Create custom package similar to oracle standard package & added new insert statement to populate trial balance data into custom table.
2. created new datadefinition with new datatemplate(refering custom package) similar to oracle standard datatemplate.
3. create template same as standard template.
4. copy of standard conc program with custom application
5. Ran the report ...able to populate data into custom table .....but unable to see data in the report.
Please let me know if i'm missing anythng. -
AP Trial Balance Query.
I'm trying to re-create the AP Trial Balance report so I can add additional info for the Accountants allowing them to analyze the data better.
we are in R12.1.3
Can any anyone provide query that gives the same data as 'Accounts Payable Trial Balance'.
Please in urgent need....
Gurus help me out...
Thanks,
Raj.Hi,
Were u able to create customized version of AP trial balance report. Please provide somepointers if so.
Thanks
TR -
GL Trial Balance Report Query with date Effectivity
We have a requirement to show the GL Trial Balance report with Effective dates as Parameters.
Current Analysis:
The Journals get updated with corresponding CCID in GL_BALANCES table when the Journal is posted. GL_BALANCE is SOB specific, if the SOB has month as period then the balances in GL_BALANCES would get updated against the month(period).
To overcome the period problem, we explored the option of using a View based on GL_JE_HEADERS and GL_JE_LINES for 'Posted' Journal Batches of a SOB. We are checking whether the GL_JE_HEADERS.default_effective_date lies between the :p_from_date and :p_to_date which is sent to the Report as a parameter. The above idea does not return expected data when the custom Trial Balance Report is run.
Following is the Query we have written for it:
SELECT cc.segment4 ACCOUNT, bal.code_combination_id,
bal.begin_balance_dr
+ SUM (NVL (gljel.accounted_dr, 0)) opening_bal_dr,
bal.begin_balance_cr
+ SUM (NVL (gljel.accounted_cr, 0)) opening_bal_cr,
ffv.description,
(SELECT SUM (NVL (gljel.accounted_dr, 0))
FROM gl_je_headers gljeh,
gl_je_lines gljel,
gl_code_combinations gcc
WHERE gljeh.default_effective_date BETWEEN :p_from_date
AND :p_to_date
AND gljeh.je_header_id = gljel.je_header_id
AND gljel.code_combination_id = gcc.code_combination_id
AND gljel.period_name = gljeh.period_name
AND gljel.set_of_books_id = :p_set_of_books_id
AND gljeh.status = 'P'
AND gljel.status = 'P'
AND gljeh.actual_flag = 'A'
--AND gljel.code_combination_id =
-- bal.code_combination_id
AND gcc.segment4 = cc.segment4
GROUP BY gcc.segment4) c_dr,
(SELECT SUM (NVL (gljel.accounted_cr, 0))
FROM gl_je_headers gljeh,
gl_je_lines gljel,
gl_code_combinations gcc
WHERE gljeh.default_effective_date BETWEEN :p_from_date
AND :p_to_date
AND gljeh.je_header_id = gljel.je_header_id
AND gljel.period_name = gljeh.period_name
AND gljel.code_combination_id = gcc.code_combination_id
AND gljel.set_of_books_id = :p_set_of_books_id
AND gljeh.status = 'P'
AND gljel.status = 'P'
AND gljeh.actual_flag = 'A'
AND gcc.segment4 = cc.segment4
GROUP BY gcc.segment4) c_cr
FROM gl_period_statuses per,
gl_code_combinations cc,
gl_balances bal,
gl_je_headers gljeh,
gl_je_lines gljel,
fnd_flex_values_vl ffv,
fnd_flex_value_sets ffvs
WHERE cc.chart_of_accounts_id = :p_chart_of_accts_id
AND bal.currency_code = :p_currency
AND bal.actual_flag = 'A'
AND bal.period_name = per.period_name
AND cc.template_id IS NULL
AND cc.code_combination_id = bal.code_combination_id
AND per.set_of_books_id = :p_set_of_books_id
AND per.application_id = 101
AND :p_from_date BETWEEN per.start_date AND per.end_date
AND gljeh.period_name = per.period_name
AND gljeh.default_effective_date <= :p_from_date
AND gljeh.je_header_id = gljel.je_header_id
AND gljel.period_name = gljeh.period_name
AND gljel.set_of_books_id = :p_set_of_books_id
AND ffv.flex_value_set_id = ffvs.flex_value_set_id
AND ffvs.flex_value_set_name = 'JSWEL_ACCOUNT'
AND gljeh.status = 'P'
AND gljel.status = 'P'
AND cc.summary_flag = ffv.summary_flag
AND cc.segment4 = ffv.flex_value
AND gljeh.actual_flag = 'A'
AND gljel.code_combination_id = bal.code_combination_id
GROUP BY bal.begin_balance_dr,
bal.begin_balance_cr,
cc.segment4,
ffv.description,
bal.code_combination_id
The problem is that not all expected columns are being queried. Kindly advise as appropriate.
Note: I have also posted this thread on the Financials forum. Posting here to present the query to a larger audience with the expectation that my query would be answered.
Thanks & Regards
Sumitsuggest to create customize TB report.
-
Hello,
We are in process of trial balance upload for our implementation project. We have already identified Offsetting accounts for Balance sheet type of accounts. But Client wants us to upload the P&L items also.
Please let me know if we have to use P&L items also then what type of P&L offsetting account should be used (B/S type or P&L type with Retained Earnings account assigned to it?).
We need not upload any P&L items details but just the YTD balances. Are there any major concerns for the same? One concern observed by me is that different P&L accts will have different requirements like for some Material or Internal Order, etc. might be compulsory fields.
Waiting for the replies.
Thanks,
SPHi,
You can have the offestting accounts as B/S type itself. That should not be an issue.
As you said, you can upload the balances and not the line items.
In case the P&L accounts are created as cost elements also, you may have to assign a cost object to that upload item.
After upload of the trial balance, the net balance of all the offsetting accounts will be zero.
Regards,
Mike -
Hi - We use the AP Trial Balance Report as a supporting schedule to reconcile our General Ledger AP Creditor Control Account against.
Ordinarily we would use the total remaining amount at the end of the report (which has historically balanced to the GL).
The value in the remaining amount column has always equalled the value in the amount column.
However, during P12 when we have generated the report we have identified several transactions that have an amount appearing in the 'remaining amount' column but no corresponding entry in the 'amount' column.
We're not sure what the 2 column represent and why this would be the case.
Consequently by using the 'Remaining Amount' total and comparing it to the GL balance we are out by the amounts that are only appearing on one side of the AP Trial Balance.
I've looked at the accounting postings on the AP for some of the particualr records and can see that there is a debit and credit posting to expenditure that net off and and also a debit and credit posting to the AP Creditor Control Account that also net off
Can anyone provide us with an explantion please?Hi,
Please check note:553484.1, there are some queries provided to check the TB data like queries to compare XLA and GL data.
Hope it helps -
AP Invoice Aging Report by GL Date (using: Accounts Payable Trial Balance)
Hi
Need some suggestions:
I need to develop a custom report in (R12).
Account Payable Trial Balance Report, does have the capability to run as of a particular date but it does not show aging buckets. This custom report is to be developed to meet the requirements from a Payables detail perspective as well as to reconcile.
The report should show the balance due as of the report date selected. If As of Date = 5/31/11, then when the report is run on 6/15/11, it gives the results as it existed on 5/31/11. If we run it again on 8/31/11 for As of Date = 5/31/11, and again on 1/13/12, we get the EXACT SAME results each and every time except for the following fields: Current Status, Date Paid and Payment Reference Number.
The end result should be this report ties to the penny to Oracle GL as of the date selected EXCEPT for any JEs posted to the account.
Thanks
PravinHi Pravin,
For all transactions in Oracle, you will have GL dates (Accounting Dates) associated to it. If you use this date in your query to filter data, then you will get correct aging data as on a given date.
To tally with GL, you also must check if the selected transaction has been accounted?
Raajkumar G -
Hi All,
I have a query regarding the Trial balance Report.
When i run the trial balance for the period 01-04-09 to 31-12-09, I get certain figures for the accounts. When i run the Sales analysis report and the purchase analysis report, I get certain figures as well.
Now I would like to know and check whether the sale figures and the purchase figures are correct or not? How do I compare the result of the sale analysis with that of trial balance for the same period? Please guide.
Thanks,
JosephHi Joseph
The basic principle of making sure that the G/L account balances to its corresponding item group or warehouse is quite simple:
1. Never post journals to these accounts unless absolutely necessary.
2. Make sure the account determination is correct and that all transactions types are fully understood in terms of their impact on the trading stock account as well as on the moving average calculation. Remember that these 2 work hand in hand and any transaction that updates or relies on moving average will typically post an entry to the trading stock account.
I must also mention at this point in time that 2005A (I am not sure of 2005B) had issues with the updating of stocks which was fixed in 2007A. The major changes are in the way that SAP handles negative stock. In the old versions, negative stock was posted at zero cost, while in 2007A it will use the last known cost and do price adjustments automatically if the new stock purchased, which now makes the on hand positive, was at a different cost.
From your last response, it would appear that your first problem relates to not having the correct sales return account for each item group. Please change this and then run a query on all sales credit notes to determine which cost on which line was supposed to post to which trading stock account. Next post a journal, preferably one per month, to reallocate the value of the credit notes (cost of sales value) to the correct trading stock account/(s).
Next check that no other manual entries or any service documents (purchases or sales) were posted directly against the trading stock accounts. Reallocate as necessary.
Next try to run the sales analysis for one item group and one month at a time, also run the stock audit report for the same item group and month and compare.
If you still find major differences on the above then let me know. My address for mailing is exposed under my profile. I will send you some queries to run that join the stock movement tables, document tables and allow you to compare to the journal table.
Kind regards
Peter Juby -
(11) TRIAL BALANCE REPORT에 PAID 된 INVOICE가 보이는 CASE
제품 : FIN_AP
작성날짜 : 2003-05-13
TRIAL BALANCE REPORT에 PAID 된 INVOICE가 보이는 CASE
==============================================
PURPOSE
Applications 11.0.3 환경에서 AP의 Trial Balance Report 실행시 잘못 생성된 data가 보여지는 경우의 문제를 해결한다.
Problem Description
Paid 가 완전히 이루어져서 gl 로 까지 transfer 된 invoice가 trial balance report에 여전히 remaining 금액과 함께 나타나고 있다.
이 때 Payament가 한번 void 되었다가 다시 reissue 된 경우이다.
Workaround
1. Aplist11.sql 이나 아래의 select 문으로 invoice 상태를 check한다.
SELECT invoice_id, invoice_amount
FROM ap_invoices_all
WHERE invoice_num = <'problem invoice'>;
2. Trial balance에 data가 어떻게 entry 되었는지 확인한다.
SELECT *
FROM ap_trial_balance
WHERE invoice_id = <results from query #1>;
3. Invoice 에 대한 payment 정보를 확인한다.
SELECT invoice_id, invoice_payment_id, accounting_date, accrual_posted_flag,
cash_posted_flag, posted_flag
FROM ap_invoice_payments_all
WHERE invoice_id = <results from query #1>;
4. Payment에 대한 distribution line 정보를 확인한다.
SELECT invoice_payment_id, payment_line_number, line_type_lookup_code,
amount, base_amount
FROM ap_payment_distributions_all
WHERE invoice_payment_id = <invoice_payment_id returned in query #3>;
일반적으로 void 되었다가 reissue 된 payment의 trial balance가 잘못된 경우는 ap_payment_distributions_all table에 data가 잘못 생성되었기 때문이다.
위의 테이블에서 잘못 생성된 data를 correct 하거나 delete 한다음에
patch 375496 을 이용하여 trial balance 를 rebuil 하는것이 workaround 이다.
Solution Description
$AP_TOP/patch/110/sql/apautopb.pls 의 버젼이 110.6 보다 낮은경우 이런 문제 예방을 위해 AP D patchset 이상을 적용한다.
Reference Documents
NOTE 106744.1maybe OP want to extract all numbers from his inbox using regular expressions?
-
Hi Experts,
When I am generating System trial balance report, it shows null in opening balance column for some of accounts while ledger for respective accounts are showing correct figure of opening balance.
And because of this my trial balance showing wrong figures
Also, I have checked it through query report, it showing same opening balance figure as ledger report.
(Attachment for trial Bal, Ledger & Query reports for one of the account are attached here)
I have checked all selection criteria in Trial balance report, but nothing is working.
Please suggest me any solution for for above issue.
regards,
RavirajHi Raviraj
Can you confirm In Trail Balance Opening balance for the Period is OB Starts from Company Activity.
With Regards
Balaji Sampath -
R12 AP Trial Balance definition cod
Hi all,
We are trying create a New/Copied definition as follow :
Payables Responsibility > Setup > Accounting Setups > Subledger Accounting
Setups > Open Account Balances Listing Definitions
Query the Report Definition Code
Note: To search for Report Definitions created by the upgrade, select Defined By = Accounting Flexfield.
And upgraded report definitions are created by the apintbal.sql script during the upgrade with a definition code in the following format: AP_200_' || T.ledger_id
When I am searching the definition code in the following format : AP_200_' || T.ledger_id which is AP_200_2021. I am not getting any results. The message was no record found.
SELECT * 2 FROM XLA_TB_DEFINITIONS_B;
DEFINITION_CODE OBJECT_VERSION_NUMBER LEDGER_ID E BALANCE_SIDE_CODE DEFINED_BY_CODE DEFINITION_STATUS_CODE CREATION_DATE CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY LAST_UPDATE_LOGIN REQUEST_ID PROGRAM_APPLICATION_ID PROGRAM_ID PROGRAM_UPDATE_D OWNER_CODE
PH_OPEN_BALANCES 1 2021 Y C SEGMENT CHANGED 22-02-2008 09:32 1130 22-02-2008 09:32 1130 46722 C
1 row selected.
Any idea?
Thanks,
Miguel.Hi Ramana
Although the account code combination will be different but the natual account for liability will be fixed. As such the best option is to define by segment and not by accounting flexfield. So you select the type as Segment and select the segment as natural account. Then specify the liability accounts for which the trial balance is required.
In case if at any point in time, a new natural account for liability is added to your chart of account segment value, then you need to come back to the defintion and update the same. Then rebuild the trial balance. But these scenarios are very rare to occur.
Hope this helps.
Thanks
Vinit -
SRKIM: R12: Accounts Payable Trial Balance issue troubleshoot
Purpose
R12 에서 AP Trial Balance Report 확인 시 데이터가 비정상적일 경우 check 해야 하는 내용에 대해 확인 해 보도록 한다.
Question
R12 에서 invoice 생성 후 gl 로 transfer 하였으나 ap trial balance report 의 데이터가 비정상적인 것으로 확인 된다.
어떤 내용을 확인 해야 하는가.
Answer
1. APList Diagnostics Script 을 해당 invoice 에 대해 수행 하여 아래의 내용을 확인한다.
- Accounting 이 생성되어 gl로 모두 transfer 되었는지 여부.
- Accounting Date 가 Trial Balance Report 의 start date 와 as of date 안에 포함 되는지 여부
2.위의 내용에 문제가 없다면 아래 sql 로 데이터를 확인 해 보도록 한다.
select *
from xla_trial_balances
where source_entity_id in (
select entity_id
from xla.xla_transaction_entities xte
where application_id = 200
and (
(entity_code = 'AP_INVOICES' and source_id_int_1 in (&invoice_id))
OR
applied_to_entity_id in (
select entity_id
from xla.xla_transaction_entities xte
where application_id = 200
and (
(entity_code = 'AP_INVOICES' and source_id_int_1 in (&invoice_id))
3.GL 에 실제 해당 데이터가 존재 하는지 아래 sql 로 확인 해 보도록 한다.
SELECT distinct aeh.*
FROM gl_je_lines gjl, GL_IMPORT_REFERENCES gir, gl_je_headers gjh, GL_JE_BATCHES gjb, XLA_AE_LINES
ael,
XLA_AE_HEADERS aeh, XLA_EVENTS aea, xla.xla_transaction_entities xte
WHERE ael.gl_sl_link_id = gir.gl_sl_link_id
and gjh.je_batch_id= gjb.je_batch_id
and gjl.je_header_id = gjh.je_header_id
and gjl.je_header_id = gir.je_header_id
and gjl.je_line_num = gir.je_line_num
AND gir.gl_sl_link_table in ('XLAJEL')
and ael.gl_sl_link_table in ('XLAJEL')
AND aea.application_id = 200
AND aea.event_id = aeh.event_id
AND aeh.ae_header_id = ael.ae_header_id
AND gjb.je_batch_id = gir.je_batch_id
and xte.application_id = 200
and xte.entity_id = aea.entity_id
and gjh.je_header_id = gir.je_header_id
and gjh.je_source = 'Payables'
and (
(xte.entity_code = 'AP_PAYMENTS' and xte.source_id_int_1 = &check_id)
OR
(xte.entity_code = 'AP_INVOICES' and xte.source_id_int_1 = &invoice_id)
SELECT distinct gjl.*
FROM gl_je_lines gjl, GL_IMPORT_REFERENCES gir, gl_je_headers gjh, GL_JE_BATCHES gjb, XLA_AE_LINES
ael,
XLA_AE_HEADERS aeh, XLA_EVENTS aea, xla.xla_transaction_entities xte
WHERE ael.gl_sl_link_id = gir.gl_sl_link_id
and gjh.je_batch_id= gjb.je_batch_id
and gjl.je_header_id = gjh.je_header_id
and gjl.je_header_id = gir.je_header_id
and gjl.je_line_num = gir.je_line_num
AND gir.gl_sl_link_table in ('XLAJEL')
and ael.gl_sl_link_table in ('XLAJEL')
AND aea.application_id = 200
AND aea.event_id = aeh.event_id
AND aeh.ae_header_id = ael.ae_header_id
AND gjb.je_batch_id = gir.je_batch_id
and xte.application_id = 200
and xte.entity_id = aea.entity_id
and gjh.je_header_id = gir.je_header_id
and gjh.je_source = 'Payables'
and (
(xte.entity_code = 'AP_PAYMENTS' and xte.source_id_int_1 = &check_id)
OR
(xte.entity_code = 'AP_INVOICES' and xte.source_id_int_1 = &invoice_id)
4.위의 sql 을 통해 Trial Balance Table 의 데이타가 잘 못 생성 되었음이 확인 되면 해당 Trial balance table 의 데이타를 recreate 하는 작업을 수행 해야 한다.
Reference
Note. 553484.1 - THE R12 ACCOUNTS PAYABLE TRIAL BALANCE DATA IS
INCORRECT/WRONGFollow the below steps and Run the Trial Blance and let me know if it helps.
Thanks
Girish
How to Rebuild Trial Balance Data (repopulate XLA_TRIAL_BALANCES)
1. Navigate: Payables Responsibility > Setup > Accounting Setups > Subledger Accounting Setups > Open Account Balances Listing Definitions
2. Query up your Report Definition: select Defined By = Accounting Flexfield or Segment (whichever applies in your case), click “Go”
3. Click on Update icon in the "Actions" column – the definition's update page opens.
4. "Touch" the definition by simply clicking "Apply" button (without making any change).
This should start the “Open Account Balances Data Manager” concurrent processes
Maybe you are looking for
-
Report of Total GR qty/IR qty,date when last GR was passed (latest one)
Dear all Kindly let me know how to get the below report using input of PO no: Report of Total GR qty,IR qty,date when last GR was passed (latest one),date when last IR was passed (latest one) Standard t.code such as ME2n.me2l is not giving the
-
Hi friends, thinking about migration from oracle 9i to oracle 10g. We use Oracle Text indexes on text columns of some tables. Is there any advantage with oracle 10g intermedia? Which are the most significant changes? Thanks for answers.
-
Diplay data in function module
Hi I am extracting data for PLANT MAINTAINENCE application, it is in master data. Data contains in 8 tables .and display 12 fields in the report and i have to extract data in BW side. So i am using function module to extract the data from R/3 to BW s
-
Need ideas for alternative to JavaScript for comparing two inputText values
Hello I am currently using the JavaScript method to check if the values of two inputText components are equal. If the values are not equal an alert box is displayed. In either case the action on the bean is performed and in the action method the two
-
Script to auto copy everything on DVD insert
Hi, I have about 150-200 back up DVD's that I want to transfer to hard disk. The hard disk is on a headless server. I would like to have the server auto copy everything from the DVD to a certain folder when I insert it and, if possible, eject the tra