Aging Query show Previous Bucket

Hi All,
Working ERP Version 11.5.10.2
I need some help, in my query to show previous bucket from as of date.
please see the below query
select TRX_NUMBER,salesper_name, customer_name, customer_number,amount_due_original,
amount_due_remaining,gl_date,amount_remaining, SALESREP_ID , due_date,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) < 1 THEN amount_remaining ELSE 0 END ) current_buck,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) BETWEEN 1 AND 30 THEN amount_remaining ELSE 0 END ) buck1,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) BETWEEN 31 AND 60 THEN amount_remaining ELSE 0 END ) buck2,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) BETWEEN 61 AND 90 THEN amount_remaining ELSE 0 END ) buck3,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) BETWEEN 91 AND 180 THEN amount_remaining ELSE 0 END ) buck4,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) BETWEEN 181 AND 270 THEN amount_remaining ELSE 0 END ) buck6,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) BETWEEN 271 AND 360 THEN amount_remaining ELSE 0 END ) buck5,
SUM( CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)-due_date,0) >= 361 THEN amount_remaining ELSE 0 END ) buck7
from (SELECT aps.TRX_NUMBER, rs.NAME salesper_name,
ac.customer_name, ac.customer_number, aps.amount_due_original,
aps.amount_due_remaining, aps.gl_date,
--SUM (  aps.amount_due_remaining
SUM (decode(aps.invoice_currency_code,'SAR',aps.amount_due_remaining,(aps.amount_due_remaining*aps.exchange_rate))
+ (SELECT nvl(SUM (NVL (arav.AMOUNT_APPLIED, 0)),0)
FROM ar_receivable_applications_v arav
WHERE arav.GL_DATE > nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),sysdate)
AND arav.TRX_NUMBER= aps.TRX_NUMBER
AND aps.CLASS = 'INV'
AND arav.CUSTOMER_ID= aps.CUSTOMER_ID
+ (select nvl(SUM (NVL (acma.AMOUNT_APPLIED_BASE , 0)),0) from ARBV_CREDIT_MEMO_APPLICATIONS acma, ra_customer_trx_partial_v rctpv1
where acma.APPLIED_PAYMENT_SCHEDULE_ID=aps.PAYMENT_SCHEDULE_ID
and rctpv1.CUSTOMER_TRX_ID=acma.CUSTOMER_TRX_ID
and rctpv1.GD_GL_DATE > nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),sysdate) )
+(select nvl(SUM(adj.amount),0) -- for manuval credit note
from ar_app_adj_v adj , ra_customer_trx_all rac
where adj.customer_trx_id = aps.CUSTOMER_TRX_ID
and adj.GL_DATE > nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),sysdate)
and adj.ps_class in ('CM','DM')
and aps.customer_trx_id = rac.customer_trx_id
and rac.trx_number not in('706575','PO19793/INV#25013#1') )
+ (SELECT nvl(SUM (NVL (arav.amount_applied, 0))*-1,0)
FROM ar_receivable_applications_v arav
WHERE arav.GL_DATE > TO_DATE (:p_to_date, 'RRRR/MM/DD HH24:MI:SS')
AND arav.CUSTOMER_ID =aps.CUSTOMER_ID
AND arav.CASH_RECEIPT_ID =aps.CASH_RECEIPT_ID
AND arav.RECEIPT_NUMBER=aps.TRX_NUMBER
AND aps.CLASS = 'PMT'
AND aps.GL_DATE_CLOSED > TO_DATE (:p_to_date, 'RRRR/MM/DD HH24:MI:SS')
)) amount_remaining
,RS.SALESREP_ID
,aps.due_date
FROM ar_payment_schedules aps, ra_customers ac,
ar_lookups look,
ar_lookups look_status,
hz_cust_accounts cust,
hz_parties party,
hz_cust_site_uses site_uses,
hz_cust_acct_sites acct_site,
hz_party_sites party_site,
hz_locations loc,
ra_salesreps rs
WHERE aps.gl_date <=
NVL (TO_DATE (:p_to_date, 'RRRR/MM/DD HH24:MI:SS'), SYSDATE)
AND cust.cust_account_id = acct_site.cust_account_id
AND cust.party_id = party.party_id
AND acct_site.party_site_id = party_site.party_site_id(+)
AND loc.location_id(+) = party_site.location_id
AND acct_site.cust_acct_site_id = site_uses.cust_acct_site_id(+)
AND look.lookup_type(+) = 'SITE_USE_CODE'
AND look.lookup_code(+) = site_uses.site_use_code
AND look_status.lookup_type(+) = 'CODE_STATUS'
AND look_status.lookup_code(+) = NVL (cust.status, 'A')
AND SUBSTRB (look.meaning, 1, 8)= 'Bill To'
AND site_uses.PRIMARY_SALESREP_ID=rs.SALESREP_ID
AND rs.NAME = nvl(:p_sale_per,rs.NAME)
AND ac.CUSTOMER_NUMBER=cust.ACCOUNT_NUMBER
AND aps.CUSTOMER_ID=ac.CUSTOMER_ID
AND aps.CUSTOMER_SITE_USE_ID=site_uses.SITE_USE_ID
GROUP BY rs.NAME,ac.customer_name,
ac.customer_number,
aps.amount_due_original,
aps.amount_due_remaining,
aps.gl_date,
aps.trx_number
,rs.SALESREP_ID , aps.due_date
ORDER BY rs.NAME)
group by TRX_NUMBER, salesper_name,customer_name, customer_number,amount_due_original,
amount_due_remaining,gl_date,amount_remaining, SALESREP_ID, due_date
Regards

