AR AGING REPORT. Why 'BalDueDeb' minus 'BalDueCred' not same as Balance?

Dear All,
I am trying to build SQL which mimics the AR Aging Report in SAP B1 8.8. Reason is to add additional fields needed by Management. I get the SAME TOTAL as Ageing, but when I run my query, I can't get the same no. of rows as Aging.
Aging has 700 rows (NOT display reconciled transactions), and my aim is to get the same no. of rows.
Case I: When I use: WHERE (T0.BalDueDeb - T0.BalDueCred) != 0
I get 816 rows. All zero balances are eliminated, but it seems that some transactions which have been reconciled appear in my report as outstanding debits and also credits. This is why it has more rows than Aging, although total is correct.
Case II: When I use: WHERE Balance !=0
I get 5026 rows. Many rows show zero balances. I don't understand why they are not eliminated. I thought the 2 commands were equivalent.
But the good news is that when I export to Excel and delete all those zero rows, I get exactly 700 rows, same as Aging!
Same total, same no. of rows!
If anybody could help me complete my query, I can continue. How can I eliminate these rows having zero balances? Where have I gone wrong?
Thanks a lot.
Leon Lai
=========================================================================================
SELECT distinct
T1.CardCode,
T1.CardName,
T0.RefDate,
CASE 
           WHEN T0.TransType=13 THEN 'IN'
           WHEN T0.TransType=14 THEN 'CN'
           WHEN T0.TransType=30 THEN 'JE'
           WHEN T0.TransType=24 THEN 'RC'
           WHEN T0.TransType=46 THEN 'PS'
           ELSE 'Error ! ! ! !'
END AS 'Document Type',
T0.Ref1 'Document Number',
CASE 
           WHEN T0.TransType=13 THEN 'IN' + T0.Ref1
           WHEN T0.TransType=14 THEN 'CN' + T0.Ref1
           WHEN T0.TransType=30 THEN 'JE' + T0.Ref1
           WHEN T0.TransType=24 THEN 'RC' + T0.Ref1
           WHEN T0.TransType=46 THEN 'PS' + T0.Ref1
           ELSE 'Error ! ! ! !'
END AS 'Concat',
T0.Account,
T0.Line_ID AS 'Row',
T0.BalDueDeb,
T0.BalDueCred,
T0.TransId AS 'Id JDT1',
(T0.BalDueDeb- T0.BalDueCred) AS 'Balance'
FROM JDT1 T0 inner join ocrd t1 on t0.Shortname = t1.CardCode
WHERE T1.CardType = 'C'
PROBLEM IS HERE--??????????????--
--and (T0.BalDueDeb - T0.BalDueCred) != 0       
and Balance != 0
-- The query gives different results depending on which of the above lines is run. Why?
PROBLEM IS HERE--??????????????--
ORDER BY T1.CardCode, T0.RefDate, T0.Ref1

Dear Gordon,
Thanks for your reply, and sorry for the incomplete reply which went beyond my control.
Here are my results using WHERE (T0.BalDueDeb - T0.BalDueCred) !=0
I have compared Aging Report with SQL Query.
Doc Type  Aging Rows         Aging Total     SQL Rows    SQL Total*
CN            57        -214,315.34     57        -214,315.34
IN           452       4,741,436.41     452       4,741,436.41
JE           134         202,209.56     267         201,584.56
PS            12         107,652.40     18         121,352.40
RC             4        -107,168.04     10        -120,243.04
           659       4,729,815.00     804        4,729,815.00
The results are messy, time consuming to generate and investigate. Too much for newbee!
The main differences lie in JE; about x2 rows in SQL Query.
This may be due to rows that have reconciled in Aging, but appear in SQL Query.
I have also prepared a list of Doc. Nos where there are differences, but too lengthy.
TO Help you understand what's happening the foll. remarks may help:
(1) The T0.Ref1 'Document Number' is empty for all JE. However, for other Doc types, these exist and agree with Aging.
(2) Although 'Document Number' is empty for JE, there is a column Ref1 which does give a reference which agrees with Aging
(3) A specific document always has 1 row in Aging, but may have several rows in my query
(4) I do not know why using:  WHERE Balance !=0 works, but it does give a near perfect result. Why not use this as starting point? After deleting all the zero rows which it cannot delete, I GET EXACTLY the same result as SAP B1 8.8 Report 'Aged Analysis of Debtors'. Same no. of rows, Same total. How to delete these zeros in SQL?
(5) In SAP B1 forum, it seems many persons still cannot arrive at the official Aging. I maybe near the correct solution, but no idea why it works.
(6) I am continuing the struggle - maybe I need to put a sub query to eliminate the zeros first?
Thanks
Leon Lai

