Aging buckets in a query

Hi gurus,
I am creating an A/R aging queries to age open items in 30days buckets( 0-30days, 31-60days,61-90 days and 91days+).My logic for each buckets is below ..
eg -- 31-60days bucket (Key fig)-  Item status- Open
                                                 Posting date - <= posting date(Variable)
                                                 Net due date - btw -31 to -60 days, using offsets
                                                                       on the key due date variable
                              (2nd Key fig)- Posting date- <= Posting date(variable)
                                                  Net due date - btw -31 to -60 days, using offsets
                                                                       on the key due date variable
                                                  Clearing date-- > Clearing date
Then for the 31-60 days bucket, I now add both key figures together.
The logic is working fine but I just found out that there are a few plants that the buckets are not aging the data correctly like it is in R/3 because some of the customers make partial payment and in R/3 they are moved from an aging bucket to a current one after the partial payment has been made,but BW is looking at the original invoice posting date and not recognising the date that the partial payment was made.
How do I make BW to recognise the partial payment date when a partial payment has been made for the aging instead of the original posting date?
I hope this was not too confusing.
Thanks

Hi Kartikey,
Thanks for the  response. I am not calculating the subtotals at the in the query definition and the sub totals are based on the info object 0customer's setting in the query designer to suppress the result rows. In RSRT also I am unable to get the sub totals.
If I remove the calculations (aging buckets) and display direct key figure in the columns, I am able to get the sub totals.
Is there any specific reason why the sub totals can not be calculated if the columns are calculated key figures/new formula.
Can any one let me know how to fix the sub totals.
Thanks