Maybe
select TRX_NUMBER,salesper_name,customer_name,customer_number,amount_due_original,
       amount_due_remaining,gl_date,amount_remaining,SALESREP_ID,due_date,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) < -30
                THEN amount_remaining
                ELSE 0
           END) previous_buck,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 0 AND -30
                THEN amount_remaining
                ELSE 0
           END) current_buck,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 1 AND 30
                THEN amount_remaining
                ELSE 0
           END) buck1,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 31 AND 60
                THEN amount_remaining
                ELSE 0
           END) buck2,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 61 AND 90
                THEN amount_remaining
                ELSE 0
           END) buck3,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 91 AND 180
                THEN amount_remaining
                ELSE 0
           END) buck4,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 181 AND 270
                THEN amount_remaining
                ELSE 0
           END) buck6,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) BETWEEN 271 AND 360
                THEN amount_remaining
                ELSE 0
           END) buck5,
       SUM(CASE WHEN ROUND(nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),SYSDATE) - due_date,0) >= 361
                THEN amount_remaining
                ELSE 0
           END) buck7
  from (SELECT aps.TRX_NUMBER,rs.NAME salesper_name,ac.customer_name, ac.customer_number, aps.amount_due_original,
               aps.amount_due_remaining, aps.gl_date,
               SUM(decode(aps.invoice_currency_code,'SAR',aps.amount_due_remaining,(aps.amount_due_remaining * aps.exchange_rate)) +
                   (SELECT nvl(SUM(NVL(arav.AMOUNT_APPLIED,0)),0)
                      FROM ar_receivable_applications_v arav
                     WHERE arav.GL_DATE > nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),sysdate)
                       AND arav.TRX_NUMBER = aps.TRX_NUMBER
                       AND aps.CLASS = 'INV'
                       AND arav.CUSTOMER_ID = aps.CUSTOMER_ID
                   ) +
                   (select nvl(SUM(NVL(acma.AMOUNT_APPLIED_BASE,0)),0)
                      from ARBV_CREDIT_MEMO_APPLICATIONS acma,
                           ra_customer_trx_partial_v rctpv1
                     where acma.APPLIED_PAYMENT_SCHEDULE_ID=aps.PAYMENT_SCHEDULE_ID
                       and rctpv1.CUSTOMER_TRX_ID = acma.CUSTOMER_TRX_ID
                       and rctpv1.GD_GL_DATE > nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),sysdate)
                   ) +
                   (select nvl(SUM(adj.amount),0) -- for manuval credit note
                      from ar_app_adj_v adj,
                           ra_customer_trx_all rac
                     where adj.customer_trx_id = aps.CUSTOMER_TRX_ID
                       and adj.GL_DATE > nvl(to_date(:P_TO_DATE,'RRRR/MM/DD HH24:MI:SS'),sysdate)
                       and adj.ps_class in ('CM','DM')
                       and aps.customer_trx_id = rac.customer_trx_id
                       and rac.trx_number not in('706575','PO19793/INV#25013#1')
                   ) +
                   (SELECT nvl(SUM(NVL(arav.amount_applied, 0))*-1,0)
                      FROM ar_receivable_applications_v arav
                     WHERE arav.GL_DATE > TO_DATE(:p_to_date,'RRRR/MM/DD HH24:MI:SS')
                       AND arav.CUSTOMER_ID = aps.CUSTOMER_ID
                       AND arav.CASH_RECEIPT_ID = aps.CASH_RECEIPT_ID
                       AND arav.RECEIPT_NUMBER = aps.TRX_NUMBER
                       AND aps.CLASS = 'PMT'
                       AND aps.GL_DATE_CLOSED > TO_DATE(:p_to_date,'RRRR/MM/DD HH24:MI:SS')
                  ) amount_remaining,
                  RS.SALESREP_ID,
                  aps.due_date
             FROM ar_payment_schedules aps,
                  ra_customers ac,
                  ar_lookups look,
                  ar_lookups look_status,
                  hz_cust_accounts cust,
                  hz_parties party,
                  hz_cust_site_uses site_uses,
                  hz_cust_acct_sites acct_site,
                  hz_party_sites party_site,
                  hz_locations loc,
                  ra_salesreps rs
            WHERE aps.gl_date <= NVL(TO_DATE(:p_to_date,'RRRR/MM/DD HH24:MI:SS'),SYSDATE)
              AND cust.cust_account_id = acct_site.cust_account_id
              AND cust.party_id = party.party_id
              AND acct_site.party_site_id = party_site.party_site_id(+)
              AND loc.location_id(+) = party_site.location_id
              AND acct_site.cust_acct_site_id = site_uses.cust_acct_site_id(+)
              AND look.lookup_type(+) = 'SITE_USE_CODE'
              AND look.lookup_code(+) = site_uses.site_use_code
              AND look_status.lookup_type(+) = 'CODE_STATUS'
              AND look_status.lookup_code(+) = NVL (cust.status, 'A')
              AND SUBSTRB (look.meaning, 1, 8)= 'Bill To'
              AND site_uses.PRIMARY_SALESREP_ID=rs.SALESREP_ID
              AND rs.NAME = nvl(:p_sale_per,rs.NAME)
              AND ac.CUSTOMER_NUMBER=cust.ACCOUNT_NUMBER
              AND aps.CUSTOMER_ID=ac.CUSTOMER_ID
              AND aps.CUSTOMER_SITE_USE_ID=site_uses.SITE_USE_ID
            GROUP BY rs.NAME,ac.customer_name,ac.customer_number,aps.amount_due_original,aps.amount_due_remaining,
                     aps.gl_date,aps.trx_number,rs.SALESREP_ID,aps.due_date
            ORDER BY rs.NAME
