Logic to update Calendar Month & Calendar Year

hi experts i have to update calender month & calender year my requirement is like below:
1 - 4 weeks are of 1st Month , 5 u2013 8 weeks are of 2nd Month , 9 u2013 13 weeks are of 3rd Month and 1 u2013 13 weeks are of 1st  Quarter.
     Rep Week C     Valid From     Valid To     Reporting     Fiscal Qua     Calendar y     Calendar m     Quarter
     201008     12.02.2010     18.02.2010     8     1     2010     2     1
     201009     19.02.2010     25.02.2010     9     1     2010     3     1
     201010     26.02.2010     04.03.2010     10     1     2010     3     1
     201011     05.03.2010     11.03.2010     11     1     2010     3     1
this changes i have to done in t-code  SCAL. so please let me know how to update this, give me step by step procedure.
Thannks in advance
BHARATI.

Hi ,
If you do not have a datasource...
  First step : you need to create a datasource for the required fields,
  go the relevent fields in r/3 , like cal week ,etc where u have made the changes ,
  press F1,in the technical information, you will find the information of the relevant tables fom which u can create the    datasource.create a datasource through t-code RSO2 .
Replicate the same in BW .
For Quarter (last field in your data) , a field routine can be written where you can write a code as:
If Calweek4(2)<=13 and Calweek4(2)>0.
Result = 1.
Elseif Calweek4(2)<=26 and Calweek4(2)>13.
Result= 2 and so on till quarter 4 .
For Calyear  , u can use 0calyear field directly and map it to calweek field from source
or in the field routine of Calyear write code: result = source_field-Calweek+4.
for fiscquarter also , try using a 0calquarter field provide by SAP or
in field routine of FiscalQuarter write result= source_field-Calweek+4(2)

