How to create ageing query?

Hi Folks,
Could you give me an idea how to create an AGEING query  by below requirement ?
Purpose is to calculate the Ageing, which can be defined as the difference between the Document Date and the current date.
As the current date is not practical (the AR gets updated once a month, and financial ageing reports usually report compared with end-of-the-month), I propose the
u2018Last working day of previous month.
When this interval is created per document the total revenue should be divided into columns based on the ageing:
1-30 days
31-60 days
61-90 days
91-120 days
121-360 days
>360 days.
Reporting Fields  are :
Rows & Columns
Company code
SAP ID
Customer name
Country
City
Address
Postal code
Total AR
Current
1-30
31-60
61-90
91-120
>120
>360
Appreciate your response on this.  Thanks  : Surendra

Hi,
In this  you follow th ebelow steps easy
Go To Create CK F menu-----
Craete  one Formual Variable on Document Date  with replacement path as 0document posted date
one more variable Formula Variable with customer exit  on cal cal day
for that getting the current date  write below code
WHEN 'ZCDATE'.
CLEAR: L_S_RANGE.
L_S_RANGE-LOW = SY-DATUM.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPENDL_S_RANGETO E_T_RANGE.
ENDCASE.
when you are creating varaible there is tab in that ( last tab) currency/unit  here you should mention date.
now use these two formula varaibles Current date formula variable- document date formula varaible
now uare getting the days
based on your requirement
use that
same Ckf
one ckf cuurent datevariable -posting datevariable  >30( it gives 0-30)
in next Ckf current adte - posting date >30<60
like that you can create as you like.
Thansk & Regarsd,
sathish