group by TRX_NUMBER,salesper_name,customer_name,customer_number,amount_due_original,
          amount_due_remaining,gl_date,amount_remaining,SALESREP_ID,due_dateRegards
Etbin

Similar Messages

  • Customer aging query - show balance as of a specific date

    I am working on a query for a vendor aging to show information that is not available in the vendor aging report. However, I want to show the balance that was open at a specific point in time. i.e. today is Aug 17 and i want to show what was due at June 30. All the June invoices have been paid as of Aug 17 so i cannot use docstatus. The aging report gives you the option to select Vendors with a zero balance and reconciled transactions. How do i show that information in a query?

    Hi Vicki,
    I'm trying to do the exact same thing. Get the aging balance at any point in time in verion 2007.
    Have you succeded so far?.
    I use to run a query to get the balance at any point in 2005 like this..
    SELECT     T2.CardCode, T2.CardName , T0.[BatchNum], T0.[TransId], T0.[TransType], T1.[CreatedBy], T1.[RefDate], T1.[DueDate], T1.[MthDate],
    T1.[LineMemo], T0.[Ref1], T1.[BaseRef], T1.[Credit], T1.[Debit], T1.[FCCredit], T1.[FCDebit], T1.[SYSCred],
    T1.[SYSDeb], T1.[SourceLine], T1.[Ref1], T1.[LineType], T1.[TaxDate], T1.[Account], T1.FCCurrency, T1.[ObjType]
    FROM     [dbo].[OJDT] T0
    INNER     JOIN [dbo].[JDT1] T1 ON T1.[TransId] = T0.TransId
    INNER     JOIN [dbo].[OCRD] T2 ON T1.[ShortName] = T2.CardCode
    WHERE     T1.[Account] IN (SELECT AcctCode FROM oact WHERE LocManTran = 'Y' AND GroupMask = 1)
    AND      T1.[RefDate] <= '20091026'
    AND      (T1.[MthDate] > '20091026'
    OR      T1.[IntrnMatch] = 0 )
    ORDER BY T0.[TransType], T1.[RefDate], T2.CardCode, T1.DueDate
    But this baby shows more documents than needed and a lot of work has to be done to place payments on the right invoices to como up with the right balance age.
    I'd appreciate if you could help me out or let me know what have you found so far.
    Best,
    Ricardo Sada

  • 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

  • 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.

  • 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

  • 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

  • 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

  • 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

  • To show previous 12 months from current month.

    I have one column Time.Month (Char column) with values in the format 2011 / 09. In my report i want to show previous 12 months from the current month. I dont have any date prompts in my report. Pls help.

    Use the below query in init block to create a repository variable as PREVIOUS_12_MONTH
    SELECT PRV.PER_NAME_MONTH FROM VALUEOF(OLAPTBO).W_DAY_D PRV , VALUEOF(OLAPTBO).W_DAY_D CUR WHERE convert(char(12),PRV.DAY_DT)=convert(char(12),CUR.YEAR_AGO_DT) AND convert(char(12),CUR.DAY_DT)=convert(char(12),getdate()-valueof(time_offset))
    Variable PREVIOUS_MONTH: Use the below query in init block
    SELECT PRV.PER_NAME_MONTH FROM VALUEOF(OLAPTBO).W_DAY_D PRV , VALUEOF(OLAPTBO).W_DAY_D CUR WHERE convert(char(12),PRV.DAY_DT)=convert(char(12),CUR.MONTH_AGO_DT) AND convert(char(12),CUR.DAY_DT)=convert(char(12),getdate()-valueof(time_offset))
    Create a filter in Answers as below and use where ever you wish:
    Month is between PREVIOUS_12_MONTH and PREVIOUS_MONTH
    Use it in the report with current month Or previous month as per your requirements.
    Pls mark if helps

  • Show previous requisition requests link is missing in MSS.

    Hi All,
    In Manager Self-Service ->Recruiting->New Requisition Request->Request to fill postion. Here link show previous requisition requests missing.
    How to enable the link? This link is missed after portal is upgraded.
    Regards,
    Srinivasu.Y

    Hi,
    FPM is used to link in ivew.
    Thanks,
    Srinivasu.Y

  • 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

  • How To Make Search Query Showing the Result As List of Buttons.

    Can some one give me an idea how to start to make a Search Query showing the results as list of buttons.. i have already have my buttons with names. i just dont know how to make a search query.
    this is my on screen keyboard i made..
    im making a system that the result were a list of buttons.. showing like this
    This was supposed to be the output of the query that i need to do..
    Please help me.. i just need a idea or tips how to make this one.

    Here is code I posted recently for another question
    Public Class Form1
    Const BUTTON_SIZE As Integer = 20
    Const SPACE As Integer = 5
    Sub New()
    ' This call is required by the Windows Form Designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
    Dim buttons As New List(Of List(Of MyRadioButton))
    For row = 1 To 6
    Dim newRow As New List(Of MyRadioButton)
    buttons.Add(newRow)
    For col = 1 To 6
    Dim button As New MyRadioButton()
    button.row = row
    button.col = col
    button.Height = BUTTON_SIZE
    button.Width = BUTTON_SIZE
    button.Left = col * (BUTTON_SIZE + SPACE)
    button.Top = row * (BUTTON_SIZE + SPACE)
    button.Name = String.Format("radGr1{0}_{1}", row.ToString(), col.ToString())
    Me.Controls.Add(button)
    newRow.Add(button)
    AddHandler button.CheckedChanged, AddressOf Radio_Change
    Next col
    Next row
    End Sub
    Private Sub Radio_Change(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim button As MyRadioButton = CType(sender, MyRadioButton)
    Dim row As Integer = button.row
    Dim col As Integer = button.col
    End Sub
    End Class
    Public Class MyRadioButton
    Inherits RadioButton
    Public row As Integer
    Public col As Integer
    End Class
    jdweng

  • Query for Previous Period Accumulated Dep

    Can someone suggest me the best way to query the previous period accumulated depreciation for an asset.
    I am facing with every way I have tried.
    1st Way = Current Accumulated - Current Month Deprn (FA_DEPRN_SUMMARY). But in case of retired assets, the Current Accumulated becomes 0. So, this wudnt be a correct value to display.
    2nd Way = Going back one period and taking the Accumulated Depreciation value. This is very problematic in queries. I got error for some dumb scenario I didnt test in the query. Apparently if there are more than 2 rows in FA_DEPRN_DETAIL, then 2 records will return instead of one.
    Can someone help me out.
    Regards

    Hi,
    Check why the amounts in accum dep is calculating less amounts?
    If your dep key and dep rates are correct, then there is no problem with the dep calculations.
    Still if you feel that, a particular asset is to be depreciated more than the planned dep, you must perform a unplanned dep postings with Tcode ABAA
    Before doing this you must have been done the config for the unplanned dep via the below tcodes.
    OABU, and AO95.
    Then try to post run planned dep with ABAA now, since this will only create an internal asset accounting document for the date 31.03.2009.
    So if you run the dep run for the 12 period (if you follow apr-mar) with repeat option and by selecting list assets and execute it.
    Here you see an separate dep doc will be generated for unplanned dep for your asset.
    hope this might help you.
    Thanks,
    Srinu

  • Hi, I have an iMac (24-inch Mid 2007) that hangs especially when browsing in safari, and letters typed take ages to show. I have done all the usual things with disk doctor etc. One thing I have noticed is that if I log in as a guest the computer work

    Hi my iMac hangs when browsing and letters typed from my key board take ages to show and the ability to scroll in safari is difficult almost non existent. However when I log in as a Guest my computer acts fine. I have cleaned caches verified disk etc to no avail.
    Les

    Hi my iMac hangs when browsing and letters typed from my key board take ages to show and the ability to scroll in safari is difficult almost non existent. However when I log in as a Guest my computer acts fine. I have cleaned caches verified disk etc to no avail.
    Les

  • Lightroom 5 is not showing previous sucessfuly imported images and images are not identified as missing, there are no images shown in the library, how do  I reconnect missing images?

    lightroom 5 is not showing previous successfully imported images and images are not identified as missing, there are no images shown in the library, how do  I reconnect missing images?

    If the images are not identified as missing ... then you can't reconnect them
    But I'm not really sure what is happening, as I don't understand your description of the problem, could you show us a screen capture? Or describe what appears on your screen in much more detail...

Maybe you are looking for

  • Late 2011 macbook pro running slow

    Hi my macbook has been running pretty sluggish lately. I haven't upgraded anything since I've purchased it. Any thoughts? I just ran an EtreCheck a few minutes hoping it helps. Thanks in advance! EtreCheck version: 2.1.5 (108) Report generated Januar

  • BLOB column in separate tablespace in 9i?

    Should a BLOB column go in a separate tablespace in Oracle 9i? And if so, then how to do it?

  • ORA-01722  Invalid Number while executing the Query

    Hi Friends,  need your valuable suggestions. We have a DSO with a   characteristic info object  ZDAT (DATA TYPE DATS)  with a reference from 0DATE. I am able to see the data of the info object ZDAT using LIST CUBE on the DSO. While using this info ob

  • What is this red dot? How can i solve it?

    Hi, I can not run it, because there are red dots. I know, it means the signal from DAQ  and the constans 500 are not same type, but i have to Multiply the analog voltage signal from daq. How can I solve it, how can i multiply the analog signal from d

  • ORACLE SGA size

    We bought a server for oracle data warehousing which has got 200GB RAM. Can I set set my SGA_TARGET to 100GB. Is it true the more SGA size result in better performance. Thaks jeevan