Similar Messages

  • Aging report and Control account value not matching

    Hi All
    The value what i am getting from   Vendor liabilities aging and Control account is not matching  for the same dates, all my parameters or selection criteria are same
    Same report if i am taking for the current date it giving correctly,
    If i am trying for a previous day the problem is happening
    How can i solve this issue

    Hi,
    Please check if the transactions are done for different Control Accounts and both the account balances are included in the Aging Report.
    Also, check that ALL the customers/vendor groups are taken.
    Make sure that you are running the backdated aging with the checkbox as mentioned in the Note 800294.
    If still facing problems may be you can provide with more details as to what the control account balances and what is the Aging, difference.
    PS: Check if there is any manual journal entry is created in the control account?
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • 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
    Pravin

    Hi 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

  • BP Balance not showing correctly in Aging report

    Good Day all B1 experts,
    We are converting to SAP B1 for fiscal year 2010 and earlier today I have found a problem with BP balance on the AR side.  Below is a summary of the problem:
    Problem:
    - For some BP, after I entered opening balances,  their total outstanding AR balance was not reflected in the Aging report, nor can be found in the Opening Balance window (under System Initialization).
    - However, A/R control General Ledger account is correct and ties to my Year End 2009 Financial Statements
    Attempted Solution:
    - I reentered the "missing" opening balance for those BP accounts.  After entering the numbers, however, the Aging report shows a DOUBLED amount of the correct balance.  And when I go check the Opening Balance window,  the system is showing the correct BP balance (NOT Doubled).
    - Now my A/R control General Ledger and Opening Balance General Ledger Account is out of balance as well.  The difference equals to the amount I reentered.
    Has anyone encountered similar problem before?  I cannot think of anything I did  to cause such mess.  In any case, I am wondering if I need to use the Restore BP function.
    Please provide me some guidance on this.  Thanks!!!
    BR,
    Sunny

    Good Morning Kerstin,
    Thank you for the article.  The version that we are using is 2007A (8.00.180) SP:00  PL:45
    In the article, it mentioned about the Single Reconciliation Engine.  Do you know if that tool comes along with previous upgrades, or we will have to download and install it?
    Actually it seems for one of those problem BP accounts, the correct balance is reflecting on the Aging Report after an invoice was issued yesterday.  However, its BP balance is still not correctly reflecting elsewhere (such as Incoming Payment under banking module.)
    Regards,
    Sunny

  • What is a aging report

    what are aging report, why people prefer BW to generate aging reports then using standard reports.

    Aging report shows how old are the receivables, How long an invoice is remaining uncollected. Usually, every invoice that go the customers have a due date for payment, depending upon the terms of payment. It may be 30 days from the inovice or so. Aging takes stock of customer receivables that have remained unpaid by customers beyond their due date.
    BW is OLAP. The data we need to analyze the aging is predominantly old data, i.e, it is not like sales data, where one needs to know as and when it happens. Receivables are already past data, like atleast the number of days prescribed by the terms of payment have elapsed. Hence BW is preferred.

  • Ref No in Vendor Aging Report

    Hello,
    i experienced the phenomenon that in the aging reports the ref number is not always there. although in the invoice documents the field is filled out.
    when i look at the report in the designer i just see that this field has its data from a variable.
    can anybody help me? did anyone has the same problem?
    best regards, philipp

    Have you tried to print preview the report ?
    In my PL30 version, even if the A/P invoice has been closed, I can update the vendor ref no.
    SO, I suggest you to cut the vendor ref no.in the invoice no. where its vendor ref no. is not available in the aging report, then update it. After that, you paste it and update it.
    Let us know if the vendor ref no. is available or not.
    if not, submit a ticket to SAP support or upgrade to PL37
    Rgds

  • SAP Query for AR Aging Report

    Hello Gurus-
    I am trying to build a query for Aging report, and would like to include something like this:
    Customer-Reference-Payment terms-Due date-Current-31-60days-61-90days-91-120days-over120days-toatal amount.
    I have an infoset which includes BSID, KNA1, KNB1. I have maintained local fields:
    Due Date  =     Baseline date + cash discount days
    Statement Date = My input date.
    Current    = Condition (DUEDTE >= STATDTE - 30) formula (Amount)
    31 - 60 Days = Condition (DUEDTE >= STATDTE - 60 AND DUEDTE < STATDTE - 30) formula (Amount)
    61 - 90 Days = similar to above
    91 - 120 Days = similar to above
    Amount  = - 1 * (If Debit credit indicator = "H" then "Amount in local currency") otherwise "Amt in Loc.Cur"
    Over 120 Days = similar to above
    When I enter a statement date of today it works hunky dory...it all looks good...my current column looks good and do the rest. When i want to run this query as of couple of months ago (if today is 12/19/08 and i wanted to run my aging report for 10/31/08) it should give me aging as of my statement date 10/31/08 but it does not. It calculates the total amount as of today. I know because of local field "Amount" where i gave amount in local currency, but how would I tell that it should pick up amount in local currency till the statement date?
    Any input in this regards is highly helpful.
    Thanks,
    RNarayan

    Hi Ram,
    On your aging report you want to see invoices which are still not paid (or still open) as of a certain date. This date is "key date". You need to define a variable for key date (which is normally system date if you run today) but it could be a past date.
    So key date is let us say Oct 31st (X) and the system date is Dec 19th. When you run the report as of Oct 31st all invoices that are posted prior to Oct 31st (posting date less than X) and are still in BSID will show on your report. There is no issue here.
    Let us say an invoice was created on Oct 25th (Y) and was paid on Nov 15th (Z). The clearing date is Z. That means if you run the aging report today this invoice will not show.
    But you want to run the report on Oct 31st. This means X is greater than Y but is less than Z.
    Clearing date and posting date are part of BSAD. Report run date is the user input and is a variable.
    With the above concept and with the help of an ABAP programmer you should be able to solve the problem.
    Regards
    Sharabh

  • XLR-AR Aging Report Parameters

    Hello,
    I am modifying the SAP Receivables Aging XL Report template and I noticed that most parameters have not already been defined. The main problem I am encountering is how to accurately show a customer's total account balance if credit memos have been issued. If the AR DocType is defined only as Invoice, then the balance will be too high if credit memos exist. If Invoice and AR Credit memo are both selected, there is no way to properly assign open/closed DocStatus parameters- of course only OPEN invoice amounts should be shown, but all added credit memos are CLOSED.
    To my knowledge, there is no way to bring in the "Balance Due" amount per invoice, which would seem to solve this problem most directly. Any suggestions? Thank you.

    Hi, Allen
    The selections in sample report is as following:
    Type:Row Expansion (inner expansion)
    Specification of Selection:
    FACT TTY( * ) FIG( JDT1_IntrnMatch = "0" And RefDate = @From:@To ) Group By TTY.Code ,FIG.Ref1 ,FIG.OJDT_Ref2 ,FIG.LineMemo ,FIG.RefDate ,FIG.TaxDate ,FIG.DueDate ,FIG.JDT1_IntrnMatch
    Comment: Selection of all Original Journals, and only un-reconciled transactions.Posting date range selection
    I hope above will give you some useful hint.
    But according to my test, AR credit memo which is not based on AR invoice and is not reconciled yet, is still open. Only the AR credit memos which is based on invoice or reconciled are closed. In such case, you will not need to include them in Aging Report. Of course at the same time, the based or reconciled invoice will also be closed.

  • Aging Reports

    Hi all,
       can you guys tell me what
    are aging report, why are they
    called so
    gimme a brief overview
    Thanks
    Due points will be assigned

    Hi Vijay
    Implement following Business content to get AR Aging report
    Info cube : 0FIAR_C03
    Query :0FIAR_C03_Q0005 Account receivable Overdue Analysis
    The buckets 0-30 days 31-60 days 61-90 days are available in this query.
    Hope this resolves your problem.
    Regards
    Pradip

  • Add DN No. in Customer Receivable Aging report

    Dear all,
    would like to ask if it is possible to add the DN no. in the Customer Receivable Againg report ?
    i tried, but seems it is impossible to do so, even i set the field as System Variable and variable no. to 1 (as the DN no. in the Delivery module is '1'). i wonder it is because there is no linkage between the customer receivable againg module and the the delivery module.
    Thanks alot

    It will not be possible to add the Delivery number in the Aging Report.  The Delivery No is linked to the Invoice rows and the rows are not exposed in the Aging Reports.  So it would not be possible.

  • Posting date in aging report-PLD

    Hi,
    I am trying to get posting date in my aging report-PLD but system is not showing any date in the field
    I have selected the database and posting date in the content and linked to doc no even then there are no results
    I am also trying to get docentry in PLD it doesn't display
    I need to relate to doc entry from OINV  instead of doc number for posting date as the doc num is repeated every year
    Thanks
    Md.nazeer Shaikh

    Hi,
    PLD is a simple tool.  Some of them are hard coded such as aging report-PLD.  You need crystal report or some other tools to reach your goal.
    Thanks,
    Gordon

  • AuC Ageing report

    Hi,
    I have balance in AuC GL account of Rs. 30 Lacs.
    Now i want to see the ageing. Let me know how to get the ageing report of AuC.
    Rs.30Lacs includes opening balance also.

    Hi Deepak
    If you are looking for the Report at the Asset level, you can use the T. code OARP to get the Reports on asset, but i am not sure whether you will get by aging etc.. but you can have the Dates in that so they can take by vendor wise  and  agegin can be done in excel.
    Thanks
    Anand

  • Aging reports(Can Any One)

    In B1 aging report for custmer recivables what we getting is Balance due and monthly debits of the custmer ..so i don't think this is perfect aging .
    I Want the custmer recivables aging as balance due as well as due for the month and it follows for every month(Ex Suppose If a custmer is having bal due of aprial 50000 and in the next month custmer paid 20000 may 10000 in june so..on for that the aging report sholud be... Aprial 50000 May 30000 Jun  20000..as well as bal due is 20000 ) by this we get now that custmer is bal due from the month of Aprial...so..on
    Thanks & Regards
    Yogi

    Hi Yogi,
    Your request would be better satisfied by using XL Reporter.
    Thanks,
    Gordon

  • Aging Report does not match Balance Sheet Receivables/Payables Account

    Hi experts,
    I am requesting your help to find out why our customer receivables/vendor payables aging reports total does not match our balance sheet accounts receivable/ accounts payable account for the same period.
    I would expect
    Customer Receivables Aging Report Total = Balance Sheet Accounts Receivables Account
    Vendor Aging Report Total = Balance Sheet  Accounts Payables Account
    Thank you.
    Jane

    When you run the report with an ending/aging date in the past (like the end of last month), if you do not display BP's with zero balances, it will leave out BP's who have a zero balance AT THE TIME YOU RUN THE REPORT.  Some of them may have had a non-zero balance at the end of the month, but they will be left off anyway.  So if a customer owed money on the last day of the month and he paid it on the first of the next month, his balance will not be shown on the report if you run it even one day later.
    I feel this is a design defect in the report, but it is the system behavior.
    Marcia

  • Vendor Ref. no. not displayed in print preview in vendor aging report

    Dear SAP team,
    Vendor reference number is not displayed in print preview/print on vendor liabliteis aging report,
    but this vendor reference number actually show in report,We are taking report by journal postings,
    vendor reference entered in NumAtCard in AP invoice get copied to Ref2 in Journal Entry,then
    why it is not showing in print preview/print.
    Whether this is an application error / missing functionality ?
    We are using SAP Business One 2005 B (7.40.252)  SP: 00  PL: 36.
    Whether upgrade to latest patch 2005B PL46 will solve this issue ?
    Jeyakanthan

    Hello Jeyakanthan,
    I would like to draw your attention to the enhancements we delivered within Aging Report in 2007 version and plan for 8.8 release.
    The primary enhancement in 2007 version is reflecting new concept of Internal Reconciliation with more convenient backward reporting.
    Within the 8.8 release ...
    - when you generate the aging report you can group the report by customer or sales employee in the customer receivables aging report, and by vendor or buyer in the vendor liabilities aging report;
    - when the aging report has been generated, you can view multicustomer/multivendor detailed information in the aging report window. There is no need to double-click each customer/vendor row to view the details.
    We would strongly to recommend you to upgrade to 2007 version or join the ramp-up of 8.8 release soon.
    Peter Dominik
    B1 Solution Management