Similar Messages

  • Elements 9 won't select month and year on calendar

    I just got element 9 and have tried to make a calendar for 2011.  The problem is, is that it won't even let me select the month and the year, it keeps on coming up as 2010.  I had a calendar printed out and didn't even notice the wrong year.  Have I done something wrong?  Can anyone help?
    Thanks
    meegsmum

    I'm having the same problem, but for calendar year 2012. If I enter January 2013, the program will provide a calendar for 2012. I've contacted adobe and their fix, is to update the camera raw plugin to 6.5, which won't even download. What this download has to do with creating a folder I have no idea.  I didn't catch the problem, until after I spent $180.00 in printing costs (my bad). Adobe support suggested I should have double checked the calendar before printing.  I believe we should have a product that works and doesn't require the consumer to have figure out how to out smart the bugs! Come on adobe this problem has been an issue for a year now. How about fixing the problem. Does adobe not monitor these forums?

  • I have 3 PC's.  Two of them I use at 2 different locations and only use them 6 months a year.  So, if I have Icloud for my calendar, and turn on a computer that has not been used for 6 months, does all the old information on that computer to go Icloud?

    I have 3 PC's.  Two of them I use at 2 different locations and only use them 6 months each year.  When I turn on a computer that has not been used for 6 months, does all of the old information from that computer end up in Icloud?  Does Icloud push all the new calendar and contact items over the old items?

    A reset may help. Tap and hold the Home button and the On/Off buttons for approximately 10-15 seconds, until the Apple logo reappears. When the logo appears, release both buttons.
    No content is affected by this procedure.

  • Unable to view the Calendar Year/Month in the Query

    Hi All,
    We are having a standard query on Customer InfoCube 0sd_c01_q0003.
    I was able to get the data. But I am unable to view the Calendar Year/month. In that place I am getting '#'.
    I am able to view the details in the InfoCube. There aren't any errors while executing the error.
    Regards
    YJ

    hi,
    U r Problem is not clear...if u r getting # for characteristic values means..u don't have data in Infoprovider...try to view data in InfoProvider with the same selections that u r executing the Query with.
    thnaks

  • Selective deletion based on Calendar Year/Month in process chains

    Hi all,
    I have a requirement from the business wherein I have to delete the past months data before I load the same data into 6 infocubes using a process chain.
    I checked the forums to understand how selective deletion is used in a process chain and I have come to know that RSDRD_DELETE_FACTS program or DELETE_FACTS Tcode can be used to generata a G* program that performs the deletion.
    I am to integrate this generated program in my process chain. I have 0CALMONTH(Calendar Year/Month) as the time characteristic in all my infocubes and therefore the only time characteristic available for selective deletion.
    My problem is that I am unable to create a dynamic selection for the Calendar Year/Month such that it takes the previous month.To be exact I am unable to use the "D" option in the Selection Variable column for this characteristic.
    Please can somebody help me out with this.

    Hi,
    Use this ABAP program code in your Process Chain...
    Type Pools
        TYPE-POOLS: rsdrd, rsdq, rssg.
    Local Internal Tables
        DATA: lit_msg     TYPE rs_t_msg,
                    lit_sel     TYPE rsdrd_thx_sel.
    Local Work Area
        DATA : lwa_sel_kf1     TYPE rsdrd_sx_sel,
                   lwa_range_kf1  TYPE rsdrd_s_range.
    Local Constants
        CONSTANTS :    lc_i(1)      TYPE c  VALUE 'I',
                                 lc_x(1)      TYPE c  VALUE 'X',
                                 lc_eq(2)     TYPE c  VALUE 'EQ',
                                 lc_kf1(11)   TYPE c  VALUE '0CALMONTH'.
        CONSTANTS :   lc_cube      TYPE rsddatatarget VALUE 'Z_C21'.
    Delete Existing cube records
    Key Field 1 (CALMONTH)
          lwa_range_kf1-sign    = lc_i.
          lwa_range_kf1-option  = lc_eq.
          lwa_range_kf1-high    = space.
          lwa_range_kf1-keyfl   = lc_x.
          lwa_range_kf1-low     = <Value of CALMONTH>.
          APPEND lwa_range_kf1 TO lwa_sel_kf1-t_range.
          CLEAR  lwa_range_kf1.
           lwa_sel_kf1-iobjnm = lc_kf1.
          INSERT lwa_sel_kf1 INTO TABLE lit_sel.
          CLEAR : lwa_sel_kf1.
    Selective Deletion through FM
          CALL FUNCTION 'RSDRD_SEL_DELETION'
            EXPORTING
              i_datatarget      = lc_cube
              i_thx_sel         = lit_sel
              i_authority_check = space
              i_mode            = lc_c
              i_no_enqueue      = lc_x
            CHANGING
              c_t_msg           = lit_msg
            EXCEPTIONS
              x_message         = 1
              inherited_error   = 2
              invalid_type      = 3
              OTHERS            = 4.
          IF sy-subrc = 0.
            REFRESH : lit_sel[],
                      lit_msg[].
          ENDIF.
    Thanks,
    Saru

  • Extracting 0CALYEAR from Calendar Year/Month From-To in a query

    Hi all,
    I have a high granularity query which is used in a large number of workbooks. This query has a key Calendar Year/Month input everytime it's launched. The thing is I'd like to support it with an aggregate containing the data from the year 2010. As there is no way to specify a value range for 0CALMONTH in the aggregate, the only way to specify the time range is through setting 0CALYEAR to a fixed vaule 2010. But then the aggregate is not picked up when the query is launched with the key 0CALMONTH = from 01.2010 to 01.2010. What should I do to force the aggregate to be used?
    I know that one way is to add the 0CALYEAR as a key year to the query but I wouldn't want to force everyone to fill it everytime they run the report.
    Is there any way to make the 0CALYEAR characteristic in the query definition get the year value automatically after the user has input the Calendar Yer/Month and to remain relatively transparent at the same time? I suppose I could make it using some user exit or so but can it be made more easily?
    I'm using BI7.0 with BEx 3.x (for a couple of reasons)
    Many thanks for any suggestions
    Krzysztof

    A user exit variable, hidden and derived from the input for 0CALMONTH,  is your only option to fill the 0CALYEAR and use the aggregate.  However, you should be able to do this automatically in your data model.
    My data models usually consist of a mutliprovider that contains multiple infocubes each segregated by year, (with a Constant value for year assigned), and each one cube compressed by 0CALMONTH.  When you query by 0CALMONTH, this model causes the query to look at only the specifc year infoprovider, and the specific partition for 0CALMONTH.  I believe this is the behavior you are trying to achieve with the aggregate.  It is automatic with my model.
    Bryan

  • How to create a text variable for Calender Yr/Month depending on the prompt for calendar year

    Hi everyone
    Please assist on this issue:
    i have created a Bex report that has an offset for 12 months from the current calender month, i tried to use text variables to replace the calender months but i just learned now text variables from Bex dont work in BO, so I would like to create a prompt in BO to enter Calendar Year and then based on the input(Calender Year) the Webi report must display a 12 months for that Year.
    Please also indicate where exactly  i have to click in order to get that "Helpful icon "  when the my issues have been resolved, because i searched it and havent seen it anywhere on the communications
    Thanks in Advance
    Ole

    Hi Gill
    In BO I recieve my all months for existing data  and when i create a prompt for Calender Year the months in the report still has those text varibale for exampl if i enter 2011 on the prompt the text remains for the year that was already there wen i created my text variable... so its not dynamic.....
    So if i have text variables in Bex it will display like this in Webi in which it wont change if i put in 2011 as input for the prompt...

  • How to create offset for calendar year/month in BEx Reporting

    HI ALL,
        i have a requirement of creating offset for calendar year/month.Basically i have a characteristic in Rows and volume key figure in Column and i have to put that volume under the calender year /month which is shown below ..
                             Previous Volume           Present Volume
                                     01.2010                             01.2011
    material                    10000                               20000
    how can i create a report for this . by using volume key figure i am creating previous volume and present volume,. how can i put them in key figure do i have to create any structure, selections  for that.... and "" how can i get the present year volume and previous year volume. If i use cal year/month how can i create offset for that.....
    please do let me know in brief...
    Thank you.

    Hi ,
    I think you need data year wise .
    Instead of creating a variable for calmonth and using it in the RKF , you can just drag calyear in columns and keep the Volume keyfigure below it . Keep only one keyfigure Volume and do not restrict it with calmonth or any other variable .
    In this case calyear should not be present in rows or free characteristics .
    You would be able to see the data year wise ..
    Try this and check whether it is according to your requirement
    If You need to show the data as Volume (01.2011)  and Volume(01.2010)
    It means you are only showing data for Jan 2011 and Jan 2010 in the report
    In this case you can retrict Volume keyfigure with a variable and create a customer exit variable
    for 0calmonth as an offset of -1 will bring the data of 12.2010 for Previous Volume(01.2010) key figure which is incorrect .
    For your output you can create 2 customer exit variables :
    One will restrict 0calmonth to current year and another to previous year .
    Check whether this works .
    Also , if you want to show current calendar months data , you can either use a mandatory variable on 0calmonth
    and restrict the same in volume keyfigure or there are std customer exit variable provided by SAP to give current cal month .
    You can restrict the char 0calmonth with this std exit variable if you do not want 0calmonth variable to be mandatory.

  • Calendar year/month

    Hi,
    The csv file has the calendar year/month as 200801. But when the data is previewed in the datasource, it shows as 20.0801. What could be the reason? The conversion exit used is PER16.
    Also, Fiscal year/period has 2008010.It shows in the preview as 200.8010. What could be the reason? The conversion exit used is PER17.
    Thanks.

    Hi,
    Conversion routines seem ok.Why do not you try to put in your csv file like 012008 (calmonth) or 0012008(fiscper) instead of the one you currently using.
    Regards.

  • Query row structure to restrict on multiple ranges of Calendar Year /Month using Custom exit

    Hi All,
    I have written 2 queries in Bex 7.x which have similar requirement. One uses 0CALMONTH and other 0FISCPER. I will describe scenario with Calendar Year month query.
    Query to have user entry screen for 0CALMONTH. Added 0CALMONTH in Filters section and restricted on mandatory user entry variable.
    Key figures restricted in four ways by creating a row structure with four selections
    Current Month User entered value on selection screen (Restricted on User entry variable)
    Previous Month / Period (Above value offset -1)
    YTD value Range from Previous July / 07.YYYY to current user entered month value (Custom exit)
    LYTD value - Above value for previous year (Above value offset -12)
    For YTD value wrote a custom exit code which uses the user entry variable on 0CALMONTH to retrieve the current month value and then give output range value for YTD.
    The custom exit code when debugged seems to calculate the correct range. However the query output is not working and gives out the same data for Current month and YTD range. Also LYTD value and Previous month value don't show up with any data at all.
    Any tips on where we are going wrong would be helpful.
    Thanks!
    Custom Exit code:
    WHEN 'ZGB_FP_AYTD_PTNR'.
         IF i_step EQ '2'.
           READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZFP_AYTD_PRTNR'
                                                                iobjnm = '0CALMONTH'.
           IF sy-subrc EQ 0.
             CLEAR: l_month_curr, l_month_low, l_year_curr, l_year_low,
                    l_calmonth_low, l_calmonth_high.
             l_month_curr = loc_var_range-low+4(3).
             l_year_curr = loc_var_range-low+0(4).
             l_month_low = 001.
             l_year_low  = l_year_curr.
             CONCATENATE l_year_low l_month_low INTO l_calmonth_low.
             CONCATENATE l_year_curr l_month_curr INTO l_calmonth_high.
             l_s_range-low = l_calmonth_low.
             l_s_range-high = l_calmonth_high.
             l_s_range-sign = 'I'.
             l_s_range-opt = 'BT'.
             APPEND l_s_range TO e_t_range.
           ENDIF.
         ENDIF.

    Hi
    try this code
    WHEN '0CALMONTH'.
    CLEAR: l_month_curr, l_month_low, l_year_curr, l_year_low,
                    l_calmonth_low, l_calmonth_high.
         IF i_step EQ '2'.
      loop at i_t_var_range INTO loc_var_range where vnam = 'ZFP_AYTD_PRTNR'.
             l_month_curr = loc_var_range-low+4(2).
             l_year_curr = loc_var_range-low+0(4).
             concatinate '0' l_month_curr into l_month_low.
             CONCATENATE l_year_low '001' INTO l_calmonth_low.
             CONCATENATE l_year_curr l_month_low INTO l_calmonth_high.
             l_s_range-low = l_calmonth_low.
             l_s_range-high = l_calmonth_high.
             l_s_range-sign = 'I'.
             l_s_range-opt = 'BT'.
             APPEND l_s_range TO e_t_range.
           endloop.
         ENDIF.
    This code used for calculate fiscal period interval from your input month.
    For Ex
    user input is 05.2014
    customer exit result as 001.2014 - 005.2014.
    Note: Fiscal year period is Jan - Dec otherwise need to convert the input month details.
    Regards
    Sureshkumar

  • Quarter Variable from Calendar Year/month

    Hi,
    Does anybody know how to get the quarter value from a selected calendar year/month (0calmonth) entered in the selection screen? Is there any standard variable for that? I don't want current quarter but the quarter that will come from the entered 0calmonth.
    Thanks,

    you need to do it thru a customer exit to derive the cal quarter. I dont think there is any delivered varaible for that. We did it thru a exit though.
    If you have the luxury of adding a char in the cube, you can derive it at cube level too.

  • Calendar year Update

    I made Calendars last year for my family as gifts in iphoto. I wanted to keep the birthdays for each calendar and update the pictures and year. Can anyone tell me how to save my calendar's data. When I duplicate my 2012 calendars for 2013 all the data deletes itself.

    Just went thru that myself and it can't be done.  What I've done is create a special calendar in iCal with just the birthdays to be used in calendars.  Then I add that to each new calendar. 
    OT

  • SSRS Line graphs, change the axis maximum and minimum by month, and change data series from calendar year to financial year

    I am using SSRS and I cannot access SQL server to answer my problem, so the solution needs to be done via SSRS only.
    I am currently trying to graph some data. The problem is, the months on the X axis are aligned by calendar year. I need the first month to commence with July, with the last month on the axis to be June. This also means that the year series need to be changed
    from calendar year to Australian financial year.
    Screenshots are provided in the comments.

    Hi Northern,
    Per my understanding that you want to show the month in the x axis as the order of the financial year(7,8,9,10...4,5,6) and also display the year in the series group as the financial year, right?
    I have tested on my local environment and we can modify the query in the sql to get the financial year value based on the fields of Calendar year, details information below for your reference:
    1. Modify the query as below:
    SELECT
    Calendar_Date,CASE WHEN MONTH(Calendar_Date)>=7 THEN
    YEAR(Calendar_Date)+1
    ELSE YEAR(Calendar_Date) END AS Financial_Year,
    MONTH(Calendar_Date)as Financial_Month,
    Billing_Amount
    FROM TableName
    order BY
    Calendar_Date
    2. Add the "Billing_Aomount" in the Value area, "Financial_Month" in the Category group area and "Financial_Year" in the Series group area.
    3. Right click the  "Financial_Month" under the Category group to select the "Category group properties",click the sorting and add below expression in the Sort by to specify the order for the month in the x-axis:
    =switch(Fields!Financial_Month.Value="7",1,Fields!Financial_Month.Value="8",2,
    Fields!Financial_Month.Value="9",3,Fields!Financial_Month.Value="10",4,
    Fields!Financial_Month.Value="11",5,Fields!Financial_Month.Value="12",6,
    Fields!Financial_Month.Value="1",7,Fields!Financial_Month.Value="2",8,
    Fields!Financial_Month.Value="3",9,Fields!Financial_Month.Value="4",10,
    Fields!Financial_Month.Value="5",11,Fields!Financial_Month.Value="6",12)
    4. Preview you will get the sample chart display as below according to my sample data:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • About Calendar Year/Month in demo cube 0D_PU_C01

    Dear Friends,
      I'm now working with the demo cube <b>0D_PU_C01</b>,and then I met such a problem:
      I download the csv file via a program, and then I found the stucture of the data is not suitable for this cube , so I changed it manually, and when I tried to load Calendar year/month colomn, It showed coversion error, so I reformatted it from <b>yyyymm</b> into <b>mmyyyy</b>, finally it works. But, when I open the report it shows in the following format: <b>mmyy/yy</b> (such as 0119/99, it should be 1999/01). Can anybody help me ?

    Hi Shi,
    You need to write a small ABAP routine. If you are using PSA as the transfer method then you can write the routine in start routine section of the transfer rules tab.
    You need to first bring the format to MMYYYY and then apply the conversion exit 'PERI6' (CONVERSION_EXIT_PERI6_INPUT) to convert the format to SAP internal format. That would resolve the issue.
    Hope it helps,
    Thanks
    Soumya
    Message was edited by:
            Soumya Mishra

  • Derive Calendar Year/Month from FiscalYear/Period

    Hi,
    I have ODS A and Cube A. Cube A has time characteristics which are not exist in ODS A. The Fiscal year/period characteristic in Cube A is based on a date infoobject (called Date1) in ODS A.
    For Calendar Year/Month, I want to derive it from fiscal year/period (0FISCPER).
    Since 0FISCPER is not in ODS A, I make use of Date1 in the ABAP routine and call DATE_TO_PERIOD_CONVERT function to convert it to fiscal period and then output the result as YYYYMM.
    The code is as below:-
    MOVE COMM_STRUCTURE-/BIC/ZCRBUCDTE TO v_date.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
        EXPORTING
          i_date  = v_date
          i_periv = 'Z1'
        IMPORTING
          E_BUPER = EFISPER
          E_GJAHR = EFISYEAR
        EXCEPTIONS
          INPUT_FALSE = 1
          T009_NOTFOUND = 2
          T009B_NOTFOUND = 3
          OTHERS = 4.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *result
    CONCATENATE EFISYEAR EFISPER+1(2) INTO RESULT.
    There is no syntax error in the routine. But when I load data from ODS A to cube A, it gives me warning but no message. The request just hung.
    I don't know what went wrong. Please help.
    If you have any suggestion to achieve the same thing. Please let me know also.
    Thanks in advance.
    Message was edited by:
            CH

    Date1 in my message is reffering to ZCRBUCDTE.
    Message was edited by:
            CH

Maybe you are looking for

  • Web clipping a partner application in 10.1.2

    Hi, if i clip a partner application protected by mod_osso the portlet shows the sso-server's login page and asks the user to authenticate again. The documentation says: "When you integrate with partner applications (through the use of mod_osso), you

  • Web Gallery-Surprising Differences between Safari and Firefox

    I discovered some surprising differences using Web Gallery in Safari vs. Firefox: 1. When you first view an album the gallery, the thumbnail photos take quite a bit longer to be visible in Safari than in Firefox. 2. When rolling the mouse over the Su

  • Queue or array which is better?

    I need a array of clusters to be stored for which the length is not defined. I will update, Add new element to it. Array or queue can be used to store the clusters. Which one would be better to use in terms of memory usage, fast execution and other p

  • AES Encryption for Windows Phone

    Hi, We are developing a windows phone app and the same app is also being developed in Android and IOS. All three platforms are using a JSON web service for data access. Parameters to be passed are encrypted using AES algorithm. The web service uses t

  • Sbbod in brand new macbook pro

    Hi My Macbook Pro is less than a fortnight old and I'm getting sbbod already. I've only browsed the internet using Safari and loaded a few photos on (it won't permit me to transfer my iTunes content from my pc). It is worst after I've shut down compl