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 get the aging value for each group(attribute).
select sum(nvl(lines.line_recoverable,0)+nvl(adj.adj_amt,0)-nvl(rec.rec_amt,0)),lines.attribute1
from ra_customer_trx_lines_all lines,
(select CUSTOMER_TRX_LINE_ID trx_line,
sum(amount) adj_amt
from ar_adjustments_all
where status = 'A'
group by CUSTOMER_TRX_LINE_ID) adj
,(select REF_CUSTOMER_TRX_LINE_ID trx_line,
sum(nvl(amount_cr,0))-sum(nvl(amount_dr,0)) rec_amt
from ar_distributions_all
where source_table='RA'
and source_type='REC'
group by ref_customer_trx_line_id) rec
where lines.CUSTOMER_TRX_LINE_ID=adj.trx_line(+)
and lines.CUSTOMER_TRX_LINE_ID=rec.trx_line(+)
and lines.customer_trx_line_id in ('18293')
group by lines.attribute1
Also I dint yet add the as of date parameter.I suppose the tables have to change in that case.Can any one help me with that tooo.
The above query kinda generated the value I was looking for.But when I ran the query for just a few more lines included.The query took forever to run.
Can you please help me on this ASAP.
Thanks for all your tips in advance.
Mach
Edited by: krismach_85 on Oct 27, 2009 8:38 AM

Hi,
You can run the Transaction Register report for specific Transaction reason/ a range and see the related material transactions.
Karthik.