Similar Messages

  • Ageing Buckets for whole query

    Dear All,
    I have to make a BEx query on meter characteristics. No keyfigures
    The whole information should shown against buckets (current date - disconnection date of meter)
    0-30 days     Customer     Meter No     Meter Type     Zone
    31-60 days   Customer     Meter no.     Meter Type     Zone.
    I tried making selections with disconnection date (0calday value range variable 0dat-30to 0dat-0    and   0dat-60 to 0dat-31). I included a dummy keyfigure (disconnection amount) in selection
    But data isn't coming according to conditions. Any suggestions please.
    Regards,
    Cleo

    Cleo,can you please clarify what exactly you need to show in those bucket range.
    I understand you have disconnection date in your provider and for current date you can use sap standard formula variable i.e  0F_ADAY.
    Now to get the difference between the two,if disconnection date is of type char.then you need to convert the same into kf for getting the difference with the help of replacement path.
    Note:It is mandatory to keep that date in rows which you use as reference char.in formula variable otherwise it will not work.
    Please check the above points.
    Regards,
    AL

  • Create aging bucket in BEx - based on  date variable

    Hi everyone,
    I have a report for which we need to create account receivable aging bucket to classify arrears (1>29 / 30>59 / etcu2026).
    Our solution overall architecture is the following :
    Source System (SAP) >  BW back end...Multiprovider > Super BEx Query > Universe > Webi Report
    BW 7.0
    BO XI 3.2 SP3.0
    In this report, each bucket is defined by the difference between:
    -     the Net Due Date (which is the due date of payment of the invoice)
    -     and the Current Date (date for which the report is run u2013 can be the date of the day or a date in the past)
    We can develop this either in BEx or in Webi, but to avoid potential performance issues in Webi, we take the try to develop this in BEx.
    As you can easily imagine, this BEx query will be used for many reportsu2026so not only for this specific report.
    What weu2019ve done so far:
    1-     We created a variable to prompt the user with the date he wants to run the report for
               - ZTEST is an optional variable, single value, User input, based on characteristic 0CALDAY
    2-     We developed RKF in BEx
    -     Key Figure restricted by Amount
    -     Net Due Date restricted by the variable ZTEST using the between function and an offset (to determine the range)
    => When we save the query we are getting a warning message saying u201CVariable ZTEST for characteristic Net Due Date has been converted to a required entryu201D
    Why? (you probably knowu2026) Because my RKF is using a variable with an offsetu2026which automatically turn on my variable as mandatory and no more as optional.
    Consequences:
    -     In BEx: My variable, which is required to be optional (because we donu2019t have to have this field as mandatory for each and every report running on top of this query) is now mandatory.
    -     In Webi: If I use the variable (funnel in webi), my report is working fineu2026but if I donu2019t use it in the webi report, I get an error message saying u201Cvalue required for ZTESTu201D
    o     Funnel is configured as optional in the universe designer (so the issue is not coming from here)
    => 2 consequencesu2026same issue
    Question: What can we do to keep our bucket logic running in BEx and avoid this variable to become mandatory?
    Solutions (potential)
    -     Create a custom exit routine to work around this issue u2013 how?
    -     Create CKF/Custom exit to create our bucket (using ZTEST as an entry value to determine the range) and then use the created range in our RKF to restrict the amount u2013 how? Not so easyu2026
    -     Build the logic in Webi
    -     Any other suggestions?
    Here we are, any advice would be really appreciated
    Thank you guys
    Regards
    Henri

    Hi peeps,
    We finally find a solution for this problem! So I can share it with you.
    The overall solution is pretty easy to understand.
    1st step is to prompt with the user with a 0DATE variable. The date selected becomes a date input for the next step.
    The variables is defined as a range [01/01/1900;variable_value)...in order to retrieve the right data set.
    2nd step is to use this date to create our aging bucket, dates range.
    To do so, we created 4 user exit variables (for each aging bucket).
    3rd step is to use these ranges in RKF.
    This way you get aging bucket dynamically defined by the user input pretty cool!
    Regards
    H

  • How can the dunning letter shows O/S amt and corresponding aging bucket?

    Hi,
    I am going to implement the dunning letter setup in R12. Our user request to have the dunnng letter layout which should show all regular dunning details but also the aging info of the outstanding invoices, i.e. which aging bucket the outstanding amount will be shown. Anybody have idea and help? Thanks a lot.
    Edmond

    Thank you Nagarajan.  I have a dunning letter created in Crystal Reports for our client.  It is fairly limited in scope, it just has the customer name and address, invoice numbers and dates, amounts due and the text they wanted in it.
    I can import it into B1 9.0 and set it as the default for Dunning Letter #1 and it runs, but unlike other formats where there is a DocEntry and/or ObjectID and a ?DocKey@ or ?ObjectId@ parameter, how do I limit the report to just one customer?  Typical document layouts run for the document that's on the screen.  In the dunning process, the report runs once for every customer when the Dunning Letter Method is set to "One Letter per BP".  I have to limit the report to one customer at a time.  Right now, each dunning letter based on the Crystal report is identical and it contains all the data for every customer.
    So, does anyone have any ideas for what selection criteria needs to be included in the Crystal report to have it select just one customer from the dunning wizard tables?  Thanks.
    Michael
    Edit: I created a ?WizardID@ parameter and a ?CardCode@ parameter to limit the report to a single dunning wizard event and a single customer.  While it works fine in Crystal itself, it doesn't work in B1 at all.  I had thought that by limiting the report in this way, it would only create dunning letters for a single customer.

  • Customize AP Trial Balance XML Data Definition for adding Aging Buckets

    Hi
    I have to customize AP Trial Balance Report XML Data Definition Template for adding Aging Buckets & Supplier details in R12 , Could you let me know how i can modify XML file?
    Thanks
    Pravin

    Hi,
    My requirement is different from the one which is in below link.
    I need to add Aging Buckets & Supplier details to AP Trial Balance report (R12) , here i need to modify the XML Data definition template.
    Please help me, very urgent.
    Thanks
    Pravin

  • AR - Aging Bucket report Customisation

    I have a requirement from end users to be able to run an aged debt report for any date range in the past e.g. From 01-Jan-2008 to 01-Jan-2013.
    Aging Bucket report only has, "As of date" field in the parameters.
    Is it possible to add additional parameters to this report?

    Hi.
    I don't believe such parameter can be included in the Aging reports. According to the user manual, the design of the report is to:
    Receivables includes all open items whose GL date is before or the same as the date you enter, and whose GL date closed is after the date you enter. The default is the current date.
    Besides, such parameter would cause debts to be excluded from the balance.
    Octavio

  • Aging Bucket - Account Receivable

    I wanted to create a Aged Report. e.g:
    0-30 31-60 61-90 91+
    Invoice 1 100
    Invoice 2 300.8
    I know how to calculate days difference. But I dont know how to put the amount under this certain aging bucket. I tried to use decode function but it doesnt work.
    Thanks

    I haven't given the complete code here, but this is how you can do it.
    SELECT
    I.trx_number invoice_number
    ,ps.amount_due_remaining payment_due
    , decode(floor(floor(sysdate-ps.due_date)/31)
    ,0,nvl(ps.amount_due_remaining,0),0) Days_0_to_30
    , decode(floor(floor(sysdate-ps.due_date)/31)
    ,1,nvl(ps.amount_due_remaining,0),0) Days_31_to_60
    , decode(floor(floor(sysdate-ps.due_date)/31)
    ,2,nvl(ps.amount_due_remaining,0),0) Days_61_to_90
    , nvl(decode(floor(floor(sysdate-ps.due_date)/31)
    ,0,0,1,0,2,0,0,0,nvl(ps.amount_due_remaining,0)),0) Days_90_plus
    FROM AR.ra_customers C
    , AR.ra_customer_trx_all I
    , ar.ar_payment_schedules_all ps
    WHERE C.customer_id = I.bill_to_customer_id
    AND ps.due_date < sysdate
    and ps.amount_due_remaining > 0
    and i.customer_trx_id = ps.customer_trx_id

  • Cusomter aging bucket

    Hello,
    we are trying to print customer aging bucket on monthly statement by print program RFKORD10. in customer due date list, i entered the break down days as 30, 60, 90 and etc. But when i run RFKORD10, the structure RF140 is not updated with the breakdown amount I am looking for. Is there any specific step I have to go through to have the RF140 updated correctly? or how I can make the aging bucket works by the standard print program?
    thanks,

    there is no specific setting for this aging program.
    its just a standard program by SAP.
    for more information, just click on the 'i' icon in the program execution screen.
    Regards
    Anantha

  • Divide Customers based on Aging Bucket

    Is there any way we can split the customers of different profile class having different aging buckets defined?

    Hmmm.... you can put me in the "Ancient" bucket. :-)
    By the way, what is an "aging bucket"?

  • What is aging bucket and charge backs in receivables?

    Hi
    Iam new to oracle apps.
    what is aging bucket and charge backs in receivables?
    help me to learn basic terms of receivables?

    Chargebacks
    http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/ar/teches12.htm
    Aging Buckets
    http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/ar/system08.htm
    Regards,
    Srini

  • Calculated Age and Age Ranges in a Query

    Hello,
    We are using 3.5 Query Designer.
    I am trying to create age ranges in a query. The InfoProvider at this point (I've gone very simple) is InfoObject, 0PERSON.
    I've created a calculated key figure (CKF) called age which I have used a formula to define. The age is calculating correctly. Age has  'Calculate Result As...' = Summation. And in the 'Enhance', 'Time of Calculation' is set to Before aggregation. Number of decimal places set to 0. Now I've created a CKF, AGE_GE_40 which has as its formula 'COUNT(('Age' >= 40)). I've created an additional CKF, AGE_LE_39 which has a formula 'COUNT(('Age'<=39))'. Both of these have the 'Summation' set in the calculation section. The query contains 0GENDER, 0PERSON with AGE_GE_40 and AGE_LE_39 and Number of records as the key figures in the columns. When executed initially, all of the result rows are correct. The problem is when I remove 0PERSON, the result rows only give me 1 per gender. This seems like an easy thing to do, why is it not working?
    Thanks for any help,
    Diane Merrill

    Diane,
    For each row in the query data, there is only one age value calculated, which is the aggregration of all records which fulfills the row's characteristic value combination. Thus, when there is Gender & Person columns in the query, each row calculates an age value for the Gender/Person combination, which is essentially the same as for each person, because each person has one gender value. However, when you remove person from the columns, there will be only two values for gender, and the age is calculated as the sum of ages for all records with the same gender value. To reveal more on this, you can add the Age key figure into the query columns, and run the query with only the gender (i.e. without person). Once you see the age value for each row, it should be clear to you.
    Please reward points if this is helpful.
    Wayne

  • Age Bucket in sql

    Hi all,
    I need to solve it by using procedure.
    I have follwoing table:-
    Item NO|Date|Lot_No|Location|Quantity|Barcode No|State
    I need to create age bucket with 0-10 days,10-20 days and 20-30 days based on dynamic date.
    suppose i Pass @date='2010/2/1'
    Then i need to calculate 0-10 days(21jan-31 jan[Last 10 days])
    ,10-20(11jan-20 jan) days and 20-30(1jan-10jan) days 
    then my output is like:-
    Item NO|Lot_No|Location|Quantity|Barcode No|State|0-10 days|10-20 days|20-30 days

    suppose the data:-
    Item NO|      Date      |Lot_No |Location|Quantity|Barcode No|         State
    1            2010/1/1       1     Delhi     10          B1             New Delhi
    1            2010/1/5       1     Delhi     05          B1             New Delhi
    2            2010/1/5       3     Punjab    10          B5             Chandi
    1            2010/1/11      1     Delhi     10          B1             New Delhi
    1            2010/1/17      1     Delhi     10          B1             New Delhi
    2            2010/1/18      3     Punjab    10          B5             Chandi
    1            2010/1/21      1     Delhi     10          B1             New Delhi
    1            2010/1/30      1     Delhi     15          B1             New Delhi
    Expected Output:-
    Note:-Grouping should be done On Item NO,Lot_No,Location and Barcode No
    Item NO|Lot_No|Location|Barcode No|State      |0-10 days|10-20 days|20-30 days
    1       1      Delhi     B1         New Delhi    15       20         25
    2       3      Punjab    B5         Chandi       10       10         0

  • Aging Buckets (More than 7)

    I am going to create a custom report for Aging in Oracle Receivables. I need a report with more than 7 buckets.
    Has anyone implemented this feature? Any tips on how to proceed?
    Thanks in advance

    All I had to do is
    <ol>
    <li>Alter Queries in Data Model by adding an extra field for every bucket. i.e.
    <br><br>select ....
    <br>, 0 bo
    <br>, 0 b1
    <br>, ...0 b6
    <br>, <b>0 b7
    , 0 b8</b>
    from ...</li>
    <br>
    <li>Alter user variables(used in Data Model Queries as substitution strings in select statements) by adding an extra field for every bucket.</li>
    <br>
    <li>Add formulas, placeholders, summary items for each new bucket in every group that had formulas, placeholdes, summary items for the existing buckets.</li>
    <br>
    <li>Search all code and add logic for every new bucket identical to the code for the others buckets. i.e.
    <br><br>if b0 = .. then ..
    <br>end if;
    <br>if b1 = .. then ..
    <br>end if;
    <br>...
    <br><b>if b7 = .. then ..
    <br>end if;
    <br>if b7 = .. then ..
    <br>end if;
    </b>
    </li>

  • Why does my system currency Aging Summery in my Query  not tie to the BP aging in System Currency

    This query works but why does the amount not tie by account in System Currency from the BP. The amounts are off slightly and I am wondering if I am missing something in my query. This same query in local currency ties to the BP but when I did it in USD it does not tie. Best Danielle SELECT CardCode, CardName, PymntGroup, SUM(Balance) BALANCE, SUM(A) FUTURE, SUM(B) '0-30', SUM(C) '31-60', SUM(D) '61-90', SUM(E) '91-120', SUM(F) '121+' FROM ( SELECT T1.CardCode, T1.CardName, T2.[PymntGroup], T0.RefDate, T0.Ref1 'Document_Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document_Type',     T0.DueDate, (T0. [BalScDeb]- T0.[BalScCred]) 'Balance'     ,ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate, getdate())=0 and DateDiff(day, T0.DueDate,getdate())30 and DateDiff(day, T0.DueDate,getdate())60 and DateDiff(day, T0.DueDate,getdate())90 and DateDiff(day, T0.DueDate,getdate())=121),0) 'F' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode Left outer join  OCTG T2 On T1.GroupNum = T2.GroupNum WHERE  T1.CardType = 'C'  and BalSccred + balscdeb <>0 ) T100 GROUP BY CARDCODE, CARDNAME, PymntGroup ORDER BY CARDCODE

    Try This
    SELECT CardCode, CardName, PymntGroup, SUM(Balance) BALANCE, SUM(A) FUTURE, SUM(B) '0-30', SUM(C) '31-60',
    SUM(D) '61-90', SUM(E) '91-120', SUM(F) '121+',Rmk FROM ( SELECT T1.CardCode, T1.CardName, T2.[PymntGroup], T0.RefDate, T0.Ref1 'Document_Number',
        CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'    
          WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'     
          END AS 'Document_Type',     T0.DueDate,  (T0. [BalScDeb]- T0.[BalScCred]) 'Balance'     ,
    CAST(T1. [Free_Text]  as varchar(250)) as Rmk,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate, getdate())=0) ,0)  as A,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE  DateDiff(day, T0.DueDate,getdate())between 1 and 30 ),0 )as B,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE  DateDiff(day, T0.DueDate,getdate())between 31 and 60 ),0) as c,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate,getdate()) between 61 and 90  ) ,0) as d ,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate,getdate()) between 91 and 120 ),0)as e,
       ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate,getdate()) > 120 ),0)as f
      FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    Left outer join  OCTG T2 On T1.GroupNum = T2.GroupNum WHERE  T1.CardType = 'C' ) T100 GROUP BY CARDCODE,
    CARDNAME, PymntGroup,Rmk ORDER BY CARDCODE
    Regards,
    Kennedy

  • Internal Reconciliation - upto a specific date in ageing receivables

    Hi!
    I have run the following query to produce an ageing report. However, the ageing shows reconciled transactions as outstanding in the ageing buckets.
    My query is as follows:
    DECLARE @D1 DATETIME
    SET @D1=  '1900-01-01 00:00:00.000'
    select T1.cardcode 'Bp Code',T1.cardname 'Name',sysdeb 'Debit Amount',syscred 'Credit Amount',
    (T0.SYSDEB-T0.SYSCRED) as 'Balance Due',
    case T0.transtype
    when '13' then 'INV'
    when '14' then 'AR CN'
    when '24' then 'INCOMING'
    else 'Other'
    end 'Type',
    Ref1,
    fccurrency 'BP Currency',
    CONVERT(VARCHAR(10), refdate, 103) 'Posting Date',
    CONVERT(VARCHAR(10), duedate, 103) 'Due Date',
    CONVERT(VARCHAR(10), taxdate, 103) 'Doc Date' ,
    CASE
    when (DATEDIFF(dd,taxdate,{?Age})) <= 30
    then
    case
    when SYSCRED <> 0 then -SYSCRED
    else SYSDEB
    end
    end "0-30 days",
    case when ((datediff(dd,TaxDate,{?Age})) > 30 and (datediff(dd,TaxDate,{?Age}))<= 60)
    then
    case
    when SYSCRED <> 0 then -SYSCRED
    else SYSDEB
    end
    end "31 to 60 days",
    case when ((datediff(dd,TaxDate,{?Age})) > 60 and (datediff(dd,TaxDate,{?Age}))<= 90)
    then
    case
    when SYSCRED <> 0 then -SYSCRED
    else SYSDEB
    end
    end "61 to 90 days",
    CASE
    when (DATEDIFF(dd,TaxDate,{?Age})) > 90
    then
    case
    when SYSCRED= 0 then SYSDEB
    when SYSDEB= 0 then -SYSCRED
    end
    end "90 + days"
    from dbo.JDT1 T0
    INNER JOIN dbo.OCRD T1 ON T0.shortname = T1.cardcode and T1.cardtype = 'c'
    INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode
    where T0.intrnmatch = '0' and T0.TaxDate >= @D1 and T0.TaxDate <= {?Age}
      ORDER BY T1.CARDCODE, T0.taxdate
    In this instance, {?Age} refers to the date as at which I am running the report
    What code should I be using in the above query so that it does not show reconciled transactions as at my ageing date i.e. items reconciled before  and upto the ageing date of the report

    Hi,
    Alternatively try this query and result will be as that of system report:
    SELECT
    [CustName] as CustName, isnull([1],0) as Jan, isnull([2],0) as Feb,
    [3] as Mar, isnull([4],0) as Apr,  isnull([5],0) as May,
    isnull([6],0) as june, isnull([7],0) as July, isnull([8],0) as Aug,
    isnull([9],0) as Sept, isnull([10],0) as Oct, isnull([11],0) as Nov,
    isnull([12],0) as Dec
    from
    (SELECT
    T0.[CardName] as CustName, sum(T0.[DocTotal]) as Total,
    month(T0.[DocDate]) as month FROM OINV T0 WHERE year(T0.[DocDate]) =
    2013 and T0.[CardCode] = 'XXX' and  T0.[DocStatus]  ='o' GROUP BY
    T0.[CardName],T0.[DocDate]
    union all
    (SELECT
    T0.[CardName] as CustName, -sum(T0.[DocTotal]) as Total,
    month(T0.[DocDate]) as month FROM ORIN T0 WHERE year(T0.[DocDate]) =
    2013 and T0.[CardCode] = 'XXX' and  T0.[DocStatus]  ='o' GROUP BY
    T0.[CardName],T0.[DocDate])) S
    Pivot
    (sum(S.total)
    For  Month IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
    Note: Replace XXX with your card code and change year if required.
    Thanks & Regards,
    Nagarajan

Maybe you are looking for

  • Sales Analysis Report - Monthly report shows blank output

    Hi, When i run the Sales Analysis Report - Customer (Annual) report for a data set it shows the correct data - large number of invoices However, there is no output available (blank output) when i use the the Monthly version of the same report using t

  • Populating Smart Folder - Bug?

    There seems to have been a change in the way smart folders are populated in Snow Leopard. I like to keep a smart folder called "All Today". It is a great troubleshooting tool. For example, there is currently a Snow Leopard bug in using your mouse to

  • Renaming and numbering files question

    Currently I like to bring my image files (named by the camera as something like IMG_4896,IMG_4897,IMG_4898,etc.) into the LR catalog, move the files into a Photo Collection folder, and rename them based on the date taken along with a sequence suffix,

  • Assistance Needed: Inter-VRF Routing with MP-BGP

    hello everyone, I've been trying to solve a problem for over a day regarding inter-vrf routing using MP-BGP and I can't seem to figure a few things out. I have Cisco 1921 which has VRF-JLAN and VRF-JGLOBE with 3 interfaces configured as (g0/0 = vrf J

  • HT204407 How do you add pictures of friends in the map on Find My Friends app?

    How do you add pictures of friends in the map on Find My Friends app?