Define Formula For Aging Report

Hi All,
I have scenario like these.
I have four characteristic named Fiscal Period , Business area , Customer , AGING and five keyfigures named amount ,0-28 days, 29-45 days , 46 to 60 days , above 60 days.
Aging means my customer pays money in that dates means (Invoice date - Baseline date )
fiscal period  Business area  Customer   Aging         Amount  0-28 days  29-45days   46-60 days  above  60
    1                 XYZ               001             25            1000     700             300                0           0
                                            001             30            2000     500             1500              0           0
                                            002             45            2000     300             300             1400
if customer pays in 25 days then my amount will come in 0-28 days and if he pays in 30 days then amount will come in 29-45 days as you can see from the above picture that i have done .
now my other requirement is i have to define one more field called profile and  if customer pays 60% of  amount in 0-28 days then  in profile it should populate A. if customer pays 60 % of amount with summation of both  0-28days and 29-45days then it should populate B .if customer pays 60 % of amount with summation of three  0-28days and 29-45days and 46-60 days then it should populate C . if customer pays 60 % of amount with summation of four  0-28days and 29-45days and 46-60 and above 60 days then it should populate D .
fiscal period  Business area  Customer   Aging         Amount  0-28days  29-45days   46-60days  above60 Profil
    1                 XYZ               001             25            1000     700             300                0           0           A
                                            001             30            2000     500             1500              0           0           B
                                            002             45            2000     300             300             1400         0           C
so, should i have to create one formula in colums or what should i write in that ?
can we harcord  values in foumula ???
PlZ help me 
Regards,
BI NEW

Hi,
This can be achieved using routine in update rules / transformations, and I don't think it can be done at query level using a CKF because you cannot use if statement with alphabets. So it is better to include a field at infoprovider and fill the values as per the formula.
Hope this helps.............
Rgs,
I.R.K

