Statement of account aging query

hi,
im using 12.1.3
what is the query to find out the aging of a particular ACCOUNT as shown on footer of STATEMENT OF ACCOUNTS report?

Open the report using Reports Builder 10g and check the query used.
Thanks,
Hussein

Similar Messages

  • AR Aging query

    Hi Experts,
    I have a client who needs a AR Aging query that only shows totals (not individual BP balances) for 30, 60, 90, 120 and over 120 days.
    I can get the total with this query, but do now know how to go about the 30,60....
    SELECT SUM(T0.BalanceSys) AS 'Total AR'
    FROM  OCRD T0
    WHERE T0.CardType = 'C'
    Any help would be appreciated.
    Marli

    Gordon,
    Thanks so much for this help.
    I have tested this in a Demo database and found that this results is not the same as the Aging report. Then I tested it in another database where I do not have as many transactions and still this was not the same.
    I started to take only parts of the query and run them seperately. In this database I have only $80,954.85 due in the >120 days aging. Nothing else. Here is what this part of the query brought back: $425,929.06
    SELECT SUM(T2.SYSDeb- T2.SYSCred)
    FROM  dbo.OCRD T0 INNER JOIN dbo.JDT1 T2 ON T2.ShortName = T0.CardCode
    WHERE T2.[Account] = '_SYS00000000010'
    AND T0.CardType = 'C' AND DateDiff(DD,T2.Duedate,GetDate()) >120
    When I delete the DateDiff part I get the right total: $80,954.85
    SELECT SUM(T2.SYSDeb- T2.SYSCred)
    FROM  dbo.OCRD T0 INNER JOIN dbo.JDT1 T2 ON T2.ShortName = T0.CardCode
    WHERE T2.[Account] = '_SYS00000000010'
    AND T0.CardType = 'C'
    Thanks for your help,
    Marli

  • Can't make simple 'IF' statement work in MS Query!?

    I have read the existing threads on the subject but can't seem to make a simple 'IF' statement work in MS Query with a single table. I always get the following error:
    Returns error message:
    "Incorrect syntax near the keyword 'if'
    Incorrect syntax near ','.
    Statement(s) could not be prepared.
    Here's my query (simplified, but not much):
    select *
    from table t
    where t.modifieddate > if(t.active=0, date1, date2)
    Just to see if I could get AN if statement to work, I've also tried:
    SELECT t.active, if(t.active=0,2,3)
    FROM CdmsTimeSheet.dbo.Registrations t
    And
    SELECT t.active, if(t.active='0','2','3')
    FROM CdmsTimeSheet.dbo.Registrations t
    And
    SELECT t.active,
    FROM CdmsTimeSheet.dbo.Registrations t
    where datemodified>if(t.active='0',3/1/2014,1/1/2014)
    and
    SELECT t.active,
    FROM CdmsTimeSheet.dbo.Registrations t
    where datemodified>if(t.active='0',#3/1/2014#,#1/1/2014#)
    I've been using excel/ms query for many years but not in the last year or two and am wondering if this was somehow removed? I tried using decode but then get a "not built-in function" error.
    Please help! Thanks

    Not sure what kind of database you are using. In SQL Server, you should use 'Case when' Statement Or 'IIF' function instead of if.
    e.g.
    select
    top (10) BusinessEntityID,iif( BusinessEntityID=1 , 'true' , 'false') as test
    from HumanResources.Employee
    order by BusinessEntityID
    Wind Zhang
    TechNet Community Support

  • Case statement in a multiple query

    Hi everyone,
    This is my first time to use case statement in a multiple query. I have tried to implement it but i got no luck.. Please see below
    set define off
    SELECT g.GROUP_NAME as Market
    ,t.NAME as "Template Name"
    ,t.TEMPLATE_ID as "Template ID"
    ,(SELECT created
    FROM material
    where template_id = t.template_id) as "Date Created"
    *,(SELECT DESTINATION_FOLDER_ID,*
    CASE DESTINATION_FOLDER_ID
    WHEN NULL THEN 'Upload'
    ELSE 'HQ'
    END
    from log_material_copy
    where destination_material_id in (select material_id
    from material
    where template_id = t.template_id ))as "Origin"
    ,(select material_id
    from log_material_copy
    where destination_material_id in (select material_id
    from material
    where template_id = t.template_id)) as "HQ/Upload ID"
    ,(SELECT COUNT (mse.ID)
    FROM MATERIAL_SEND_EVENT mse, material m, creative c
    WHERE mse.MATERIAL_ID = m.MATERIAL_ID
    AND mse.MATERIAL_TYPE_ID = m.MATERIAL_TYPE_ID
    AND m.ASSET_ID = c.id
    AND c.TEMPLATE_ID = t.TEMPLATE_ID) as Sent
    ,(SELECT COUNT (de.ID)
    FROM download_event de, material m, creative c
    WHERE de.MATERIAL_ID = m.MATERIAL_ID
    AND de.MATERIAL_TYPE_ID = m.MATERIAL_TYPE_ID
    AND m.ASSET_ID = c.id
    AND c.TEMPLATE_ID = t.TEMPLATE_ID) as Download
    ,(SELECT 'https://main.test.com/bm/servlet/' || 'UArchiveServlet?action=materialInfo&materialId=' || DESTINATION_MATERIAL_ID || '&materialFolderId=' || DESTINATION_FOLDER_ID
    from log_material_copy
    where destination_material_id in (select material_id
    from material
    where template_id = t.template_id)) as "URL to template on MPC layer"
    --, t.AVAILABLE_FOR_TRANSFER as "Available for transfer"
    FROM template t, layout l, groups g
    WHERE t.LAYOUT_ID = l.LAYOUT_ID
    AND l.ORGANIZATION_ID = g.IP_GROUPID
    AND g.IP_GROUPID in ( 1089, 903, 323, 30, 96, 80, 544, 1169, 584, 785, 827, 31, 10, 503, 1025 )
    ORDER BY g.GROUP_NAME ASC;
    The one in bold is my case statement.. Please let me know what is wrong with this.
    Regards,
    Jas

    I think you're getting the idea, but:
    You're still selecting 2 columns in the (scalar) subquery. Did you read the link I posted for you?
    "a) scalar subqueries - *a single row, single column query that you use in place of a "column"*, it looks like a column or function."
    You must move that query outside, join to template.
    Something like:
    NOT TESTED FOR OBVIOUS REASONS SO YOU'LL PROBABLY NEED TO TWEAK IT A BIT
    select g.group_name as market,
           t.name as "Template Name",
           t.template_id as "Template ID",
           m.created  as "Date Created",
           lmc.destination_folder_id,
           case lmc.destination_folder_id
             when null then 'Upload'
             else 'HQ'
           end as "Origin"
           (select material_id
              from log_material_copy
             where destination_material_id in
                   (select material_id
                      from material
                     where template_id = t.template_id)) as "HQ/Upload ID"
           (select count(mse.id)
              from material_send_event mse, material m, creative c
             where mse.material_id = m.material_id
               and mse.material_type_id = m.material_type_id
               and m.asset_id = c.id
               and c.template_id = t.template_id) as sent
           (select count(de.id)
              from download_event de, material m, creative c
             where de.material_id = m.material_id
               and de.material_type_id = m.material_type_id
               and m.asset_id = c.id
               and c.template_id = t.template_id) as download
           (select 'https://main.test.com/bm/servlet/' ||
                   'UArchiveServlet?action=materialInfo&materialId=' ||
                   destination_material_id || '&materialFolderId=' ||
                   destination_folder_id
              from log_material_copy
             where destination_material_id in
                   (select material_id
                      from material
                     where template_id = t.template_id)) as "URL to template on MPC layer"
    --, t.AVAILABLE_FOR_TRANSFER as "Available for transfer"
      from template t
      ,    layout l
      ,    groups group by
      ,    MATERIAL M
      ,    LOG_MATERIAL_COPY LMC
    where t.layout_id = l.layout_id
       and l.organization_id = g.ip_groupid
       and M.TEMPLATE_ID = t.template_id
       and LMC.destination_material_id in ( select material_id
                                            from   material
                                            where  template_id = t.template_id
       and g.ip_groupid in (1089,
                            903,
                            323,
                            30,
                            96,
                            80,
                            544,
                            1169,
                            584,
                            785,
                            827,
                            31,
                            10,
                            503,
                            1025)
    order by g.group_name asc;

  • Duplicate line item in Statement of account

    Dear All,
    Why there is duplicate line item in Statement of account?

    Hi Ajit,
    In your ECC system follow below path and set Availability check rule to "B" (full delivery).
    SPRO --> SD --> Basic Functions --> Availability Check and TOR --> Availability Check --> Availability Check with ATP Logic or Against Planning --> Define Default Settings
    Select your sales area and set Availability check rule to "B" (full delivery).
    This should fulfill your requirement.
    Rgds
    Sourabh

  • Standard Bank Reconciliation and Customer and Vendor Statement of Accounts

    Hello Experts,
    I am implementing ECC6.0 now.  I'm noit very familiar with the version so I am very hopeful that you could help me find the following standard reports in SAP. If these are not standard, then I need to recommend customization since the data are in SAP nonetheless.
    Are these reports available as standard report in SAP ECC6.0?  Can you please tell me the transaction codes?
    - Bank Reconciliation
    - Statement Of Accounts for Customers
    - Statement of Accounts for vendors
    - Credit Analysis using Credit Control Area as parameter
    Thanks in advance
    Rocel

    Hi,
    BRS - FF_5 (If the statement is in a recognised format), FF67 and FEBA_BANK_STATEMENT (if the statement is manual)
    Statement of Accounts for vendors and customers - F.27, Correspondence SAP06. However you may want to change the standard form.
    Credit Analysis - FCV3, F.33, F.31, S_ALR_87012218.
    Rgds
    Shivram.

  • Aging Query

    Hi,
    I am working on an aging query.  This query must have the sales org in the column and the quantity and SO count should be bucketed depending on difference between the current date and another date.
    Output should resemble as below:
    Sorg   <30days       >31<60  >60<90    >90
                count | Qty    Qty        Qty        Qty
    1111         xxx           xxx       xxx         xxx
    I created a structure in the Rows and then created formula variables "Current date-given date < 30" and another variable " Current date-given date >31<60" etc
    I get correct values if I include the given date and the Sdoc number into my query.  If I move the Sdoc number to free char, my output values are zeros.
    How can I get a summarize view of my output without including the Sdoc number into the query.  I did try searching for similar issue within the forum.  Dint find it helpful So any feedback is appreciated.
    Thanks,
    Rad

    Hi Rad,
    When you include sales organization alone in the column, you get wrong result...that happens coz several document numbers are falling under 1 organization, when you run query it accumulates the data based on query design. As you have only sales org which in turn contains many sales document's so it aggregates all of them and dont able to identify what date it should pick up for calculation's hence output is not fine.
    So any how u have to go to lowest level for date calculation but you might not have to show them in your query, then please include the sales document number and in display please select hide and supress result display for document number.
    Hope its clear to you.
    Thanks
    dipika

  • Customer Statement of Account

    Dear All,
    What is the T-code for Customer Statement of Account.
    (Required for period i.e. From 1/04/2007 to 31/3/2008).
    Regards,
    Srikanthraj

    VD04 - Customer account changes
    FD10  -   Customer Account Balance
    FD10N  -   Customer Balance Display
    FD10NA  - Customer Bal. Display with Worklist
    FD10NET  - Customer Balance Display
    FD11  -   Customer Account Analysis
    Reward Points if useful.

  • Statement of Account

    Hi all,
    Can anyone kindly guide me how to perform testing for statement of account?
    The abaper has already developed the form and now need to do the testing.
    Please help me as I'm still fresh in this field.
    Many thanks.

    Hi Helena,
    Pls go trough the Functional Document of that Report and understand what it does
    Example: It just diplay report extracted from some tables which is not there in SAP standars
    or
    It posts doucment when you click on execute.
    Just go trough the Business process of that report and do testing in Develpment box. If it is display report check all the fields values are displaying properly.
    if there is any calculation in the report check it is doing properly.
    If it is posting doocumet check the accounts it is posting.
    Best Regards
    Ashish Jain

  • A/R Aging query

    Hello Guys,
    I am trying to understand the structure of SAP BI A/R aging query. I have a question about the definition of the monthly buckets.
    In one of the selections, we have
    Item status - open
    Net due date - 1 - 30 Days
    Document Date <= net due date
    Amount = Debit/Credit amount in local currency
    My questions is: what do we mean by  document date <= net due date
    Here net due date is an interval of 1-30 days
    Eg: Assume user entered key/due date - 3/31/2011
    Net due date bucket for 1-30 days mean: Net due date <= 3/30/2011 and Net due date >= 3/1/2011
    what will be the value for document date?
    Please let me know.
    Thanks.

    Hi George,
    Document Date <= Key Date
    Mean the report should consider only those documents that are posted before User Key Date.

  • Smartform for Statement of Account F.27

    Hi all,
    I was searching for the way to print the statement of account using smartforms instead of the standard script. I found that the report program RFKORD10  is used for report printing with event SAP08. Now, is there a way where i can modify the standard functionality to call a smartform. I've tried to change Z program name using ob78 but it is not helping. your response is highly appriciated.
    Thanks,
    Janisar

    Hi,
    Calling a smart form is done by ABAPER by using function module , where you can call the required form . Here you can change the form if company code differes. You need to workout this with your abaper.
    Regards
    Milind

  • Customer Ageing query

    Hi
    We have a standard query in BW for customer ageing query 0FIAR_C03_Q0002.
    In this query we have several dates
    1. Document date
    2. Posting date
    3. Base line date
    4. Net due date.
    Its very tough to understand what is the significance of these dates and how the query is calculated based on which date. I am finding it difficult to xplani to the client about this report.
    Can anyone explain me about these dates and how the query is calculated on which date.
    Regards
    Annie

    Hi
    When i execute the query, there is a variable called KEY DATE(*). What is that date. When i see in the query designer, there is no variable specified in filter, free characteristics or Rows. Then from where is this varialbe is getting popping up.
    and when i enter a date, how it is going to calculate. I am very much confused. need your inputs.
    Regards
    Annie

  • What is aging report or aging query

    hi
      i am suresh,
            what is aging report or aging query.
            can any one tell.

    Hello Suresh,
    Based on the business requirements you design the inventory aging report. Here are few scenarios:
    1) Technical Name: 0IC_C03_Q0021
    Use
    This query displays the inventory aging for selected materials per week and calendar year, and is used in the KPI monitor.
    2) Technical Name: 0IC_C01_Q0009
    Use
    The percentage of total gross inventory (based on value) covered by expected demand within a specific time bucket.
    3)
    With this picking strategy the system proposes the oldest quant in the storage type as the quant that should be transferred.
    The system generally calculates the "age" (length of time in storage) of a quant on the basis of the goods receipt posting date from the Inventory Management (IM) application component. The system automatically sets the goods receipt date in the quant and in the transfer requirement for every goods receipt posting in IM. When the transfer order is created, this date is copied over to the quant record of the destination storage bin.
    You can accept the goods receipt date that the system sets or you can enter a different date. Regardless of whether the system proposes the goods receipt date or you enter a different date, the date is used to calculate the age of the quant. This date influences the sorting sequence for each material.
    Prerequisites
    When you define the storage type record to use this strategy, enter f in the Picking strategy field.
    you can find more details in Help.sap.com which fields needs to used etc.
    Hope this helps,
    Bye,
    Naga.
    Message was edited by: Naga Timmaraju

  • Supplier Statement of Account

    Dear All,
    anybody have the supplier statement of account in Payables???
    Which can help us to get information for Prepayment, Invoices, Credit/Debit Notes, Payments.
    Regards
    Malik Asif Joyia

    Hi,
    have a look into the different Supplier Account Balance Reports (Supplier Account Balance Detail Report; Supplier Balances Detail Report (180 character)).
    But before the report bring a output, you must start the program Subledger Balance Maintenance for Payables Accounting Periods (and schedule for refresh).
    Dirk

  • Inventory Ageing query performance

    Hi All,
       I have created inventory ageing query on our custom cube which is replica of 0IC_C03. We have data from 2003 onwards. the performance of the query is very poor the system almost hangs. I tried to create aggregates to improve performance but its failed. What i should do to improve the performance and why the aggregate filling is failed. Cube have compressed data. Pls guide.
    Regards:
    Jitendra

    Inaddition to the above posts
    Check the below points ... and take action accordingly to increase the query performance.
    mainly check --Is the Cube data Compressed. it will increase the performance of the query..
    1)If exclusions exist, make sure they exist in the global filter area. Try to remove exclusions by subtracting out inclusions.
    2)Check code for all exit variables used in a report.
    3)Check the read mode for the query. recommended is H.
    4)If Alternative UOM solution is used, turn off query cache.
    5)Use Constant Selection instead of SUMCT and SUMGT within formulas.
    6)Check aggregation and exception aggregation on calculated key figures. Before aggregation is generally slower and should not be used unless explicitly needed.
    7)Check if large hierarchies are used and the entry hierarchy level is as deep as possible. This limits the levels of the hierarchy that must be processed.
    Use SE16 on the inclusion tables and use the List of Value feature on the column successor and predecessor to see which entry level of the hierarchy is used.
    8)Within the free characteristics, filter on the least granular objects first and make sure those come first in the order.
    9)If hierarchies are used, minimize the number of nodes to include in the query results. Including all nodes in the query results (even the ones that are not needed or blank) slows down the query processing.
    10)Check the user exits usage involved in OLAP run time?
    11)Use Constant Selection instead of SUMCT and SUMGT within formulas.
    12)
    Turn on the BW Statistics: RSA1, choose Tools -> BW statistics for InfoCubes(Choose OLAP and WHM for your relevant Cubes)
    To check the Query Performance problem
    Use ST03N -> BW System load values to recognize the problem. Use the number given in table 'Reporting - InfoCubes:Share of total time (s)' to check if one of the columns %OLAP, %DB, %Frontend shows a high number in all InfoCubes.
    You need to run ST03N in expert mode to get these values
    based on the analysis and the values taken from the above  - Check if an aggregate is suitable or setting OLAP etc.
    Edited by: prashanthk on Nov 26, 2010 9:17 AM

Maybe you are looking for

  • Not all data in report

    Whenever I create a report and have more than one database I lose part of my data.  I use the smart link because it will not let me link manually.  Is there an easy fix for this.  Also sometimes I get duplication of items.

  • How do i delete my Itunes account

    I made a new account because I forgot my old one but now that I retrieved the old info I am stuck with two accounts. How can i delete my new one?

  • Sad faced Ipod error message (click wheel ipod classic)

    I've had the sad faced ipod error message with my ipod before and forcing into disk mode has always solved it before. It's not showing up in itunes or my computer when I connect it to my laptop. I have tried forcing it into disk mode time and time ag

  • Skype Crashing on Login

    Skype crashes upon login and I get a "Skype has stopped working." message. It started after my Win7 computer got a BSOD while skyping someone. First time I uninstalled Skype and reinstalled which got it working. The second time trying to open it thou

  • Solved : Turn Windows features on or off is blank or empty while opening

    Successfully solved : Turn windows features on or off blank fix  If you are going to enable or disable or installing any feature in windows 7, you have to do the setup through “Turn Windows features on or off” in Programs and Features. When you click