Similar Messages

  • Running Aging reports based on Document date in 2007

    Hi All,
    I have an issue while running the Receivables aging report in the 2007 version. The customer usually runs the reports based on the document date. Document date holds more importance in their case.
    However, in the 2007 version, the aging report is totally governed by the posting date. For example, if I change the aging date, the posting date also changes to the aging date and viceversa. If I want to change the aging date to 01/31/09, the posting date u2018Tou2019 automatically changes to 01/31/09 and when we run the report, it will bring in all transactions until the posting date of 01/31/09.
    But, the requirement is to leave the posting date as blank and give the document date u2018Tou2019 01/31/09. This will then pull all transactions until the document date of 01/31/09 irrespective of the posting date.
    As a result, when you run the balance sheet with the document date of 01/31/09, receivables show a different balance. This discrepancy is due to the fact that AR Receivable aging report forces to keep the Aging date = Posting date.
    This was not the case in SAP 2005 version where we were allowed to key in the aging date and the document date to get results based on document date.
    This is very critical as they have recently upgraded from 2005 to 2007 and they are unable to reconcile the balances out of Balance sheet and Aging.
    Please advise.
    Thanks,
    Payal

    Hi Jitin,
    We tried that as well but no luck. There is still a discrepency between what the aging shows and what the BS shows. When we put the Aging date as 01/31/09 and Document date as 01/3109, the posting date 'To' is automatically filled with 01/31/09, so it basically searches for all transactions with the posting date 01/31/09 and document date 01/31/09. This is not the requirement as we do not want to consider the posting date at all while running the aging.
    I also have some screenshots if I can share. I am not sure if I should report this to SAP for further investigation or am I missing something here.
    Thanks for your help.
    Regards,
    Payal
    Edited by: Rui Pereira on May 1, 2009 10:48 AM

  • Customer Aging Report(without reconciled transaction)-what types of documents are considered?

    Hi Friends,
    As per my knowledge,Customer Aging Report consider only those documents(ar invoice,ar downpayment,incoming payment-payment on a/c,ar credit memo) which are open and showing balance due and standalone JE against Customer.
    As I cross checked,I found those standalone JE where Customer and round off account are considered as debit,credit are not considered by 'Customer Aging report'.
    So,I just want to know what are all the logic based on which SAP B1 standard report 'Customer Aging ' (without reconciled transaction ) consider the documents????

    Which SAP B1 Version and Patch is under use at your end ?
    There were issues in SAP B1 regarding reconcilliations in versions prior to 2007 series.
    Samir Gandhi

  • Not able to pick Opening Balance in Ageing Report

    Hi
    I have made an query for customer ageing report based on our requirement, but am not able to fetch the OB (Opening Balance) in that.  If i generate Customer ageing report from B1, its showing the OB in the first line, then it showing the open invoices on the corresponding ageing days.
    Can anyone help me to fetch the opening balance in ageing report.  Below is the query i have given for ageing.
    SELECT     NNM1.Remark AS Branch, OINV.DocNum, OINV.NumAtCard AS VendorRef, OINV.DocType AS Type, OINV.DocStatus AS Status, OINV.DocDate,
                          OINV.DocDueDate, OINV.CardCode, OINV.CardName, OINV.DocTotal, OINV.PaidToDate AS [Paid/Credited],
                          OINV.DocTotal - OINV.PaidToDate AS [Balance Due], (CASE WHEN DateDiff(dd, OINV.DocDate, getdate()) BETWEEN - 120 AND
                          0 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS 'Less then Due Date', (CASE WHEN DateDiff(dd, OINV.DocDate, getdate()) BETWEEN 0 AND
                          30 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS '0 - 30', (CASE WHEN DateDiff(dd, OINV.DocDate, getdate()) BETWEEN 31 AND
                          45 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS '30 - 45', (CASE WHEN DateDiff(dd, OINV.DocDate, getdate()) BETWEEN 46 AND
                          60 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS '45 - 60', (CASE WHEN DateDiff(dd, OINV.DocDate, getdate()) BETWEEN 61 AND
                          90 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS '60-90', (CASE WHEN DateDiff(dd, OINV.DocDate, getdate()) BETWEEN 91 AND
                          120 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS '90-120', (CASE WHEN DateDiff(dd, OINV.DocDate, getdate())
                          > 120 THEN (OINV.DocTotal - OINV.PaidToDate) END) AS '120 +', OSLP.SlpName, OUBR.Name
    FROM         OINV AS OINV INNER JOIN
                          NNM1 AS NNM1 ON OINV.Series = NNM1.Series INNER JOIN
                          OSLP ON OINV.SlpCode = OSLP.SlpCode INNER JOIN
                          OHEM ON OSLP.SlpCode = OHEM.salesPrson INNER JOIN
                          OUBR ON OHEM.branch = OUBR.Code
    WHERE     (OINV.DocStatus = 'O') AND (OUBR.Code IN (@Branch)) AND (OSLP.SlpCode IN (@SalesEmployee))
    ORDER BY OINV.CardName, OSLP.SlpName
    How to add the OB in the above query.

    Check note 1023083 and for information about the expected release date of the patch please view note 578944.this problem is related to the new  SAP GUI 7 patch-level 0. There is something wrong with  the GUI function to get information from the local registry (CL_GUI_FRONTEND_SERVICES=>REGISTRY_GET_VALUE).
    We had the same issue sometime back and we applied the patch. I have the patch but it will be a huge file to send over internet. See the above notes and you should be able to apply the required patch.
    Also check Note
    Note 696069 below:
    Summary
    Symptom
    No Data is displayed when View is changed from ALV to Excel Inplace on
    ALV Grid. This Happens with Office XP/2003/2007.
    Other terms
    Excel inplace, Excel, ALV, Office 2003, Office XP, office 2007
    Reason and Prerequisites
    With newer release of MS Office (XP/2003/2007) Microsoft added new security settings/options for Visual Basic project and Macros. Excel Inplace uses Visual Basic Project and macro functionality of MS Office. If the setting for Macro security is High (which automatically disables macro or if access to Visual Basic Project is suppressed then Excel Inplace doesn't show any Data in Excel.
    Solution
    Required settings in MS office XP and MS Office 2003:
    To use the Excel Inplace functionality make sure the security settings for Macro is set to Medium and the option "Trust access to Visual Basic Project" must be checked on Tools->Macro->Security->Trusted Sources tab.
    Required settings in Office 2007:
    Please see the video file in attachments of this note.
    This is required with MS Office XP, MS Office 2003, MS Office 2007.
    Header Data
    Release Status: Released for Customer
    Released on: 22.12.2006  14:47:01
    Priority: Recommendations/additional info
    Category: Consulting
    Primary Component: BC-FES-OFFI SAP Desktop Office Integration
    Secondary Components: BC-FES-XXL XXL List Viewer/Lotus Connections
    Reward points if this help
    Sanghamitra
    Message was edited by:
            Sanghamitra11

  • Aging report by docuemnt currency

    Currently an aging report is run by Local currency, business partner curreny, or other specified currencies.
    Where the BP currency is set to multi currency, and transactions have occured in the local (AUD) and other currencies (USD, EUR), the aging report currently shows those transactions in AUD (local currency).
    How can an aging report based on docuemnt currency be produced? 
    Thanks Lisa

    Hi,
    There is no availability of the Document currency in the Aging Report.
    It would be difficult to have a Business Partner Balance appearing if the BP is a Multi Currency and has transactions in different currencies. Therefore, the option of displaying the Open Balance in Local currency is available.
    You have to other create a customized query to get the desired output.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Creation of Vendor Aging Report in SAP BI.

    Hello,
    There is requirement to create the Vendor Aging report in SAP BI Cube.
    In order to show the Aging of the Vendor in different buckets.
    Can anyone help me out with the Links/Blogs/Wiki  ... URL's .
    I tried finding in net couldnt get anything related to this.
    Thank you for the help in advance.
    Regards,
    Adhvi

    Hello Obaid,
    Thanks for the reply.
    got the URL for Vendor Aging Report ..which has better detailed information.
    http://help.sap.com/saphelp_nw70/helpdata/EN/69/b4e9503d6a4f39b66e67b1cedf41af/frameset.htm
    0FIAP_M30_Q0003 not found in the BI Content
    Creation of Vendor Aging Report in SAP BI.
    Vendor Ageing formula
    If you come across any further Customization of the Reports related to the Vendor ageing reports based on the URL mentioned below...let me know.
    Thanks & Regards,
    Adhvi

  • Aging Report Problem

    Dear all SAP expert,
    I have a question about aging report for business partner. I want to know what is the difference between Aging Report with option "display reconciled transaction" check and Aging report with un check option "display reconciled transaction" ?
    If I compared with Balance sheet, the report that has same balance with Balance sheet is Aging Report with option "display reconciled transaction" check but in this report include all transaction like Invoice, Incoming payment etc that's make aging report contain all transaction. I want to use the other aging report with uncheck option that show only open transaction but it has difference balance with balance sheet.
    Why it's different ?
    Thanks for yiur kind help

    What parameters are you using to extract the GL balance? Use no From date, and a To date that is the same as the To Date in your Balance Sheet report.
    In the aging report, make sure you are using the same posting date to date as the aging date, and have no Posting date from, so you are not excluding any transactions.
    If you are finding your balance from drilling to Account Balance in the Chart of Accounts, make sure you are viewing all transactions, not just unreconciled transactions, as this will exclude items reconciled after the required date.
    I know there was a bug with this early on in 2007A, but I'm sure it was fixed before PL30

  • Stock report based on the batch

    Hi Experts,
    I am designing stock ageing report based on last goods reciept date which is the attribute of the batch.
    the stock value in the buckets need to be calculated based on the stock quantity with moving average price.
    the report is o/p is based on material group, material, batch.
    when i drill dow based on the material it is coming fine when i drill down based on the batch it is not showing any values in the buckets.
    considering the moving average price from masterdata enhancement of 0MAT_PLANT datasource.(but this datasource doen't have batch).
    Please suggest your ideas.
    Regards,
    Satya

    I am not too sure how to explain step by step..but my system uses this design..not created by me.
    RESULT = SOURCE_FIELDS-SALK3  / SOURCE_FIELDS-LBKUM.
        IF RESULT IS INITIAL.
         RESULT = SOURCE_FIELDS-VERPR / SOURCE_FIELDS-PEINH.
    matl valuations:
    Try using tables MBEWH --(customised) and extract to DSO along with 0IC_C03.
    Also use the datasource : 0CO_PC_ACT_05
    SO Valuations:
    EBEWH -customised
    Try this link:
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=235670765
    Edited by: SAP BI Learner on Oct 28, 2011 4:27 AM

  • Reconciled amounts appears in customer  aging report

    Dear all,
    When we take aging report for reconciled transactions,reconciled amounts appears in
    aging days ,the invoices which are reconciled still showing in Aging report  (Suppose we have ar  invoice in 0-30 days and its payments (journal entry ) made in 30-60 days it's
    already reconciled)
    Why it is showing in reconciled aging report ?
    I am using B1 2007 Pl 17
    Regards
    Saurav Gupta

    Hi Saurav Gupta,
    the ageing report allows you to pinpoint open transactions at a particular date.
    Consider this:
    System Date (Today) : 08.08.2011
    Ageing date 01.08.2011
    Invoice Posting date: 20.07.2011, due date : 31.07.2011
    Payment Date for invoice 02.08.2011
    You allow documents to be considered up to the ageing date.
    -> The invoice above, although fully paid, will be shown as overdue since you are ignoring all transactions after the ageing date. As far as the report is concerned, the payment hasn't happened yet.
    With these options, the invoice will be shown as well:
    System Date (Today) : 08.08.2011
    Ageing date 01.08.2011
    Invoice Posting date: 20.07.2011, due date : 31.07.2011
    Payment Date for invoice 02.08.2011
    You allow documents to be considered up to the system date & choose to display reconciled transactions.
    -> all documents up to today will be taken into consideration, meaning that both the invoice & the payment are shown in the report.
    To see the true open documents today, choose these parameters:
    System Date (Today) : 08.08.2011
    Ageing date 08.08.2011
    You allow documents to be considered up to the system date & have all tickboxes unchecked.
    Also, please upgrade your system at the earliest convenience, you are using a very old version.
    All the best,
    Kerstin

  • Stock Aging report logic

    Hi ,
    There is a report requirement from stock aging report based on the bucket scenario.
    I need to calculate the stock based on quantity(MSEG - MENGE) and moving average price/periodic unit price(MBEW - VERPR).
    Then i need to perform the same into bucket scenario like 0-09 ,91-180,180-360,>360.
    I can see the field (MENGE) in the standard datasource 2LIS_03_BF which is connecting with the infoobject 0QUANT_B.
    But in the update rule/transformation there no assignment for this.
    For which infoobject i can map to the cube and what logic i need to perform.
    There is a calculation for this in the report for the value of the stock below.
    Value = Quantity(MENGE)xmoving average price/periodic unit price(VERPR).
    Stock Logic:
    Stock is consider based on the movement types: 101,701,712.
    Can anyone give me the idea on this how to perform the logic.
    Thanks,
    satya

    Hi Vijay,
    Functional consultant has given the logic for calculating the stock is
    Stock Quantity is restricted based on the movement types 101,701,712.
    Stock Value = QuantityxMoving average price /periodic unit price
    The logic for calculating the buckets based on the Posting date(0PSTNG_DATE).
    My concern is how i can perform the same logic in BW side to calculate the value of the stock.
    Advice...
    Thanks,
    Satya
    Edited by: satya prasad on Aug 5, 2011 7:03 AM

  • Customer Receivables Aging Report total overflow

    When I run the Customer Receivables Aging report and the bottom line totals exceed 9,999,999.99, it overflows and shows **** in the total fields.  Is there a hotfix for this or a way around it?

    SAP instructed us to change currency at the top left corner of the screen to Local Currency instead of Business Partner Currency, because we have some BPs with international currency.

  • Aging Report by Ship to party

    Dear All,
    We have the following Customer Structure
    Sold to Party
    Chain
    Payer
    Ship to Party = Bill to Party
    We are posting the invoics to Payer and payment is received from the Payer for ship to party which belong to one particular chain.
    Cleint Need aging report based on Bill to party or Ship to party where as we have invoices and payments posted to Payer
    It would be great if some one can propose solution for this
    Raees

    Hi ajmal
    For the PR00 condition type , take one of  the key combinations as ship to party (Ex: material / ship to party). and assign that access sequence to PR00 condition type . and create VK11 with the key combination ,  material / ship to party
    Accordingly your requirement your will be full filled
    Regards
    Srinath
    Edited by: sri nath on May 3, 2008 8:59 AM

  • Collection Ageing Report

    Hi Exports,
    We want to to developed an collection ageing report for open & cleared line items of customers.For example :-
    Collection 100000 during the period of 1st Jan to 31st Jan & diff.-2 Invoice of Rs.85000 are cleared against this with multiple amount & multiple date of Invoice.
    Report Output
    Collection                Open                  30 Day             60 Day                     90 Day              120 Day     Total
    100000                   25000                 25000              35000                      25000                       -          100000
    So some help me about this report.
    SSS

    Hi Experts,
    this link only for key date ageing means customer ageing on an particular date, but we need ageing of collection for particular period like we take collection during the month of Nov-11 & now we want to see ageing of this collection ag.cleared which invoice (bill).
    collection- 100000/- & 50000/- during the Nov-11
    Cleared invoice agianst these collection- 90000/- 15Th-July-11 & 50000/- 21st -Aug-11
    Output
    Collection for The period of 1st Nov-11 to 30th Nov-11
    Collection     Unadjsuted (Open)        0-30   31-60   61-90  91-120   121-180     Total
    100000/-             10000/-                    -          -              -           -        90000/-    100000/-
    50000/-                     -                         -          -              -      50000/-       -            50000/-
    So we need collection ageing not to customer ageing.
    SS

  • SBO Aging Report characteristic

    Dear Experts,
    I had tried to create a Crystal Report that mimicks the SBO's aging report. I got the Grand Total for the Aging Amount correct... however I got the Sub Total for the Aging Amount in the duration of 0-30days, 31to60days, 61-90days..etc wrong.
    For Eg.
    SBO Aging Report shows:
    0 - 30 days        31- 60 days        61- 90 days        91- 120 days        Over 120 days        Total
    SGD 0.00           SGD 1000.00      SGD 1500.00      SGD 2000.00        SGD 500.00             SGD 5000.00
    My Aging Report shows:
    0 - 30 days        31- 60 days        61- 90 days        91- 120 days        Over 120 days        Total
    SGD 0.00           SGD 500.00      SGD 2000.00      SGD 2000.00        SGD 500.00             SGD 5000.00
    I have already maDe my Crystal Report aging amount filter by aging duration as 0-30days, 31-60 days... etc but I still get the above incorrect sum allocation as compared to the System's aging sum allocation.
    Can anyone please help advice on this?
    Much Thanks!
    Warmest Regards,
    Chinho

    Dear Gordon,
    Thank you for your reply.
    I specified the report Aging date as 30/6/2009 and aging report based on Posting Date.
    I have found a document posting date dated 1/April/2009. In my crystal report, this document is shown under the 31 - 60 days, but in the system report, this document is shown under 61-90 days.
    Please help advice.
    Warmest Regards,
    Chinho

  • SAP Query (SQ01) Customer ageing  report

    Dear All,
    My Customer want  Customer  ageing  report  only  for" Due  amount"  open document in  Sq01.Customer ageing  report  based on  Document date+Payment term.
    thanking you,
    Rupang shah

    Hi
    We also required the same.  Since no standard report available, we have developed ABAP report for the same.
    regards
    Ravi

Maybe you are looking for

  • Cache problem with "videos" viewed by thumbnail ?

    Hello, When I add video clips to my iTunes library, I have to crite the name of the author, the album... but sometimes display in the video view seems not to refresh : the clip are still listed without albums. I added clips 4 days ago, it refreshed i

  • Buffer Hit Ratio % -- Whats the right query ?

    Whats the right query to track Buffer Hit % ; Using this : prompt BUFFER HIT RATIO % prompt =============== select 100 * ((a.value+b.value)-c.value) / (a.value+b.value) "Buffer Hit Ratio" from v$sysstat a, v$sysstat b, v$sysstat c where a.statistic#

  • Migration to Linux

    Hi all, We are planning to Migrate 2 production systems 1 which is in Windows and 2nd which is on Hp-Ux to a linux box.Any suggestions or recommendations please Regards Bharathwaj V

  • IPad 2 region issues

    Hey there, Can anyone help me with how I can solve my issues with "region? I live in Manila and bought iPad 2 in Manila. I apparently gave my Manila billing address and credit card details. Problem is I can't get any good books from iBooks or no good

  • Font and font size can not be changed when I did Chinese courses in Presenter7.

    After publish,i found that the font of notes tab was too small, so i changed the Notes Pane Font and font size by clicking the button called "Settings",then after clicking  theme editor, I re-published, however, when i reviewed in Chrome brower,the f