Maybe you are looking for

  • Ar Aging Report based on transaction lines

    Hi all, I am trying to write a query to calculate aging report at line level. The user needs a query which calculates the aging value at at line level because the ra_customer_trx_lines_all has attribute1 populated with a value from (A,B,C,D).I need g

  • Odd format, how to work with it, or not?

    Just got involved helping some scholars who have made a 1 hour film, with FCP, using this somewhat unfamiliar (to me) setup: Frame Size: 720 X 405 - Custom (16:9) Pixel Aspect Ratio: Square (no anamorphic) Field Dominance: Lower (Even) Editing timeba

  • Reinstall Mac OS 10.3.

    I tried to reinstall os 10.3 on my ibook G4 and I got through two disk and had to leave so...I was unable to finish the installation. When I returned to finish the window that comes up says sleep, restart, shutdown. I have tried to just restart, with

  • Partmer schema assignment Doubt ......

    Hi Gurus, I hv a doubt/query, 1.Partner schema is assigned to Account group, as All the PO, having vendor with that account group will get the partners from partner schema. 2.Partner schema is also assigned to doc. type of po. As all the POs for that

  • What is the Best Usage to Prolong MBA Battery Life?

    Hello, I have a new (1/27/2011) MacBook Air 13" (4G, 256G, 2.13Ghz CPU). This is being written: 4/29/2011. For some time my charge indicator has not gone above 99% except very occasionally, and then, very briefly. I have noted an apparent decrease in