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

Similar Messages

  • Can anyone share the query for inventory aging report

    Is there any standard reports for inventory aging in oracle ebs 12.1.3 ....... If not can anyone share the query for inventory aging report

    Hi,
    It may not be so simple as you are trying to reproduce the historical value.  I believe you have to create a temporary table first.  Or you may use Command feather to get the required data in advance.
    Thanks,
    Gordon

  • Transaction code thro' SAP Query for customer spefific report

    hi experts,
    how to create transaction code (using SE43-) for the sap query created on own??
    I have created the following required for a customer specific report
    1.Infoset thro sq02
    2.user group thro sq03 and assigned it to infoset
    3.query thro sq01 and saved it with text
    earlier i have used logical database PNPCE ( relevant for PA and payroll modules reports)
    using sq01 , go to basic list , selected required infotypes and fields and
    then selected, SAP List viewer for viewing and i get the report.
    Now my question is how to create a separate transaction code for this sap query which i created
    should i use SE43( area menu maintenance and area class???_)
    should i create a variant and go to SE43??
    advice solicited
    snr

    Hello
    when you excecute the query in right han side corner  you can get the program name
    go to se80 select program & type this name and then you can create a tcode for that prog in SE80
    reward points if helpful.
    the prog name will be something like : AQZZ/SAPQUERY/* " ur query name
    you can search for the name also in this manner

  • 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

  • Extractor for AR aging report ?

    Can anybody tell me if there is a standard extractor for this query ?
    I would also appreciate if you can tell me what we can get out of this report.
    Thanks,
    Rishi.

    Hi Rishi
    Use following for AR aging report (All business content objects)
    Data source: 0FI_AR_4
    Info cube: 0FIAR_C03
    Query :0FIAR_C03_Q0005
    Hope this helps
    Regards
    Pradip

  • SAP QUERY for Customer Master

    I need to create a SAP Query to generate a report for customers and i need to use KNA1,KNB1,KNVV,KNVP and KNB5 tables.I have no idea how to create Query's using SQ01,02 and 03.Can some help me reagarding this in terms of documentation or any usefull material.I am using ECC 6.0 any documentation based on this version is helpful.
    Regards,
    Sri.

    Review following link;
    http://www.thespot4sap.com/articles/sap_abap_queries_create_the_query.asp
    Thanks.

  • Need standrad program for vendor aging report

    Hi
      Need standrad program for vendor aging report.
    Please reply me only standrad programs.
    Point are sure.
    Regards,
    kumar

    Hi Pankaj
       sorry to say that this is not my required program.
    I need vendor aging report like s_alr_87012178 tc leads to customer aging report.
    Thanks for your effort.
    points are awarded.
    Regards,
    kumar

  • How to find the name of query for a given report

    Hi All,
    I am having the name of a report and i need to find out the name of query for that report . Plz tell me how to find out the name of the query for a given report.
    Thanks.
    Regards,
    Pooja Joshi.

    Use this FM
    RSAQ_DECODE_REPORT_NAME
    This FM takes program name as I/P and gives Query Name as O/P.
    This FM uses the structure AQADEF to fetch the data.
    Hope this helps.
    Regards
    Vinayak

  • Extracting the Logical sql query for the specified report  in OBIEE 11g

    Hi ,
    I want to extract the logical SQL Query for the Particular report in OBIEE 11.1.1.5.
    Any pointers related to this will be very helpful.
    Thanks,
    Sonali

    for a try please add Logical sql view to ur report it will dispaly the Logical sql for that Report..
    Hope it will helps you.

  • Bex query for BW abap report/ transaction

    Hi Experts, Here is a scenario: I developed ABAP program in BW using multiple DSOs for complex logic. Since I cannot use abap program directly in BO reports, I need to develop a query in BW for my abap program. Is it possible to develop a bex query for BW abap report / transaction in BW? I have limited knowledge on BW and BO. Please help me. Thanks in advance Raghu

    First of all thanks for your suggestion Matthew..!
    As you said, I created virtual info cube based on function module.
    In the info cube, I defined (4)dimensions and (1)key figure.
    In the fucntion module, appropriate below parameters defined and code written for the data table (e_t_data)
    CALL ZFM_XXXXXXX 
    EXPORTING   
    i_infoprov =                " Name of InfoProvider   
    i_th_sfc =                  " rsdri_th_sfc: List of Characteristics    
    i_th_sfk =                  " rsdri_th_sfk: List of Key Figures
    *   i_t_range =                 " rsdri_t_range: Range List
    *   i_tx_rangetab =             " rsdri_tx_rangetab: Table from Range List
    *   i_first_call =              " rs_bool       First Call
    *   i_packagesize = 100000      " i             Package Size 
    IMPORTING   
    e_t_data =                  " standard table:  Data Table   
    e_end_of_data =             " rs_bool       :End of Data Reached   
    e_t_msg =                   " rs_t_msg      : BW: Table with Messages
    Test:
    Right click the info cube and choose "displayed data", immediately it triggered above function module.
    when I see the import parameters data,
    no characteristcs data in i_th_sfc. But, key figures has data (1 record) in i_th_sfk.
    Not sure, Did I missed anything? Please help me.
    Thanks in advance

  • Need to find SAP query for corresponding ABAP program.

    Hello SAP Experts,
    I have an ABAP program "AQDESYSTQV000001ORDERDETAILS==" in ECC 4.7. We had a client copy recently from ECC 4.7 to ECC 6.0. Now in ECC 6.0 I am unable to find this program in SE38.
    Can you please tell me how to create this program in ECC 6.0 ? Also, by the name of this program it is clearly seen that this program is automatically created by using SAP query.
    I tried to generate the program using SQ01, but system asks me for the SAP query.
    Can you please tell me how to find the SAP Query for the corresponding abap program ? Also, the steps as in how to generate the program in ECC 6.0.
    Thanks.

    Hi Danish,
    In the program name, the query name is always attached.
    For example : The program name is , AQ10SD==========Z10SD_INVPRODL=
                           Here the query name is Z10SD_INVPRODL and if you go to transaction SQ01 and enter the query name
    then you can find the infoset.
    And also you can gernate the program with the help of query name.
    Please try the same and let me know if any details are required.
    Regards,
    Darshana

  • Query for Weekly Sales Report

    Dear Experts,
    I have developed the query for weekly sales report for the alert management to send out the report on every Monday as follow :
    SELECT T0.[CardCode], T0.[CardName], T0.[DocDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[LineTotal] FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.[DocDate] between GetDate()-8 and GetDate()-1
    The weekly report received on every Monday through email is without column total for the "Line Total".
    Can the Sum of column "Line Total" to be included in the query ?
    Thus, the auto send report on every Monday by alert management will display the total.
    Thanks in advance for all your kind assistance.
    Regards,
    Clara

    Ok you want it at the bottom.......
    then you must must try this if you are running query generator....
    Else a good option is Crystal Report.
    You need to only add Group Sum.......
    SELECT T0.CardCode, T0.CardName, T0.DocDate, T1.ItemCode, T1.Dscription, T1.Quantity, T1.LineTotal FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.DocDate between GetDate()-8 and GetDate()-1
    Union All
    Select '','',Null, '','Total',Null, Sum(T1.LineTotal) FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.DocDate between GetDate()-8 and GetDate()-1
    Regards,
    Rahul

  • SAP Query-for  Reporting   how to create and use it

    Hi SAP Gurus,
    i need your help. in my project, client is asking to create queries to generate reports, i am not familiar with queries, so would appreciate it if any one can guide me and tell me the procedure for writing and creating queries soon.
    also if you have any study material on steps on How to write and create queries for PP module
    thank you very much

    Hi
    Please refer below document
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Also refer below
    How to Create Infoset Query (SAP Query)
    Steps on how to proceed to create a Query:
    ADHOC QUERY
    A query can be created to extract information from master records  i.e  Infotypes.  For example, by creating a query , the data relating to an employee contained in various Infotypes can be extracted.
    Proceedure :  
    Decide on  the various Infotypes we  want to make the query.  Decide on the area where we  want to query  i.e  Global area or Standard area.  Standard area is client specific and globel area will include all clients.
    Menu : HR – PM – Admn -  Information System -  Adhoc Query
    Select area standard and select the  user group already created
    Creation of new query  :  
    TC SQ03  -  Select Environment – Select Standard Area -  Enter  --  If new user group is to be created, enter name of the user group, click on create and enter necessary information and  exit after saving
    TC SQ02  -  Enter name of the Infoset – Create – enter name of Infoset -  Data source -- >  Table join by basis table – give name of table e.g  pa0000 -  Enter -  Click on insert table if we  want to include more tables – give name of table one by one and after finishing,  place cursor on the joining lines and right click to delete unwanted relationships  - check  - and go back  - field groups  -  include all table fields  - click on generate button   -  go out
    TC SQ03  -  Select user group  -   eg.  Payroll
    Infoset  - Enter name of newly created Infoset 
    Assign users and Infosets  -  Assign infosets  -  put tick on payroll  - save and go back
    TC  PAAH  -  Expand the nodes and put tick on relevant fields depending upon necessity
    Save the query  by giving the same name as infoset for easyness..
    For executing a query which is already created
    1. Go to SQ01 transaction
    2. Go to Environment menu->query areas->std areas
    3. Then choose the user group where the query is created
    4. It will display all the queries created for the group.choose the query you want to executeand click execute.
    5. will take to the initial screen
    6. Enter the required parameters and execute
    Regards
    Ranga
    Message was edited by:
            Ranganathan Srinivasamurthy

  • SAP Query for Appriasal Report

    Hello Experts,
    Can we use SAP Query (SQ03, SQ02, SQ01) based on Appriasal tables ( HRHAP*) to fetch records similar to tcode phap_search_pa?
    I tried building an infoset making a direct read of table HRHAP and then joining tables like - HRHAP_T, HRHAP_APPEE, HRHAP_APPER, HRHAP_OTHERS and HRHAP_ACT_LOG.
    Finally, created a query based on this infoset, however, it does not retreive any results. Seems, it requires more details as app templates...
    Can anyone give inputs on this?
    Regards,
    Sarvesh Hasija

    Hi Sarvesh
    SAP Query may not work here. Because more than often, the data available in PHAP tables need to be first brought into temporary tables using a match condition and then shown on screen. There are a lot of sub queries required between PHAP and HRPnnnn tables to see some meaningful results. Imagine how many Table joins the End User needs to do.
    SAP Query are ideal if we are pooling data from one or two tables using a match condition. I am not dening that InfoSet is not possible. Getting desired output from such InfoSet will be challenging.
    You mentioned you supplied Doc ID/Number to PHAP_Search_PA, which is incorrect. It is a report which works on Template not Document. I hope you know the difference between Template and Document in PMS/OSA. I cannot stress enough on how much important is PHAP_Search_PA. What this standard report can do, custom designed report will take huge time to get close to it.
    I am sorry, I am also going to recommend Z Reports in case desired output is not possible in PHAP_Search_PA. In one of my recent assignments we had "Trainer's Feedback Report for any training programme/programmes between any two dates" requirement, and we opted for a Z Report.
    Regards
    Yash

  • Assign Report Category to a SAP Query for PNP LDB

    Hello Folks,
    How to Assign a Report Category to a SAP Query which is using LDB PNP.
    Regards,
    Nishanth Kumar

    Hi,
    SE38 -> Report name -> attributes ->  HR Report category
    Regards,
    Dilek

Maybe you are looking for

  • Hard drive failed.  Several questions.  Please help. :)

    Okay, so my hard drive suddenly disappeared. When I restarted via DVD, the hard drive clicked repeatedly. My hard drive is dead. RIP. I got my PB in June '04. It's a 1.5ghz. I got the three-year CompUSA warranty. So I drove my PB the 120 miles to the

  • Using Itunes with multiple hard drives

    I'm a new mac user and have a 250GB external hard drive with two FAT partitions. They appear as two individual drives to my MAC. Each partition has a lot of music. Its more that one of the partitions can hold. I can access and play songs in itunes by

  • Exploded directory format in an EAR

              I have a problem wrapping up an exploded directory format application into an ear           file running weblogic 6.0sp2 on winnt 4. One of the things I would like to do           is load a config file from a helper class without specifying

  • Transport planning Book to Q

    Hi Gurus,          I wanted to know how we transport all the planning area and planning book from Development system to Quality system? Do we need to rebuild all of them in quantity or anyother way? Thanks for your answers and please let me know Rega

  • User defined routines in lsmw

    hi all, Can anyone explain the significance of user defined routines in lswm. In which scenario we use user defined routines. Can anyone explain userdefined routines with an example. thanxs hari