Similar Messages

  • How to create a query to see Opening stock and closing stock as on particul

    Hi All,
    How to create a query to see Opening stock and closing stock as on particul.
    Regards
    Albaik

    Hi,
    In BI 0IC_C03 will provide u the  required information and also having standard queries provided by the SAP.
    Plz find the list of Queries provided by the SAP.
    =======================================================================================================
    Inventory turnover      0IC_C01_Q0001
    Range of coverage - quantity      0IC_C01_Q0002
    Range of Coverage - Value      0IC_C01_Q0003
    Range of coverage of finished goods - quantity      0IC_C01_Q0004
    Range of Coverage of Finished Goods - Value      0IC_C01_Q0005
    Range of coverage of raw materials - quantity      0IC_C01_Q0006
    Range of Coverage of Raw Materials - Value      0IC_C01_Q0007
    Obsolete Stock on Hand      0IC_C01_Q0008
    Period-dependent requirement coverage      0IC_C01_Q0009
    Value of stock on hand      0IC_C01_Q0010
    Quantity of stock on hand      0IC_C01_Q0011
    Material consumption      0IC_C01_Q0012
    Material Movements      0IC_C01_Q0013
    Consignment stock: receipts and issues      0IC_C01_Q0014
    Valuated stock: receipts and issues      0IC_C01_Q0015
    Material stock and movements      0IC_C01_Q0016
    Material Movements (Healthcare)      0IC_C01_Q0020
    Material Consumption (Healthcare)      0IC_C01_Q0021
    Material Availability      0IC_C01_Q0022
    Inventory Turnover Frequency (Value)      0IC_C01_Q0023
    Consignment Stock Received and Issued per Unit      0IC_C01_Q0024
    Material Consumption (Quantity)      0IC_C02_Q0001
    Valuated Stock Receipts and Issues (Quantity)      0IC_C02_Q0002
    Range of Valuated Stock (Quantity)      0IC_C02_Q0003
    Inventory Turnover      0IC_C02_Q0004
    Receipt and Issue Consignment Stock at Customer      0IC_C03_Q0001
    Receipt and Issue Quality Inspection Stock      0IC_C03_Q0002
    Vendor Consignment Stock Receipt and Issue      0IC_C03_Q0003
    Receipt and Issue Stock in Transit      0IC_C03_Q0004
    Receipt and Issue of Blocked Stock      0IC_C03_Q0005
    Valuated Stock      0IC_C03_Q0006
    Stock in Quality Inspection      0IC_C03_Q0007
    Stock in Transit      0IC_C03_Q0008
    Blocked Stock      0IC_C03_Q0009
    Vendor Consignment Stock      0IC_C03_Q0010
    Consignment Stock at Customer      0IC_C03_Q0011
    Stock Overview      0IC_C03_Q0012
    Stock Overview (as of 3.1 Content)      0IC_C03_Q0013
    Quantities of Valuated Project Stock (as of 3.1 Content)      0IC_C03_Q0014
    Valuated Stock (as of 3.1 Content)      0IC_C03_Q0015
    Quantities of Valuated Sales Order Stock (as of 2.1 Cont.)      0IC_C03_Q0016
    Inventory Turnover      0IC_C03_Q0017
    Days' Supply      0IC_C03_Q0018
    SUS: Vendor Consignment Stock      0IC_C03_Q0019
    Scrap      0IC_C03_Q0020
    Inventory Aging      0IC_C03_Q0021
    Stock Overview - extended      0IC_C03_Q0022
    Demand Supply Match      0IC_C03_Q0023
    Warehouse Stock Analytics – Inventory Turnover      0IC_C03_Q0024
    Warehouse Analytics - Obsolescence and Variance      0IC_C03_Q0025
    Stock Overview: Materials      0IC_C03_Q0030
    Average Stock Value Over Time      0IC_C03_Q0031
    Stock Overview Over Time      0IC_C03_Q0032
    Range of Coverage Over Time      0IC_C03_Q0033
    ==================================================================================================
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Jan 18, 2010 8:06 AM

  • How to create a query view in sap bw?

    can any one please tell me how to create a query view in sap bw 3.5?

    Hi,
    you can do this by using Bex analyzer and WAD ..
    gop through this link ..
    http://help.sap.com/saphelp_nw70/helpdata/en/0e/1339427f82b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
    hope this helps you ..
    Reagrds,
    shikha

  • How to create sap query with "or" relationship

    dear experts,
    I need a report to display the employee whoese WSR is
    changed in the month for infotype 0007.
    that is ,we want to search with selection
    begda OR endda between 2008-01-01 and 2008-01-31.
    how to create sap query with "or" relationship?

    hi use like this,
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 =  p_pernr
        infty                   =  '0007'
       BEGDA                =  p_date1
       ENDDA                 = p_date2
      TABLES
        infty_tab             = itab .
    hi use this by passing the pernr to fm and giving the dates low and high in the p_date1 and p_date2.
    loop at itab where condition.
    endloop.
    may it helps u,
    regards,
    venkat.

  • How to create sap query

    how to create sap query if any one has the documentation pls foward to this mail id [email protected]
    thanks
    avinash

    check these links...
    http://www.sap-basis-abap.com/sapquery.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    http://help.sap.com/saphelp_nw04/helpdata/en/25/8f4dd72b0f9f4fa6712fcf2f65f505/frameset.htm

  • How to create quick query region?

    Hi,
    How to create quick query region?
    I have got some tip from OAF developer guild:
    OAPageLayoutBean pageLayout = pageContext.getPageLayout();
    pageLayout.setQuickSearch(quickSearchRN);
    But I don't know how to create 'quickSearchRN'.
    So, I try to create a stacklayout region as quickSearchRN, and add it into pageLayout.
    But there are two stacklayout region displayed. One in qucik query region, other in main region.
    please give me some sample code.

    OAFlowLayoutBean quickQueryRN = (OAFlowLayoutBean)createWebBean
    (pageContext,OAWebBeanConstants.FLOW_LAYOUT_BEAN, null, "QuickQueryRN");
    OAMessageTextInputBean condition = (OAMessageTextInputBean)createWebBean
    (pageContext,OAWebBeanConstants.MESSAGE_TEXT_INPUT_BEAN, null, "condition");
    condition.setPrompt("Name");
    quickQueryRN.addIndexedChild(condition);
    pageLayout.setQuickSearch(quickQueryRN);

  • How we create abap query

    how we create abap query can any1 tell me?

    Reporting tool :Standard reports
    Purpose :Provide solutions for your most frequent reporting requirements
    Advantages :Can be used immediately
    No developments required
    Limitations :Limited flexibility
    Output fields cannot be selected as required
    HIS
    Purpose :Hierarchies are displayed as graphics
    Reports are executed using selected structures or substructures, that is, using preselected sets of objects
    Advantages :User-friendly method of displaying hierarchical structures
    Integration with InfoSet Query and standard reports
    No need to switch from one HR application to another if you want to execute reports from different applications
    Little training required
    Limitations : Limited flexibility
    Tool is used to execute standard reports and customer reports
    It cannot be used to create reports
    InfoSet Query
    Purpose :Intuitive, general SAP reporting tool used to create customer reports
    Enables you to create reports for all areas of HR
    When InfoSet Query is accessed from Human Resources (HR), the Query area and User group parameters already contain values and you can only perform ad hoc reporting. If InfoSet Query is accessed this way, it is called Ad Hoc Query in HR (see HR in InfoSet Query).
    Advantages :User-friendly interface
    Very easy to use
    No programming required
    If integrated with SAP Query, you can continue processing queries using SAP Query
    Set operations enable you to create sets of objects as required for which data must be output
    Can be included in roles using a suitable InfoSet
    Limitations :InfoSets and user groups must be defined in SAP Query before you can use InfoSet Query
    Multiline lists cannot be displayed
    SAP Query
    Purpose :General SAP reporting tool used to create customer reports
    Individual definition of user groups, InfoSets, and queries
    Advantages :Extremely flexible
    No programming required
    Queries can be provided in the SAP Easy Access menu
    Includes numerous options for aggregating data, performing calculations, and displaying graphics
    Enables you to display multiline lists
    Enables you to define one basic list and several statistics and ranked lists for each query
    Limitations :Restricted to data from the R/3 System
    Each HR query can process data from just one HR logical database:
    PNP: Administration, Time Management, and Payroll
    PCH: Generally for all areas, but particularly suitable for reporting on data from Personnel Planning
    PAP: Recruitment
    Requires much more training than other options
    Limitations:Data is extracted from OLTP systems, that is, real-time data is not accessed
    Business Information Warehouse
    Purpose :Analytical reporting tool used for information and decision-making purposes
    Advantages : Extremely flexible
    Facilitates complex calculations (calculation of averages, time series comparisons)
    Enables you to access non-SAP data
    Easy to use
    Uses OLAP technology
    Includes detailed Business Content (HR extractors, InfoCubes, key figures, and standard queries
    i think it is adhoc query not abap query

  • How to create sql query for item master with operator LIKE with variables?

    hi all,
    How to create sql query for item master with
    operator LIKE(Contains,Start With,End With) with variables using query generator in SAP B1 ?
    Jeyakanthan

    Hi Jeyakanthan,
    here is an example (put the like statement into the where field)
    SELECT T0.CardCode, T0.CardName FROM OITM T0 WHERE T0.CardName Like '%%test%%'
    The %% sign is a wildcard. If you need start with write 'test%%' and otherwise ends with '%%test'. For contains you need '%%test%%'. You also could combinate this statements like 'test%%abc%%'. This means starts with test and contains abc.
    Regards Steffen

  • How to create a Query iView based on user's parameter?

    Hello,
    I've created a Query iView which depends on a Costumize parameter that the user enters - On stage 5 of the wizard I've entered a customize parameter on a certain field and called it "user_param". The wizard entered the Query: WHERE... = {$user_param}. So far so good...
    My question is, after creating this iView, how Do I implement it at the Portal so the user will have a place to enter his parameter and receive the result?
    when opening the Query I don't see such place. According to SPA's documentation, the user should enter the parameter at the "personalize" menu. When I put this iView in a page and open the "Personalize" menu there is no such place.
    Which further configurations should I do in order it to work?

    If you open the iview, there should be a personalize property or setting for the URL parameter. Make sure that it is set to read/write. I just got off a portal project where I did a few of these, but I don't have access to one right now, so I can't give you the exact steps, but you should get the idea.
    Good luck,
    Tom \

  • How to create ageing report?

    Dear Experts,
    How to create following ageing report?
    Dispatch Vs Actual GRN during the period Jan-08 to Mar 08
    Ageing of Invoices to GRN Date (In-warding Date)
    Ageing--No of docsNet wt (Kg)
    Same or Next day -- 57----
    629.952
    2 to 30 days-- 98--
    755.411
    31 to 60 days--82--
    704.559
    61 to 90 days--94--
    738.709
    Here
    Dispatch (Posting /Invoice) Date; GRN (Goods Receipt Number) / In-warding Date; No. of Docs. are Characteristics & Net Weight is a Key Figure
    And Ageing = GRN Date u2013 Posting Date
    Thanks in advance!
    Nav

    HI,
    Create an variable or use the variable on Dispatch date
    and try to restrict the same Variable in the Key figure Net weight  with the Option Variable Offset
    Key figure  is same in the Columns for all 5 Key figure you are creating  with same variable and with Different off set
    Hope you can get it
    Regards
    Hari

  • How to create infoset query

    Hi,experts
    Can anybody give me documents on infoset query and step by step showing how to create infosetquery. I will really greatful to you all.
    Thanks
    Preeti

    Hi Preeti,
    1. You can query the data using 'Listcube' transaction.
    2. Instead of builing on tables, it sits on ODS (no need to worry about underlying tables).
    3. Visible on the Bex 'info area' as like other infoproviders.
    4. It generates additional key figure called 'Number of records' in the Bex. This will be useful for query.
    5. No additional ABAP can be used. But in RSQ02, you can use piece of ABAP.
    6. Queries created on data provider infoset can work like other queries including transport functionality.
    Hope helps.
    For more info check Re: Query on Infoset
    Bye
    Dinesh

  • How to create a query in 3.1i system?

    Hi,
    In transaction RSO2 in 3.1i system , we get two options -  Extraction from View and Extraction from Query.
    Could you please me How to create Query for Extraction?
    Is it by using SQ01? If so, could you please explain me the steps?
    Thanks in advance.
    Regards,
    Zehra

    Thanks for your help Frank.
    But when i display my query to be executed by the entityManager it is like that
    Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)
    Regards
    Lutchumaya

  • Help: How to create a query that transpose the column content?

    Here, suppose that I have two tables
    TAB_A:
    ID     TYPE
    1     AA
    1     AB
    1     AC
    2     BA
    2     BB
    2     BC
    2     BD
    I'd like to create a query that gives result as:
    ID     TYPE
    1     AA AB AC
    2     BA BB BC BD Any suggestions?
    Thank you in advance.
    Jimmy

    Hi
    Try this:
    SELECT id,
    replace(LTRIM(MAX(SYS_CONNECT_BY_PATH(type,'*'))
    KEEP (DENSE_RANK LAST ORDER BY curr),'*'),'*', ', ') AS type
    FROM (SELECT id, type,
    ROW_NUMBER() OVER (PARTITION BY id ORDER BY type) AS curr,
    ROW_NUMBER() OVER (PARTITION BY id ORDER BY type) -1 AS prev
    FROM tab_a)
    GROUP BY id
    CONNECT BY prev = PRIOR curr AND id = PRIOR id
    START WITH curr = 1;
    Ott Karesz
    http://www.trendo-kft.hu

  • Help: How to create a query like this?

    I am working on a report and I am facing on a question like this:
    TABLE TEST has two columns A and B
    A B
    2 INFO21
    2 INFO22
    3 INFO31
    3 INFO32
    3 INFO33
    I'd like to create a query which will return
    A INFO
    2 INFO21, INFO22
    3 INFO31, INFO32, INFO33
    Please help.
    Thank you in advance
    Jimmy

    A lot of pretty fine examples here:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    Rgds.

  • How to create a query in your session facade.

    Please help me
    My code is as follows
    public List<TrpSprojects> getProjectNotAssignedToUser(TrpSemployees employee) {
        List proassignements =  this.findProjectAssingmentForUser(employee);
        System.out.println("Size of project assignment list :"+proassignements.size());
        List projectIdAssigned = new ArrayList();
        String queryText  =  "Select o from Trp_Sprojects o where o.project_id not in (";
        for(Iterator proassign = proassignements.iterator();proassign.hasNext();)
            queryText = queryText+((TrpSprojectAssignment) proassign.next()).getTrpSprojects().getProjectId().toString()+",";
        System.out.println(queryText.substring(0,queryText.length()-1)+");");
       String querytoBeExecuted = queryText.substring(0,queryText.length()-1)+")";
        System.out.println("The query to be executed: "+ queryText);
         Query q = em.createNativeQuery(querytoBeExecuted, TrpSprojects.class);
         return q.getResultList();
        }In my session facade i have to create a query that will return the projects that have not been assigned to the user.
    When i display the queryText it is as follows:
    Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)when am executing the query i am getting exception ...
    Can anyone help me please . I have not defined this query in the TrpSprojects Class.
    Part of my exception its too long am only putting a part
    Feb 11, 2008 12:37:07 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "O": invalid identifier
    Error Code: 904
    Call:Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)
    Query:ReadAllQuery(org.trp.model.TrpSprojects); nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "O": invalid identifier
    Error Code: 904
    Call:Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)
    Query:ReadAllQuery(org.trp.model.TrpSprojects); nested exception is: oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "O": invalid identifier
    Error Code: 904
    Call:Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)
    Query:ReadAllQuery(org.trp.model.TrpSprojects); nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "O": invalid identifier
    Error Code: 904
    oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "O": invalid identifier
    Error Code: 904
    Call:Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)
    Query:ReadAllQuery(org.trp.model.TrpSprojects)
         at com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:346)
         at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:69)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at SCTimeReport_RemoteProxy_4p6ko7e.getProjectIdAssignedToUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)Regards
    Lutchumaya

    Thanks for your help Frank.
    But when i display my query to be executed by the entityManager it is like that
    Select o from Trp_Sprojects o where o.project_id not in (2,1,4,5,12,14,15,16,17,18,20,6,7,8,9,10,11,13,22,19,3,26,21,23)
    Regards
    Lutchumaya

Maybe you are looking for

  • Import settings for HDV for PAL

    I film on HDV tapes (1440x1080i) and I have asked both Apple store trainers and a Final Cut pro trainer and I am getting told different things for what settings to chose in easy set-up on Final Cut. I have chosen what I believed was the right setting

  • Can a flash website launch quicktime files?

    Hi I am not really familiar with what options are available for video but would appreciate some advice on what is achievable. Does the server always need to be enabled in some way to run any type of flash video, if so can flash launch quicktime files

  • How to manage multiple ipads and iphones on the same computer

    Any advice on how to manage multiple iphones (iPhone 4S, iPhone 4 & iPhone 3G) along with an iPad & iPad 2 on the same computer? Thank you

  • 11.2.4 Remote Control vs VNC

    I have a problem using the remote control with Zenworks (ZCM 11.2.4.0). Before Zenworks, we used VNC (3.3.9) for the remote control, but since the agent deployment many workstations are not accessible via ZCC. I noticed this on the workstations in qu

  • Dragging tabbed window leaves ghost?

    OK, this is really more of an annoyance, but it's odd, and I'm wondering if anyone else has noticed it. When I Cmd-open a window (to make it open in a new window, it goes to a tab. Normally this is fine, but if I'm sorting files from folder to folder