Similar Messages

  • How to define roles for the reports that i have created using WAD?

    Hi all,
    Can anyone let me know how to define roles for the reports generated using WAD. And what is the procedure for creating and defining roles. Is this process take care of Bw consultant nor the basis guys.
    Can anyone let me know the entire procedure about the roles in bw 3.5
    thanxs
    haritha

    Following links might helps you
    create a role
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/authorizationinSAPNWBI&

  • Sample query for Aging Report

    Hi! Anybody who has a sample sql query for aging report? basically this is the table structure and sample data
    bill_no B1-01 B1-02 B1-03
    bill_date 01-JAN 01-FEB 01-MAR
    previous_balance 100 600 800
    current_charges 500 200 400
    total_due 600 800 1200
    As of march 1, total due is 1200. how can i get the breakdown of 1200 as to the number of days it has been due. ex. 500 (60 days old 01-JAN to 01-MAR), 200 (30 days old), 400 (current)
    please help. thanks!
    null

    SELECT CEIL((SELECT MAX(Bill_Date) FROM Bill)- Bill_Date) Days , Previous_Balance, Current_Charges FROM Bill ORDER BY Days ASC
    Then create a matrix reprot.

  • FI-SL How to define  formula components ID(report painter)

    Hi Experts
    please teach me how to define formula components ID.(it is related to report painter)
    I cannot see by GS13(variable)
    Regards.

    I sloved by myself. it automatically made when I add the row or culumn.
    but after delete the  row or culumn. it may have a problem.... I do not know.
    thanks.

  • Waiting for aging report source code

    Hi,
    Please give the source code snippet for the following case.
    aging analysis program for open items:-
    payments not receivecd for 15 days,30 ,60 ,90days
    imput:
    custno range
    sales area
    days 30,60,90 selection sort by cust no,sales organization
    output :report program ALV grid format
    Many Thanks in Advance.

    Look at transaction S_ALR_87012178.
    Send the cash to Eric.
    Regards

  • Last date for an invoice formula for Crystal Reports

    Post Author: jegva
    CA Forum: Crystal Reports
    I sure hope someone can help me write a formula to list only the last dated invoice from our database.  Let me explain, our sales would like a report listing all of our customers showing their last dated invoice.  We use SQL and Crystal Reports 8.5 (yea outdated).  They are interested in showing all our customers and their last invoice/date so they can try to contact those who have not done business for some time. Please help!!!!!!!

    Hi Scott,
    One reason is the older versions introduced a .5 font reduction in the viewers. This was a good thing for some but bad thing for others so I assume what the developers have done is leave the font as is and show those # symbols now to indicate the viewer you are using and font you are using works differently on the OS and the various viewers being used.
    In CR designer it uses the GDI+ to render the data through classic C++ function calls. I .NET it too uses GDI+ but it's the Framework making the calls and the Framework handles screen mapping differently. We've had this issue/functionality limitations since version 9. Various reasons and various work arounds resulted in various outputs.
    Another reason is the C++ viewer built into the Report Designer and the .NET framework handling the fonts work slightly differently when rendering. This has been tracked and few times here by me and in both cases the cause is GDI+ has bugs in it so it's nothing we can do. Post or log your issue with Microsoft, they may be able to fix it. Once they do then if it's still a problem in CR we can fix it depending on what MS does.
    Another work around may be to use a fixed font like Courier or some other font that has a specified character area all characters use, it may make the characters space oddly but as for displaying it's always the same size.
    All I can suggest is they get into a practice of testing their reports in your app before "publishing"
    Thanks again
    Don

  • Authorisation for ageing reports

    Can anyone tell me which authorisation to allow for module : Business Partner>Business Partner Reports>Customer receivables Ageing?
    I have already given full authorisation on Business Partner reports and tried various other authorisations without success..

    Open 'Administration ->System Initialization -> Authorizations.'
    Select a User and Navigate  to Financials -> Financial Reports -> Aging ->Customer Receivables Aging'
    Set the required authorization here.

  • 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

  • Now to define new formulas for pricing?

    can any one please tell me a business scenario where one needs to define a new pricing formula, and how can one can do that in the system?
    points will be rewarded immediately.
    thanks
    PR

    Hi,
        As our friends suggested you can create new formulas for pricing with the Transaction code VOFM.
    Process is use VOFM(Transaction code)------>in top menu you can see Formulas, select appropriate option in Formulas lke.. Condition base value, Condition Value etc.,
    Please go through detail information:-
    Formulas are represented as FORM routines. They are used in pricing and influence the determination of prices according to predefined rules. You can specify them in pricing control. The following groups of formulas exist:
    Scale base value
    The scale base value includes FORM routines which determine the scale base value according to criteria that are not defined in the standard system. You enter the scale base value in the Scale formula field. A formula for the scale base value can define, for example, that partial quantities are taken into account.
    Condition base value
    Formulas for the condition base value take into account criteria not defined in the standard system. You enter them in the Alternative formula for condition base value field in the pricing procedure. A formula for the condition base value can define, for example, that the condition determination is based on net value or volume.
    Condition value
    Formulas for determining of the condition value include routines which determine the condition value according to criteria not defined in the standard system. You enter the formulas for the determination of the condition value in the Condition formula for alternative calculation type field in the pricing procedure. A formula for the condition value can define, for example, that the system determines the best price for the customer.
    Structure of group key
    Using this menu entry, you can edit routines that determine the base value for the scale value if group conditions are used in pricing. The system then calculates the base for the scale value from more than one document item. You can enter the routines in the Group condition routine field on the screen for defining condition types. A routine for the determination of the scale valuecan define, for example, that only a particular condition type is taken into acount.
    Rounding rules
    Using this entry, you can create and edit FORM routines that carry out a particular type of rounding in the condition record during a price change. A rounding rule could round a price that was increased by 1% to the last two places behind the decimal point, for example.
    Procedure
    To define your own formulas, proceed as follows:
    1. First check whether you can use the formulas delivered with the standard system.
    2. Either overwrite an existing formula or select a group number from the number range reserved for customer modifications (600-699) and enter the corresponding description.
    3. Program the formula in the editor.
    4. Activate the formula.
    5. Enter a long text that describes the meaning of the formula in more detail.
    6. Enter an application if you want to use the formula in a particular application area only (pricing, for example).
    7. Enter the formula in the appropriate place of the control
    NOTE:- to create new routine get Access key from Basis.
    I hope it will help you to define formulas for pricing.
    Regards,
    Venkat

  • AP aging report from SAP

    We found that AP aging report from SAP  is not tie with Balance in Balance sheet.  Please advise how to find the report which match with our requirement.
    Concept of the AP aging report is to age outstanding AP as at the end of month (Open item date).  We found that A/P aging report which we currently use is cannot match to balance per G/L. (Please see detail in attached file). And the balance in AP aging report is always changes if we retrieve data on difference timing.
    Additionally, this report is not show the reconciliation account, please advise whether it is possible to show summary line which sum by reconciliation account.
    Please advise if you have another SAP transaction or any advise on this.
    kindly suggest

    Hi,
    For ageing report please go to fbl3n and go for change layout there is a option for ageing and posting period choose those two and subtotal it according to posting then you will get period wise meand month wise ageing  report for vendor.
    S_ALR_87012078 - Due Date Analysis for Open Items
    Hope this is clear if yes assign points
    Regards,
    Sankar

  • Ageing report on over 30 days

    Hi Experts
    How to do the selection for Ageing Report in Over 30days, Over 211 days Above 30 days, Total Over 30 days  explain detailed with offest values.
    Edited by: Sk Babu999 on Dec 29, 2010 2:01 PM

    Hi:
    Take a look at the paper by Surendra Reddy.
    "Calculating the Ageing of the Materials"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f15839-0cf1-2b10-c6a7-ebe68cc87cdc?quicklink=index&overridelayout=true
    Another example is the paper by Neelesh Kumar Jain.
    "Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c09f49c2-7448-2c10-ac92-d75f263a0dce?quicklink=index&overridelayout=true
    Regards,
    Francisco Milán.

  • How to prepare Aging report in another system

    Hi,
    I have seen aging report for customer in SAP B1, its okay but not serve my purpose. i want this report little difference.
    i sent a link file for aging report like this way.
    [Aging Report |
    http://www.sendspace.com/file/v8jbt3]
    if it is possible to make this report please help me about this.
    Regards,
    Mizan
    Edited by: mizan700 on Dec 29, 2010 11:39 AM

    Hi Mizan,
    Try this as a command in Crystal Report:
    SELECT T0.CardName,T0.DocNum,T0.DocDueDate, DateDiff(DD,T0.DocDueDate,getDate()) as Overdue, T0.DocTotal-T0.PaidToDate as 'Due Amount'
    FROM dbo.OINV T0
    where T0.DocStatus='O' AND DateDiff(DD,T0.DocDueDate,getDate())>0
    UNION ALL
    SELECT T0.CardName,Null,NULL, NULL, SUM(T0.DocTotal-T0.PaidToDate) as 'Due Amount'
    FROM dbo.OINV T0
    where T0.DocStatus='O' AND DateDiff(DD,T0.DocDueDate,getDate())>0
    GROUP BY  T0.CardName
    Order By T0.CardName,T0.DocDueDate DESC
    Rank can be by CR function.
    Thanks,
    Gordon

  • Aging Report SQL Query

    Dear Guys,
    I have tried for aging report query , but still my expected results is not come. Please go through below the table and script data for your reference. Please wirte a query for aging report.
    USE [SAMPLES]
    GO
    /****** Object: Table [dbo].[NEW_DCB_REPORT] Script Date: 02/12/2015 01:19:06 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING OFF
    GO
    CREATE TABLE [dbo].[NEW_DCB_REPORT](
    [MFDB_LedgerNumber] [int] IDENTITY(1,1) NOT NULL,
    [MFDB_TxnDate] [datetime] NOT NULL,
    [MFDB_StateId] [int] NOT NULL,
    [MFDB_RegionId] [int] NOT NULL,
    [MFDB_BranchId] [int] NOT NULL,
    [MFDB_SHGId] [int] NOT NULL,
    [MFDB_SHGName] [varchar](75) NOT NULL,
    [MFDB_ShgMemberId] [int] NOT NULL,
    [MFDB_MemberName] [varchar](50) NOT NULL,
    [MFDB_VillageId] [int] NOT NULL,
    [MFDB_LoanNumber] [int] NOT NULL,
    [MFDB_LoanAmount] [int] NOT NULL,
    [MFDB_DisbursedDate] [datetime] NOT NULL,
    [MFDB_DemandDate] [datetime] NULL,
    [MFDB_CollectionDate] [datetime] NULL,
    [MFDB_InstallmentNumber] [int] NOT NULL,
    [MFDB_ArrearPrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_ArrearInterest] [numeric](18, 2) NOT NULL,
    [MFDB_DemandPrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_DemandInterest] [numeric](18, 2) NOT NULL,
    [MFDB_TotDemandPrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_TotDemandInterest] [numeric](18, 2) NOT NULL,
    [MFDB_AdvOBPrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_AdvOBInterest] [numeric](18, 2) NOT NULL,
    [MFDB_CollectedPrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_CollectedInterest] [numeric](18, 2) NOT NULL,
    [MFDB_AdvCBPrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_AdvCBInterest] [numeric](18, 2) NOT NULL,
    [MFDB_BalancePrincipal] [numeric](18, 2) NOT NULL,
    [MFDB_BalanceInterest] [numeric](18, 2) NOT NULL,
    [MFDB_OS_Pri] [numeric](18, 2) NOT NULL,
    [MFDB_OS_Int] [numeric](18, 2) NOT NULL,
    [MFDB_RepaymentPercentage] [int] NOT NULL,
    [MFDB_LoanSchemeId] [int] NOT NULL,
    [MFDB_LActivityId] [int] NOT NULL,
    [MFDB_LActSpecId] [int] NOT NULL,
    [MFDB_FundAgencyId] [int] NOT NULL,
    [MFDB_LSourceId] [int] NOT NULL,
    [MFDB_Months] [varchar](15) NOT NULL,
    [MFDB_PanchayatId] [int] NOT NULL,
    [MFDB_PanchayatName] [varchar](100) NOT NULL,
    [MFDB_VillageName] [varchar](100) NOT NULL
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    USE [SAMPLES];
    SET NOCOUNT ON;
    SET XACT_ABORT ON;
    GO
    SET IDENTITY_INSERT [dbo].[NEW_DCB_REPORT] ON;
    BEGIN TRANSACTION;
    INSERT INTO [dbo].[NEW_DCB_REPORT]([MFDB_LedgerNumber], [MFDB_TxnDate], [MFDB_StateId], [MFDB_RegionId], [MFDB_BranchId], [MFDB_SHGId], [MFDB_SHGName], [MFDB_ShgMemberId], [MFDB_MemberName], [MFDB_VillageId], [MFDB_LoanNumber], [MFDB_LoanAmount], [MFDB_DisbursedDate], [MFDB_DemandDate], [MFDB_CollectionDate], [MFDB_InstallmentNumber], [MFDB_ArrearPrincipal], [MFDB_ArrearInterest], [MFDB_DemandPrincipal], [MFDB_DemandInterest], [MFDB_TotDemandPrincipal], [MFDB_TotDemandInterest], [MFDB_AdvOBPrincipal], [MFDB_AdvOBInterest], [MFDB_CollectedPrincipal], [MFDB_CollectedInterest], [MFDB_AdvCBPrincipal], [MFDB_AdvCBInterest], [MFDB_BalancePrincipal], [MFDB_BalanceInterest], [MFDB_OS_Pri], [MFDB_OS_Int], [MFDB_RepaymentPercentage], [MFDB_LoanSchemeId], [MFDB_LActivityId], [MFDB_LActSpecId], [MFDB_FundAgencyId], [MFDB_LSourceId], [MFDB_Months], [MFDB_PanchayatId], [MFDB_PanchayatName], [MFDB_VillageName])
    SELECT 18, '20140422 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', NULL, NULL, 0, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'Apr - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 162, '20140521 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20140521 00:00:00.000', NULL, 1, 0.00, 0.00, 0.00, 150.00, 0.00, 150.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 150.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'May - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 13932, '20140621 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20140621 00:00:00.000', NULL, 2, 0.00, 150.00, 909.00, 150.00, 909.00, 300.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 909.00, 300.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'Jun - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 32505, '20140721 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20140721 00:00:00.000', NULL, 3, 909.00, 300.00, 909.00, 136.00, 1818.00, 436.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1818.00, 436.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'Jul - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 62524, '20140821 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20140821 00:00:00.000', NULL, 4, 1818.00, 436.00, 909.00, 123.00, 2727.00, 559.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 2727.00, 559.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'Aug - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 100871, '20140921 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20140921 00:00:00.000', NULL, 5, 2727.00, 559.00, 909.00, 109.00, 3636.00, 668.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 3636.00, 668.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'Sep - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 153679, '20141021 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20141021 00:00:00.000', NULL, 6, 3636.00, 668.00, 909.00, 96.00, 4545.00, 764.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 4545.00, 764.00, 10000.00, 1051.00, 0, 3, 4, 77, 3, 2, N'Oct - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 203840, '20141119 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', NULL, '20141119 00:00:00.000', 2, 4545.00, 764.00, 0.00, 0.00, 4545.00, 764.00, 0.00, 0.00, 10000.00, 150.00, 5455.00, 0.00, 0.00, 614.00, 0.00, 901.00, 0, 3, 4, 77, 3, 2, N'Nov - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 291259, '20141221 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20141221 00:00:00.000', NULL, 8, 0.00, 614.00, 909.00, 68.00, 909.00, 682.00, 5455.00, 0.00, 0.00, 0.00, 4546.00, 0.00, 0.00, 682.00, 0.00, 901.00, 0, 3, 4, 77, 3, 2, N'Dec - 14', 2927, N'PALI', N'PALI' UNION ALL
    SELECT 363176, '20150121 00:00:00.000', 6, 16, 67, 5514, N'MAHALAXMI-5514', 66735, N'SUNITA', 4624, 1, 10000, '20140422 00:00:00.000', '20150121 00:00:00.000', NULL, 9, 0.00, 682.00, 909.00, 55.00, 909.00, 737.00, 4546.00, 0.00, 0.00, 0.00, 3637.00, 0.00, 0.00, 737.00, 0.00, 901.00, 0, 3, 4, 77, 3, 2, N'Jan - 15', 2927, N'PALI', N'PALI'
    COMMIT;
    RAISERROR (N'[dbo].[NEW_DCB_REPORT]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
    GO
    SET IDENTITY_INSERT [dbo].[NEW_DCB_REPORT] OFF;
    I expected results as below:
    Report As On Date: 30-10-2014
    S.No. SHG NAME MEMBER NAME <=30 31-60 61-90 91-120 91-180 181-365 365 - 689 Above 2 Yrs
    1 MAHALAXMI-5514 SUNITA 0 909 1818 2727 3636 4545 0 0
    Report As On Date:
    30-10-2014
    S.No.
    SHG NAME
    MEMBER NAME
    <=30
    31-60
    61-90
    91-120
    91-180
    181-365
    365 - 689
    Above 2 Yrs
    1
    MAHALAXMI-5514
    SUNITA
    0
    909
    1818
    2727
    3636
    4545
    0
    0

    Thanks for your replay,  I have checked your query it seems nearly ok, Please find my script which i tried above for the same.
    DECLARE @i_AsOnDate AS DATETIME = '2014-09-30'
    ;WITH CA1 AS
    SELECT ROW_NUMBER() OVER(Order  By DR.MFDB_SHGName,DR.MFDB_MemberName)
    AS SerialNumber,
      DR.MFDB_SHGId
    AS ShgId,
      DR.MFDB_SHGName
    AS ShgName,
      DR.MFDB_ShgMemberId
    AS MemId,
      DR.MFDB_MemberName
    AS MemName,
      ISNULL((SELECT CAST(SUM(LD.MFDB_StdPrincipal) AS BIGINT )
      FROM  MFDB_LOAN_DISBURSEMENT LD
      WHERE LD.MFDB_SHGId
    = DR.MFDB_SHGId 
      AND   LD.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId 
      AND   LD.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
      AND   LD.MFDB_ApprovalStatus = 1
      AND   DATEDIFF(DAY,@i_AsOnDate,LD.MFDB_CollectionDate) > 0 ),0)
    AS YETDUE,
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) >= 0
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 30
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '0-30',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 60 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 30
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '31-60',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 90 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 60
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '61-90',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 120 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 90
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '91-120',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 180 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 120
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '121-180',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 365 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 180
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '181-365',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 689 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 365
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS '366-689',
    ISNULL((SELECT TOP 1 CAST(ND.MFDB_BalancePrincipal AS BIGINT )
    FROM dbo.MFDB_NEW_DCB_REPORT ND
    WHERE ND.MFDB_SHGId
    = DR.MFDB_SHGId 
    AND   ND.MFDB_ShgMemberId
    = DR.MFDB_ShgMemberId  
    AND   ND.MFDB_LoanNumber
    = DR.MFDB_LoanNumber
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) <= 730 
    AND   DATEDIFF(Day,ND.MFDB_TxnDate,@i_AsOnDate) > 689
    ORDER BY ND.MFDB_LedgerNumber DESC),0)
    AS 'Above_2_Yrs'   
    FROM DBO.MFDB_NEW_DCB_REPORT DR
    WHERE DR.MFDB_BranchId
    = 67
    AND   DR.MFDB_SHGId
    IN (5514)
    AND   DR.MFDB_ShgMemberId = 66735
    AND   DATEDIFF(DAY,MFDB_TxnDate,@i_AsOnDate) >= 0  
    SELECT * FROM CA1
    results after the execution of the script:
    SerialNumber
    ShgId
    ShgName
    MemId
    MemName
    YETDUE
    0-30
    31-60
    61-90
    91-120
    121-180
    181-365
    366-689
    Above_2_Yrs
    3
    5514
    MAHALAXMI-5514
    SUNITA
    10000
    3636
    2727
    1818
    909
    0
    0
    0
    0
    2
    5514
    MAHALAXMI-5514
    SUNITA
    10000
    3636
    2727
    1818
    909
    0
    0
    0
    0
    6
    5514
    MAHALAXMI-5514
    SUNITA
    10000
    3636
    2727
    1818
    909
    0
    0
    0
    0
    4
    5514
    MAHALAXMI-5514
    SUNITA
    10000
    3636
    2727
    1818
    909
    0
    0
    0
    0
    1
    5514
    MAHALAXMI-5514
    SUNITA
    10000
    3636
    2727
    1818
    909
    0
    0
    0
    0
    5
    5514
    MAHALAXMI-5514
    SUNITA
    10000
    3636
    2727
    1818
    909
    0
    0
    0
    0
    But I expected results is:
    s.n
    ShgId
    ShgName
    MemId
    MemName
    YETDUE
    0-30
    31-60
    61-90
    91-120
    121-180
    181-365
    366-689
    Above_2_Yrs
    1
    5514
    MAHALAXMI-5514
    66735
    SUNITA
    10000
    909
    1818
    2727
    3636
    0
    0
    0
    I want only one record per member with aging .. please advice me for further action.

  • AR aging report does not print alphabetically by customer name in 8.8

    AR aging report does not print alphabetically by customer name in version 8.8.
    It is possible to create a custom layout for the receivables aging summary report (to print alphabetically by BP name) to overcome this problem. However, itu2019s not possible for the u201Cdetailed receivables aging reportu201D or u201Ccustomer statement reportu201D.
    Why has SAP changed this functionality? In version 2007 SAP takes the order of the rows set on the screen unless other order is specified in the layout.
    How can we make the u201Cdetailed receivables aging reportu201D and u201Ccustomer statement reportu201D print alphabetically by customer name?
    Steps to reproduce:
    Business partners > Business partner reports > Aging > customer receivables aging
    Doubleclick on customer name to sort it in alphabetical order.
    Click on preview and select u201Creceivables aging summary reportu201D.
    The system layouts do not print by customer name in alphabetical order.
    Click on preview and select u201Cdetailed receivables aging reportu201D. The system layouts do not print by customer name in alphabetical order.
    Also, customer statement report does not print by customer name in alphabetical order.
    In SAP 2007 versions, when a marketing document or aging report is printed, SAP takes the order of the rows set on the screen unless other order is specified in the layout.
    In SAP 8.8 although it works the same way for marketing documents, it doesnu2019t work like this for Aging reports.
    I was able to change the order for the u201CReceivables Aging Summary Reportu201D only.  We cannot overwrite a System report, I had to create a new layout called:  u201CBusiness Partner Aging (Summary) (Alphabetically Sorted)u201D.
    I couldnu2019t set up the order based on BP Name for the other 2 options: Detailed Receivables Aging Report and Customer Statement Report (One page per Customer).
    Iu2019ve checked print settings and properties, and I donu2019t see any way of changing the default order for these reports.

    Reported it to SAP support + they plan to fix it in a future patch.

  • Combine Aging report to Invoice in PLD????

    Dear Experts,
    I would like each invoice show the customer's balance under footnote when print out.
    I know that I have to combine the Aging report to Invoice Report in PLD layout design.
    I still have no clue how to do that.
    Anyone please share your idea if it is possible.
    Thanks again.

    Hi,
    To combine both reports in PLD is not possible. Especially for Aging report, it is hard coded one. You have to try by Crystal Report.
    Thanks,
    Gordon

Maybe you are looking for

  • Design Console SSL problems for OIM 9.1.0.2

    Hi there, I have installed the design client for OIM 9.1.0.2, patched it and activated SSL using the instructions in: http://download.oracle.com/docs/cd/E14049_01/doc.9101/e14062.pdf However, when I attempt to log in, I get the following error at the

  • How can I delete a floorplan in Cisco Prime Infrastructure

    I built an 8 story building.  Started from the top and worked my way down.  Uploaded floor plans, added APs to them, etc. When I got to the first floor, I loaded a floor plan, but it did not fully load somehow.  I cannot click on the first floor and

  • Analytical Services Application Existence Check Fails against the SSH

    Hi guys,      We have a problem in Essbase 9.3.0.1. Some time, when we try to start the Essbase Server, is not possible to complete the startup sequence with the following error in Essbase.log: [Fri Jan 23 01:38:54 2009]Local/ESSBASE0///Error(1051417

  • Sorting measures (calculated members) in SSAS cube designer

    Hi, In SSAS 2012 cube designer, on the "Calculations" tab I am writing some simple calculated members and displaying it in a folder (Display Folder=) FolderA am So this FolderA has the members as below : [<-A1], [-A1], [A], [A1], [A2], [A3], [A4], [A

  • Trouble exporting non-standard frame size

    So I have to deliver a Quicktime that's 210w x 190h that will eventually be compressed for web posting. The source footage is DV/NTSC (720x480). I cut my initial sequence at those specs and then nested that into a 210x190 sequence and resized the nes