Prior month rate or data

Hi,
How can we access the prior month rate in the business rule table? If I use, say OPEAVG, it returns the AVG rate from the last month of the previous year. If I set the OPENING_PERIOD to -1 in the selected scenario, it doesn't seem to work.
Thanks,
Regis

Note that I created a member "PAVG" in the RATE dimension and had a logic to copy the prior month AVG into the current month PAVG. This logic works fine but when I use PAVG in the Business Rule table, it converts at rate 0. However if I use a different name, say LMAVG as member name instead of "PAVG", then it functions.
Somehow, "P" seems to be assimilated to the opening rate that corresponds to the average rate of the last month of the previous year.

Similar Messages

  • Want to schedule WebI report for End date of Prior Month

    Hello Experts,
    We have WebI report created on top of Bex Query, We have key date as prompt for the report. Can we schedule the webi report for key date as last date of prior month, so if current month is February, my key date should be Jan 30 2011. I am not sure if this is possible?
    Thanks,
    Ravi

    You need to apply two FM to get the end day of the month.
    First you need to apply FM MONTHS_PLUS_DETERMINE. This will give you the date after 3 months.
                CALL FUNCTION 'MONTH_PLUS_DETERMINE'
                  EXPORTING
                    MONTHS        = 3   " << for 3 months
                    OLDDATE       = l_start_Date   " << 12/01/2007
                 IMPORTING
                   NEWDATE       = l_3_Date. " << 02/01/2008
    Then call the FM RP_LAST_DAY_OF_MONTHS . this will give you the end date of the month
      CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in            = l_3_Date  " << 02/01/2008
        IMPORTING
          last_day_of_month = l_3_Date  " < 02/29/2008
        EXCEPTIONS
          day_in_no_date    = 1
          OTHERS            = 2.
    Call both FMs again to get your another date(after 4 months).
    Regards,
    Naimesh Patel

  • Rate Lookup of prior month

    Hi experts,
    for a modified FX calculation I need the scanned month value and the corresponding FX rate. This is well handled by the LOOKUP command of Script Logic. In addition I need the prior month value and the corresponding prior month FX rate. I want to plan to achieve this by a second LOOKUP run that has this time shift by -1 period (=prior month).
    How would I code this in the Script Logic ?
    Environment: BPC 5.1, SQL Server 2005
    Any help is appreciated. Thanx.
    Regards.
    Wolfgang

    Hi Nilanjan,
    thanks for the quick response. Sorry, I have not understood what you mean exctly. Let's asuume we have a standard Rate Lookup, like the following
    *LOOKUP RATE
    *DIM ENTITY2="DEFAULT"
    *DIM SOURCECURR:INPUTCURRENCY=ENTITY.CURR
    *DIM SOURCECURR:INPUTCURRENCY="USD"
    *DIM RATE=ACCOUNT.RATETYPE
    *ENDLOOKUP
    *WHEN ACCOUNT.someproperty
    *IS "currentmonth"
    *REC(FACTOR=LOOKUP(DESTCURR1)/LOOKUP(SOURCECURR),CURRENCY="USD")
    *IS "priormonth"
    //* here I need the prior month FX rate 
    *REC(FACTOR=LOOKUP(DESTCURR1)/LOOKUP(SOURCECURR),CURRENCY="USD")
    *ENDWHEN
    where exactly do i need to place the PRIOR statement for the prior month FX rate ?
    Thanks.
    Regards.
    Wolfgang

  • What authorities do I need to start a dispute with for Verizon charging for "Unbilled Data From Prior Months - GB "

    For the second month in a row, Verizon has added a $15.00 "data over usage" fee.  When I call customer service, I am told that the charge is for over usage of data from prior months in which they can't tell me what months we went over.  We've been Verizon customers for 10+ years & all of a sudden their customer service has severely declined.  I am always on Verizon's website looking at our usage and the past 6 month analysis to make sure we're staying within our range of usage and we've never gone over our allowed plan for data.  I plan to file a formal complaint/dispute with all of the consumer protection agencies and/or authorities but need to know which ones are for telecommunications issues for Georgia consumers.

    For a customer of 10 years to never read the customer agreement...:
    "HOW AND WHEN CAN I DISPUTE CHARGES?
    If you're a Postpay customer, you can dispute your bill within 180 days of receiving it, but unless otherwise provided by law or unless you're disputing charges because your wireless device was lost or stolen, you still have to pay all charges until the dispute is resolved. If you're a Prepaid customer, you can dispute a charge within 180 days of the date the disputed charge was incurred. YOU MAY CALL US TO DISPUTE CHARGES ON YOUR BILL OR ANY SERVICE(S) FOR WHICH YOU WERE BILLED, BUT IF YOU WISH TO PRESERVE YOUR RIGHT TO BRING AN ARBITRATION OR SMALL CLAIMS CASE REGARDING SUCH DISPUTE, YOU MUST WRITE TO US AT THE CUSTOMER SERVICE ADDRESS ON YOUR BILL, OR SEND US A COMPLETED NOTICE OF DISPUTE FORM (AVAILABLE AT VERIZONWIRELESS.COM), WITHIN THE 180–DAY PERIOD MENTIONED ABOVE. IF YOU DO NOT NOTIFY US IN WRITING OF SUCH DISPUTE WITHIN THE 180-DAY PERIOD, YOU WILL HAVE WAIVED YOUR RIGHT TO DISPUTE THE BILL OR SUCH SERVICE(S) AND TO BRING AN ARBITRATION OR SMALL CLAIMS CASE REGARDING ANY SUCH DISPUTE."
    SEE FULL AGGREEMENT HERE: Customer Agreement | Verizon Wireless

  • Overage Charge for prior month on first bill

    Got my first Verizon bill today and found something interesting.  I was charged for going over my data for the prior month to the tune of $15 for a gig.  Problem is, I've only had the phone for a month and there is no prior month on my account!
    Or at least there shouldn't have been.  Looks like my billing cycle started the day after I got the phone, so all the data from setting up my phone in store was overage.  This is crap.  Anyone else notice this?

    That one day of the prior billing cycle was prorated based on the data plan you selected and divided by the number of days in the billing cycle.

  • Find Prior Month Sales Per Salesman?

    I have salesmen throughout the country. Each salesman sells in a particular state. I want to total up each salesman's invoice sales for the prior month (I will also do this for: July 2010, %Difference between July 2011/July2010, YTD 2010, YTD2011, and percent difference between YTD2010 and YTD2011)
    The tables.fields I have are:
    ARSalesRep.Name
    ARInvoice.InvoiceDate
    ARInvoice.Invoicetotal
    ARInvoice.ShipToState
    How would I construct formulas for these?

    Hi, 
    A couple of ways you can do this: 
    1)  You can group on ARInvoice.ShipToState then on {ARSalesRep.Name}. 
    2)  Create 4 formulas and drop them into the Detail section: 
    YTD 2010
    If {ARInvoice.InvoiceDate} In [Date ((Year (Today) -1), 1, 1) to DateAdd (yyyy, -1, Today)] Then
         {ARInvoice.Invoicetotal}
    Else 0;
    YTD2011
    If {ARInvoice.InvoiceDate} In [Date ((Year (Today)), 1, 1) to Today] Then
         {ARInvoice.Invoicetotal}
    Else 0;
    July 2010
    If Year ({ARInvoice.InvoiceDate}) = (Year (Today) -1) And
         Month ({ARInvoice.InvoiceDate}) = Month (Today) Then
         {ARInvoice.Invoicetotal}
    Else 0;
    July 2011
    If {ARInvoice.InvoiceDate} In MonthToDate Then
         {ARInvoice.Invoicetotal}
    Else 0;
    3)  Right-click these fields and Insert Summary.  Drop the summarized fields into the  {ARSalesRep.Name} Group Footer.  You can hide the Detail section if you don't need to see it. 
    4)  Create a formula to calcuate the YTD difference using the summarized fields. 
    The other way would be to create a Crosstab report using the same formulas.  All depends on how you want to view your data. 
    Good luck,
    Brian

  • Financial Reporting: Current Month vs Prior Month Variance for all Entities

    Silly/Easy Question:
    How can I set up a grid in Hyperion Financial Reporting to show these columns for all entities- Current Month NIBT, Prior Month NIBT, Variance
    So, the report would look like:
    Florida Current Month, Florida Prior Month, Florida Variance...Georgia Current Month, Georgia Prior Month, Georgia Variance...Ohio Current Month, Ohio Prior Month, Ohio Variance
    All I can get it to do at present is:
    Florida Current Month, Georgia Current Month, Ohio Current Month, Florida Prior Month, Georgia Prior Month, Ohio Prior Month, etc.
    Thanks!
    Note: we have many entities, so hard coding them in the report is out.

    Update: been working with Oracle dev on this. Seems FRS cannot produce a report such as this:
    ----------Entity-----------------------------------------Entity-----------------------------------------Entity
    ----------Curr Mo - Prior Mo - Variance----------Curr Mo - Prior Mo - Variance----------Curr Mo - Prior Mo - Variance
    Account
    Account
    Account
    Account
    Account
    The data can be extracted in other layouts, but this is one we'd like to utilize for Balance Sheet Variance analysis and Tax ETR reports.

  • FOREX Valuation - Old Rates and New Month Rates

    Gurus,
    The client records data in USD @ 0.26875.
    The month-end / new month rate would be 0.26865.
    Q1. The documents that have been recorded previously, with old rate; is it possible to change the rate of those documents. If so, where and how?
    Q2. Needs steps for FOREX valuation - TCode - FAGL_FC_VAL
    Q3. FAGL_FC_TRANS; what is this transaction used for?
    Thanks.

    Steps: for tcode FAGL_FC_VAL
    1. Define Transalation Ratios for Currency Transactions
    Path: SAP Netweaver -General Setting -Currencies -Define Transalation Ratios for Currency Transalation
    2. Enter Exchange Rates
    Path:SAP Netweaver -General Setting -Currencies Enter Exchange Rates
    3. Foreign Currency Valuation Method
    Path: Financial Accounting (New)- General Ledger Accounting (New) - Periodic Processing - Valuate - Define Valuation Methods
    4. Define Valuation Areas
    Path: Financial Accounting (New)-General Ledger Accounting (New) - Periodic Processing - Valuate - Define Valuation Areas
    5. Define Accounts for Exchange Rate Differences
    Path: Financial Accounting (New)-- General Ledger Accounting (New) - Business Transactions - Open Item Clearing - Define Accounts for Exchange Rate Differences
    After above configuration run the T.C F.05 or FAGL_FC_VALfor valuation of currency
    Regards
    Hari Peddi

  • Current Year & Prior Month

    Hello experts.  I tried a bunch of things, but I can't seem to get it right.  I want to get the format of my date like this: yyMM
    and have MM be the prior month.
    So, for 03/06/2015, I'd like to get this '1502'
    How can I do that?
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    >>  I want to get the format of my date like this: yyMM .. So, for 03/06/2015, [gee, is that '2015-03-06' or '2015-06-03'?? ] I'd like to get this '1502' <<
    Why did you pick the worst possible local dialect for your display in the presentation layers? Google some articles on temporal data. This is more than SQL. 
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Something_Report_Periods
    (something_report_name CHAR(10) NOT NULL PRIMARY KEY
       CHECK (something_report_name LIKE <pattern>),
     something_report_start_date DATE NOT NULL,
     something_report_end_date DATE NOT NULL,
      CONSTRAINT date_ordering
        CHECK (something_report_start_date <= something_report_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Calc Status doesn't change on Prior Months...

    After I load metadata I "consolidate all with data" for December of a given year. Once this consolidation is finished the Calc Status of Dec is "OK" but when I look at any Prior Month within the same year the Calc Status is "OK SC" It is my understanding that consolidating any given month would consolidate all prior periods within the same Scenario/Year. Is there a way to fix this so the prior periods are consolidated as well?

    It would consolidate prior months if there was some change in the data for those months. Here, you have changed metadata therefore the status is "OK SC" which means that it is calculated/consolidated but there is a System Change (SC) since the last calculation/consolidation. HFM has no way to know whether you wanted to keep the calculations according to the previous version of your rules, so it does not execute consolidation for those periods. Bare in mind that rules may change from period to period due to changes in regulation (or more generally in the client's business needs) in contrast to the reason that the system is not yet finalized, which is probably your case at hand. In this case you must manually execute the consolidation for those periods.

  • Display three prior months starting from current month

    Hello All,
    I came across the requiremnt:
    The report looks like:
    2014-Jan
    2014-Feb
    2014-Mar
    2014-Apr
    2014-May
    2014-June
    2014-July
    2014-Aug
    2014-Sep
    2014-oct
    2014-Nov
    2014-Dec
    A
    122
    233
    233
    233
    233
    233
    233
    233
    233
    233
    233
    233
    B
    22
    33
    33
    33
    33
    33
    33
    33
    33
    33
    33
    33
    C
    33
    33
    33
    33
    33
    33
    33
    33
    33
    33
    33
    33
    D
    333
    3333
    3333
    3333
    3333
    3333
    3333
    3333
    3333
    3333
    3333
    3333
    The requirement is to display the prior 3 months ,current month, next 3 months.
    Assume that current month is SEPTEMBER, the report should look like:
    2014-June
    2014-July
    2014-Aug
    2014-Sep
    2014-oct
    2014-Nov
    2014-Dec
    A
    233
    233
    233
    233
    233
    233
    233
    B
    33
    33
    33
    33
    33
    33
    33
    C
    33
    33
    33
    33
    33
    33
    33
    D
    3333
    3333
    3333
    3333
    3333
    3333
    3333
    Share your thoughts.
    Thanks

    Hello All,
    I got this resolved using the below formula to get either prior 3 months or the next 3 months from current date:
    3rd month from current date:
    =LastDayOfMonth(RelativeDate(LastDayOfMonth(RelativeDate(LastDayOfMonth(RelativeDate(LastDayOfMonth(CurrentDate()); 1));1));1))
    Prior 3rd month from current date:
    =ToDate(FormatDate(RelativeDate(ToDate(FormatDate(RelativeDate(ToDate(FormatDate(RelativeDate(ToDate(FormatDate(CurrentDate();"MM/yyyy");"MM/yyyy");-1);"MM/yyyy");"MM/yyyy");-1);"MM/yyyy");"MM/yyyy");-1);"MM/yyyy");"MM/yyyy")
    and used these objects to restrict my date field(date object between "Prior 3rd month from current date:" and
    "Prior 3rd month from current date:"
    Thanks,
    Vijay

  • Function to list the month from a date range?

    I would like to know what the function is that would take a look at a date range, and extract the month name
    Here is how I would like it to come out:

    Hello
    The following sample tables are along your original scheme using month name to filter the data.
    2014 (excerpt)
    A1  month
    A2  =MONTHNAME(MONTH(B2))
    A3  =MONTHNAME(MONTH(B3))
    A4  =MONTHNAME(MONTH(B4))
    B1  date
    B2  2013-01-15
    B3  2013-01-20
    B4  2013-01-27
    C1  category
    C2  A
    C3  B
    C4  C
    D1  amount
    D2  100
    D3  50
    D4  20
    January
    A1  category
    A2  A
    A3  B
    A4  C
    A5  D
    A6  E
    A7  F
    A8  G
    A9  H
    B1  totals
    B2  =SUMIFS(2014::D,2014::A,C$1,2014::C,A2)
    B3  =SUMIFS(2014::D,2014::A,C$1,2014::C,A3)
    B4  =SUMIFS(2014::D,2014::A,C$1,2014::C,A4)
    B5  =SUMIFS(2014::D,2014::A,C$1,2014::C,A5)
    B6  =SUMIFS(2014::D,2014::A,C$1,2014::C,A6)
    B7  =SUMIFS(2014::D,2014::A,C$1,2014::C,A7)
    B8  =SUMIFS(2014::D,2014::A,C$1,2014::C,A8)
    B9  =SUMIFS(2014::D,2014::A,C$1,2014::C,A9)
    C1  January
    C2 
    C3 
    C4 
    C5 
    C6 
    C7 
    C8 
    C9 
    Notes.
    Formula in January::B2 can be filled down across B2:B9.
    The target month name is defined in January::C1.
    February table is the same as January table except for the value in C1.
    And the following sample tables are using date per se instead of month name to filter the data. In this scheme, you don't need month column in source table but the retrieving formulae in destination table become more complex.
    2014 (excerpt)
    A1  date
    A2  2013-01-15
    A3  2013-01-20
    A4  2013-01-27
    B1  category
    B2  A
    B3  B
    B4  C
    C1  amount
    C2  100
    C3  50
    C4  20
    January
    A1  category
    A2  A
    A3  B
    A4  C
    A5  D
    A6  E
    A7  F
    A8  G
    A9  H
    B1  totals
    B2  =SUMIFS(2014::C,2014::B,A2,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B3  =SUMIFS(2014::C,2014::B,A3,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B4  =SUMIFS(2014::C,2014::B,A4,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B5  =SUMIFS(2014::C,2014::B,A5,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B6  =SUMIFS(2014::C,2014::B,A6,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B7  =SUMIFS(2014::C,2014::B,A7,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B8  =SUMIFS(2014::C,2014::B,A8,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    B9  =SUMIFS(2014::C,2014::B,A9,2014::A,">="&EOMONTH(C$1,-1)+1,2014::A,"<="&EOMONTH(C$1,0))
    C1  2013-01-01
    C2 
    C3 
    C4 
    C5 
    C6 
    C7 
    C8 
    C9 
    Notes.
    Formula in January::B2 can be filled down across January::B2:B9.
    The target month is defined in January::C1, which can be any date in target month, e.g., 2013-01-01, 2013-01-20, etc. The formulae in B will retrieve data with date in range: 2013-01-01 <= [date] <= 2013-01-31.
    February table is the same as January table except for the value in C1.
    Tables are built in Numbers v2.
    Hope this may help,
    H
    EDIT: Replaced the last table with the correct one. (Formulae in B are correct)

  • Assign Month within a date range (by most days in a given month)

    I have a begin and end date, sample data as such
    select to_date('01-13-12','mm-dd-yy') from_dt,
    to_date('02-23-12','mm-dd-yy') to_dt
    from dual
    union all
    select to_date('03-15-2012','mm-dd-yy') from_dt,
    to_date('04-16-2012','mm-dd-yy') to_dt
    from dual
    union all
    select to_date('05-13-2012','mm-dd-yy') from_dt,
    to_date('07-23-2012','mm-dd-yy') to_dt
    from dual
    How do I assign a month by the most days in a month within that date range? Sometimes the date range might have the exact same amount of days in a month (like 3/15/2012 has 16 days and 4/16/2012 has 16 days). In this case, I want the earlier month (march).
    So from the sample data:
    01/13/2012, 02/23/2012, February
    03/15/2012, 04/16/2012, March
    05/13/2012, 07/23/2012, June
    Thanks
    Edited by: user4422426 on Mar 1, 2012 5:15 PM

    Hi,
    Here's one way:
    WITH     cntr          AS
         SELECT     LEVEL - 1     AS n
         FROM     (
                   SELECT      1 + MAX (to_dt - from_dt)     AS max_day_cnt
                   FROM     table_x
         CONNECT BY     LEVEL     <= max_day_cnt
    ,     got_r_num     AS
         SELECT     x.from_dt, x.to_dt
         ,     TRUNC (x.from_dt + c.n, 'MONTH')     AS month
         ,     count (*)                    AS cnt
         ,     ROW_NUMBER () OVER ( PARTITION BY  from_dt, to_dt
                             ORDER BY        COUNT (*)     DESC
                             ,             TRUNC (x.from_dt + c.n, 'MONTH')
                           )     AS r_num
         FROM       cntr     c
         JOIN       table_x  x  ON  c.n  <= x.to_dt - x.from_dt
         GROUP BY  x.from_dt, x.to_dt
         ,       TRUNC (x.from_dt + c.n, 'MONTH')
    SELECT     from_dt, to_dt
    ,     TO_CHAR (month, 'Mon YYYY')     AS mon
    ,     cnt
    FROM     got_r_num
    WHERE     r_num     = 1
    ;Thanks for posting code to create the same data. Please test your code before you post it: you got the order of arguments to TO_DATE reversed.

  • Get number of month, week and date between 2 dates

    Hi all,
    Is it possible to display number of month, week and days between 2 dates? either by using only SQL query or through PL/SQL...
    Input:
    From date: 01-Oct-2010
    To date: 19-Oct-2010
    I want output as below (Assuming the week starts from Monday to Sunday in oracle).
    01-Oct-2010 -- (Since this is in mid of the week)
    02-Oct-2010 -- (Since this is in mid of the week)
    03-Oct-2010 -- (Since this is in mid of the week)
    40 -- (Oct 4 to Oct 10 falls in 40th week of the year)
    41 -- (Oct 11 to Oct 17 falls in 41th week of the year)
    18-Oct-2010 -- (Since this is in mid of the week)
    19-Oct-2010 -- (Since this is in mid of the week)
    Note: If there is one full month between the given date, then the month number should be displayed.
    After the month, the remaining date comprised with one full week, then the week number of the year should
    be displayed. After displaying the week, the remaining dates should be displayed as it is..
    Appreciate your help..
    Thanks.
    Rajan.

    I suppose if it's just like a calendar type information you want then something like...
    SQL> break on month skip 1
    SQL> set linesize 200
    SQL> set pagesize 2000
    SQL> column month format a20
    SQL> column week format a4
    SQL> with req as (select '&Required_Year_YYYY' as yr from dual)
      2      ,offset as (select case when to_char(trunc(to_date(yr,'YYYY'),'YYYY'),'IW') in ('52','53') then 1 else 0 end as offset from req
      3  select lpad( Month, 20-(20-length(month))/2 ) month,
      4         '('||week||')' as week, "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"
      5  from (
      6    select to_char(dt,'fmMonth YYYY') month,
      7    case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
      8         when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
      9         when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
    10         else to_char(to_number(to_char(dt,'iw'))+offset) end as week,
    11    max(decode(to_char(dt,'d'),'1',lpad(to_char(dt,'fmdd'),2))) "Mo",
    12    max(decode(to_char(dt,'d'),'2',lpad(to_char(dt,'fmdd'),2))) "Tu",
    13    max(decode(to_char(dt,'d'),'3',lpad(to_char(dt,'fmdd'),2))) "We",
    14    max(decode(to_char(dt,'d'),'4',lpad(to_char(dt,'fmdd'),2))) "Th",
    15    max(decode(to_char(dt,'d'),'5',lpad(to_char(dt,'fmdd'),2))) "Fr",
    16    max(decode(to_char(dt,'d'),'6',lpad(to_char(dt,'fmdd'),2))) "Sa",
    17    max(decode(to_char(dt,'d'),'7',lpad(to_char(dt,'fmdd'),2))) "Su"
    18    from ( select trunc(to_date(req.yr,'YYYY'),'y')-1+rownum dt
    19           from all_objects, req
    20           where rownum <= add_months(trunc(to_date(req.yr,'YYYY'),'y'),12) - trunc(to_date(req.yr,'YYYY'),'y') )
    21        ,offset
    22    group by to_char(dt,'fmMonth YYYY'),     case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
    23                                                  when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
    24                                                  when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
    25                                                  else to_char(to_number(to_char(dt,'iw'))+offset) end
    26    ) x
    27  order by to_date( month, 'Month YYYY' ), to_number(x.week)
    28  /
    Enter value for required_year_yyyy: 2010
    old   1: with req as (select '&Required_Year_YYYY' as yr from dual)
    new   1: with req as (select '2010' as yr from dual)
    MONTH                WEEK Mo Tu We Th Fr Sa Su
        January 2010     (1)               1  2  3
                         (2)   4  5  6  7  8  9 10
                         (3)  11 12 13 14 15 16 17
                         (4)  18 19 20 21 22 23 24
                         (5)  25 26 27 28 29 30 31
       February 2010     (6)   1  2  3  4  5  6  7
                         (7)   8  9 10 11 12 13 14
                         (8)  15 16 17 18 19 20 21
                         (9)  22 23 24 25 26 27 28
         March 2010      (10)  1  2  3  4  5  6  7
                         (11)  8  9 10 11 12 13 14
                         (12) 15 16 17 18 19 20 21
                         (13) 22 23 24 25 26 27 28
                         (14) 29 30 31
         April 2010      (14)           1  2  3  4
                         (15)  5  6  7  8  9 10 11
                         (16) 12 13 14 15 16 17 18
                         (17) 19 20 21 22 23 24 25
                         (18) 26 27 28 29 30
          May 2010       (18)                 1  2
                         (19)  3  4  5  6  7  8  9
                         (20) 10 11 12 13 14 15 16
                         (21) 17 18 19 20 21 22 23
                         (22) 24 25 26 27 28 29 30
                         (23) 31
         June 2010       (23)     1  2  3  4  5  6
                         (24)  7  8  9 10 11 12 13
                         (25) 14 15 16 17 18 19 20
                         (26) 21 22 23 24 25 26 27
                         (27) 28 29 30
         July 2010       (27)           1  2  3  4
                         (28)  5  6  7  8  9 10 11
                         (29) 12 13 14 15 16 17 18
                         (30) 19 20 21 22 23 24 25
                         (31) 26 27 28 29 30 31
        August 2010      (31)                    1
                         (32)  2  3  4  5  6  7  8
                         (33)  9 10 11 12 13 14 15
                         (34) 16 17 18 19 20 21 22
                         (35) 23 24 25 26 27 28 29
                         (36) 30 31
       September 2010    (36)        1  2  3  4  5
                         (37)  6  7  8  9 10 11 12
                         (38) 13 14 15 16 17 18 19
                         (39) 20 21 22 23 24 25 26
                         (40) 27 28 29 30
        October 2010     (40)              1  2  3
                         (41)  4  5  6  7  8  9 10
                         (42) 11 12 13 14 15 16 17
                         (43) 18 19 20 21 22 23 24
                         (44) 25 26 27 28 29 30 31
       November 2010     (45)  1  2  3  4  5  6  7
                         (46)  8  9 10 11 12 13 14
                         (47) 15 16 17 18 19 20 21
                         (48) 22 23 24 25 26 27 28
                         (49) 29 30
       December 2010     (49)        1  2  3  4  5
                         (50)  6  7  8  9 10 11 12
                         (51) 13 14 15 16 17 18 19
                         (52) 20 21 22 23 24 25 26
                         (53) 27 28 29 30 31
    61 rows selected.
    SQL>

  • How to derive month/year from date in SAP BW 3.5 data flow

    Hi
    How we can derive cal year/month and fiscal month/year from date in SAP BW 3.5 data flow (we're using transfer and update rule)..
    Thanks,
    PK

    Hi,
    if you have any date filed in source side you can just map to any time char system will automatically convert to target objects.
    please look at the screen shot for understanding. (not 3.x it is 7.x)
    Thanks,
    Phani.

Maybe you are looking for

  • I can't type $ sign in the password area?

    I am using Linksys wireless router for my home office. My pc works fine with my network; however my MAC can't. I am using security enable network. For MAC, sometimes I can type $ sign in the beginning of my passwork, but I can't click OK. Sometime I

  • G4 12" mini DVI to VGA external monitor does not display

    I have hooked up the mini adapter cable and hooked up the VGA cable to a Dell P780, which the apple recognized. The monitor acts like it is going to come on, but then appears to go into sleep mode... The G4 is functioning as if the monitor is working

  • "Open with" command tries to open a document via Firefox, even though I have reassociated the file type numerous times.

    Some time ago after installing the new Adobe Creative Suite 5, my indd file extensions lost their association to InDesign. I mis-clicked when trying to correct this and accidentally selected Firefox from the list of programs. But now I can't seem to

  • Non-Catalog Items

    Hi Experts! For my B2B scenario (ERP backend) I need to be able to add non-catalog items to the basket and to order them. I read about the XCM configuration for adding items which do not belong to the web catalog by using the component "enable.nonCat

  • Automatic Check (F7) in MIGO

    Dear, As can be concluded from Note 417169, transaction MIGO only shows Warning messages and Information messages once the Check button (F7) is performed. Now, following tha advice in the Note mentioned, I want to use Method CHECK_ITEM of BAdI MB_MIG