How to schedule month/years

I have a report that needs to run a few days after the previous month. How is the best way to do this?
The report has dates from and to but this can be changed to just month year.
The user wants to see data for the entire month and as well the previous year entire month.
1. the same report can run twice, with the year diff
2. can make 2 reports, one has the current year and last month
other has prev year and that month
how to calculate these?

Hi Paul,
Are you asking how to schedule the report to run or are you asking how to pass the last vs. previous year month?
If you want to pass the last and previous year month, there are two ways to do it:
1)  build the report with a parameter that will allow your user to select which period they want.  The parameter would be used in the RecordSelection Formula like:
DateVar myDate;
DateVar StartDate;
DateVar EndDate;
myDate := cDate(DateAdd ("m", -13, CurrentDate));
StartDate := Date (Year (myDate), Month (myDate), 1);
EndDate := Date (Year (myDate), Month (cDate (DateAdd ("m", 1, myDate))), 1) - 1;
Case {?rptPeriod}
     "Last Month" :{table.DateField} in LastFullMonth
     "Last Year" :{table.DateField} In [StartDate to EndDate];
The formula calculates the start and end dates for last year based on the current date - 13 months.
The Case statement looks at the parameter your use selects and uses the appropriate date range.
2)  Create a report based on last month.  Save and save a copy of the report and add it in as a subreport.  The subreport you can pass a similar formula as above from the main to the sub report, without the need for a parameter.
This will give you a current vs. previous all in one report.
Thanks,
Brian

Similar Messages

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

  • How to Include previous Month/Year in Transformation

    Hi,
    From Source System (DB Table;DB Connect)
    Location_ID,EMP_ID,AMOUNT
    There is no date field avaliable in the source system.
    The Data load to BW will me Monthly frequency...I,e:Data will be loaded once in a Months on 1st of every month.
    My requirment is to Include a date field in BW transformations which input previous month/year data for every record
    How can i do that and wether do i need to write a start or field routine in transformations
    Code please
    Thanks

    Hi Pal,
    You could use the following code to achieve this:
    DATA: v_calmonth(6) TYPE c,
          v_month(2) TYPE c,
          v_year(4) TYPE c.
    v_month = sy-datum+4(2).
    v_year = sy-datum+0(4).
    IF v_month = 1.
      v_year = v_year - 1.
    ENDIF.
    IF v_month = 1.
      v_month = 12.
    ELSE.
      v_month = v_month - 1.
    ENDIF.
    CONCATENATE v_year v_month INTO result.
    Hope this helps.
    Thanks and Regards
    Subray Hegde

  • How to Calculate column (Month, Year) from date or timestamp

    Hi,
    Name
    SQL Data Type
    Dimension
    Column Store Data Type
    Key
    Not Null
    Default
    Comment
    T_STAMP
    TIMESTAMP
    LONGDATE
    How to generate Month and Year from timestamp field in Analytic View.
    Please provide me some valuable input. I have searched SCN before posting this discussion.

    Hi KD,
    You can apply the following formulas in the expression:
    For Year :
    leftstr(string("Timestamp"),4)
    For Month:
    midstr(string("Timestamp"),6,2)
    Regards,
    Krishna Tangudu

  • How to derive date from given month, year and day?

    Hi all,
    I have a doubt in date function. I need to create a date from the given month, year and day. How can i do it?

    consider this example
    REPORT zconvertdate001 .
    TYPES : BEGIN OF tt_date_in,
            day(2),
            sep1,
            month(3),
            sep2,
            year(4),
            END OF tt_date_in.
    DATA : wa_date_in TYPE tt_date_in VALUE '07-Jul-2006'.
    TYPES : BEGIN OF tt_date_out,
            day(2),
            month(2),
            year(4),
            END OF tt_date_out.
    DATA : wa_date_out TYPE tt_date_out.
    TRANSLATE wa_date_in-month TO UPPER CASE.
    SELECT SINGLE mnr
    INTO wa_date_out-month
    FROM t247
    WHERE spras EQ sy-langu
    AND   ktx EQ wa_date_in-month.
    CONCATENATE wa_date_in-year wa_date_out-month wa_date_in-day
           INTO wa_date_out.
    WRITE : / ' Date in:', wa_date_in,
            / 'Date out:', wa_date_out.

  • How to set current year,month as default value in combo box

    hi,  im newbie of xcelsius user
    i realize  that hv a issue that display combo box base on year & month
    let said
    <b><u>step 1</u></b>
    I create excel data like this
    <b><u>year___ </u>  </b>    |     <u><b>month_   </b></u> |     <u><b>Product</b></u> |     <u><b>revenue</b></u>
    02-04-09 |     02-04-09 |       a |     $4,154
    03-04-09 |     03-04-09 |       b |     $6,813
    04-05-09 |     04-05-09 |       a |     $9,875
    05-06-09 |     05-06-09 |       b |     $6,813
    06-04-10 |     06-04-10 |       a |     $6,813
    07-04-10 |     07-04-10 |       b |     $9,875
    08-06-10 |     08-06-10 |       a |     $9,875
    22-06-10 |     22-06-10 |       b |     $6,813
    <u><b>Step2</b></u>
    Then i go format cell to format/custom date to year & month
    Eg1: Year u2013>  02-04-09  convert to u2018YYYYu2019 (2009)
    Eg2: Month u2013>  02-04-09  convert to u2018mmmmu2019 (April)
    So output like this
    <u><b>year</b></u> |     <u><b>month</b></u> |     <u><b>Product</b></u> |     <u><b>revenue </b></u>
    2009 |     April |     a |     $4,154
    2009 |     April |     b |     $6,813
    2009 |     May |     a |     $9,875
    2009 |     June |     b |     $6,813
    2010 |     April |     a |     $6,813
    2010 |     April |     b |      $9,875
    2010 |     June |     a |     $9,875
    2010 |     June |     b |     $6,813
    But the problem is when i insert to combo box,use u201Cfilter Row u201D, i excpectation will display only 2009,2010
    But Actual display the Year  in combo box is duplicated :'(
    so any solution ? and then only how to set current year & month as default value  :'(
    thanks,
    regards
    s1
    Edited by: Leong Pui Kee on Feb 25, 2011 5:25 AM
    Edited by: Leong Pui Kee on Feb 25, 2011 5:36 AM

    hi,
    your created  data
    step 1
    I create excel data like this
    year___ | month_ | Product | revenue
    02-04-09 | 02-04-09 | a | $4,154
    03-04-09 | 03-04-09 | b | $6,813
    04-05-09 | 04-05-09 | a | $9,875
    05-06-09 | 05-06-09 | b | $6,813
    06-04-10 | 06-04-10 | a | $6,813
    07-04-10 | 07-04-10 | b | $9,875
    08-06-10 | 08-06-10 | a | $9,875
    22-06-10 | 22-06-10 | b | $6,813
    In this, year and month both are same data, make the diffent data like year  2009, 2010  And month Jan, Feb, March, ...Etc 
    and also one more check you formulas on month and year, select correct source data, destination data  for compoonent..
    OR
    from above, to create a date column and convert  date-->year, date--> month and Explore it.
    All the best,
    Praveen

  • HT4914 How long is the $24.99 subscription period for iTunes Match, nowhere does it show the time period?  Week, month year?

    How long is the $24.99 subscription period for iTunes Match, nowhere does it show the time period?  Week, month year?

    It's an annual amount - it's at the top of that page :
    iTunes Match requires an annual subscription fee of $24.99

  • How can I change , in my Calander month/day/year to day/month/year

    My Calendar shows the date in the form of the U.S. in Mozilla Firefox and the repeat in Windows Live Mail shows it the way I need it i.e. day/month/year. How can I change this ?

    Please change dates in Calender to read day/month/year

  • How to sum time values sorted by month/year?

    I would like to sum time values that are sorted by month/year. (Concept is based on a pilot's logbook)
    In Table 1, Column A is a date; Column B is the associated time value (duration).
    In Table 2, I would like to Sum the time value of Table 1 Column B by month an year.
    TABLE 1
    Date
    Time
    Header 3
    Jan 1, 2013
    2:30
    Jan 3, 2013
    4:15
    Jan 9, 2013
    3:55
    Feb 2, 2013
    5:01
    Feb 10, 2013
    1:33
    March 3, 2013
    5:55
    TABLE 2
    Month/YR
    Total Time
    Header 3
    Jan-13
    10:40
    Feb-13
    6:34
    Mar-13
    5:55
    Apr-13

    smash,
    Here's an example of what can be done:
    The formula in the Total column of Summary is:
    =SUMIFS(Log :: B, Log :: A, ">="&A, Log :: A, "<"&EOMONTH(A, 0)+1)
    The Month column of Summary is filled with a series of dates that can be formatted as Jan-13, etc, if you wish.
    I used the 0h 0m format for the Durations to distinguish it from times.
    Jerry

  • How to get Quaters of the year if give month year and number of quarters

    My requirement is if i give the input month, year and number of quarters i want the previous quarters. Is there is any function module to get the quarters if we give month and year and number of quarters
    Thank you.

    Pradeep,
    Use the Fm TSTR_PERIODS_QUARTERS and pass the year into the IMPORT PARAM IT_YEARTAB-TSTR.
    U will get the begin & End dates of each quarter...
    reward if helpful,
    Karthik

  • How to schedule the job to run evry Sunday at 12 P.M IST.

    Hi Experts,
    I want to schedule a job which will run evry Sunday at 12 P.M IST.
    I have written the below script.
    [code]BEGIN
      SYS.DBMS_SCHEDULER.CREATE_JOB
           job_name        => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_JOB'
          ,start_date      =>  SYSTIMESTAMP
          ,repeat_interval => 'FREQ=WEEKLY; BYDAY=SUN; BYHOUR=12;BYMINUTE=0; BYSECOND=0;'
          ,end_date        =>  NULL
          ,job_class       => 'DEFAULT_JOB_CLASS'
          ,job_type        => 'STORED_PROCEDURE'
          ,job_action      => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_PROC'
          ,comments        => 'Run at 12 P.M.IST every Sunday'
          ,enabled            => TRUE
    END;[/code]
    But the server in US.
    [code]SELECT sysdate from Dual;
    6/11/2013 3:58:58 AM
    --But the time in India is 02:28 PM [/code]
    How to convert the timezone to IST.
    Please help me how to schedule the job to run evry Sunday at 12 P.M IST.
    Thanks.

    Did you read DBMS_SCHEDULER docs:
      The calendaring syntax does not allow you to specify a time zone. Instead the Scheduler retrieves the time zone from the start_date argument. If jobs must follow daylight savings adjustments you must make sure that you specify a region name for the time zone of the start_date. For example specifying the start_date time zone as 'US/Eastern' in New York will make sure that daylight saving adjustments are automatically applied. If instead the time zone of the start_date is set to an absolute offset, such as '-5:00', daylight savings adjustments are not followed and your job execution will be off by an hour half of the year.
      When start_date is NULL, the Scheduler will determine the time zone for the repeat interval as follows: 
    It will check whether the session time zone is a region name. The session time zone can be set by either:
    Issuing an ALTER SESSION statement, for example:
    SQL> ALTER SESSION SET time_zone = 'Asia/Shanghai'; 
      Setting the ORA_SDTZ environment variable.
      If the session time zone is an absolute offset instead of a region name, the Scheduler will use the value of the DEFAULT_TIMEZONE Scheduler attribute. For more information, see the SET_SCHEDULER_ATTRIBUTE Procedure.
      If the DEFAULT_TIMEZONE attribute is NULL, the Scheduler will use the time zone of systimestamp when the job or window is enabled.
    SY.

  • How to schedule the background job daily twice?

    Hi,
    How to schedule the background job daily twice? any conditions?
    Regards,
    Srihitha

    see the step by step procedure.
    Scheduling Background Jobs:
    1. Background jobs are scheduled by Basis administrators using transaction SM36.
    2. To run a report in a background, a job needs to be created with a step using the report name
    and a variant for selection parameters. It is recommended to create a separate variant for each
    scheduled job to produce results for specific dates (e.g. previous month) or organizational units (e.g.
    company codes).
    3. While defining the step, the spool parameters needs to be specified
    (Step-> Print Specifications->Properties) to secure the output of the report and help authorized users
    to find the spool request. The following parameters needs to be maintained:
    a. Time of printing: set to “Send to SAP spooler Only for now”
    b. Name – abbreviated name to identify the job output
    c. Title – free form description for the report output
    d. Authorization – a value defined by Security in user profiles to allow those users to access
    this spool request (authorization object S_SPO_ACT, value SPOAUTH). Only users with matching
    authorization value in their profiles will be able to see the output.
    e. Department – set to appropriate department/functional area name. This field can be used in
    a search later.
    f. Retention period – set to “Do not delete” if the report output needs to be retained for more
    than 8 days. Once the archiving/document repository solution is in place the spool requests could
    be automatically moved to the archive/repository. Storage Mode parameter on the same screen
    could be used to immediately send the output to archive instead of creating a spool request.
    Configuring user access:
    1. To access a report output created by a background job, a user must have at
    least access to SP01 (Spool requests) transaction without restriction on the user
    name (however by itself it will not let the user to see all spool requests). To have
    that access the user must have S_ADMI_FCD authorization object in the profile with
    SPOR (or SP01) value of S_ADMI_FCD parameter (maintained by Security).
    2. To access a particular job’s output in the spool, the user must have
    S_SPO_ACT object in the profile with SPOAUTH parameter matching the value used
    in the Print Specifications of the job (see p. 3.d above).
    3. Levels of access to the spool (display, print once, reprint, download, etc) are
    controlled by SPOACTION parameter of S_SPO_ACT. The user must have at least
    BASE access (display).
    On-line reports:
    1. Exactly the same configuration can be maintained for any output produced
    from R/3. If a user clicks “Parameters” button on a SAP Printer selection dialog, it
    allows to specify all the parameters as described in p. 3 of
    “Scheduling background jobs” section. Thus any output created by an online report
    can be saved and accessed by any user authorized to access that spool request
    (access restriction provided by the Authorization field of the spool request
    attributes, see p. 3.d of “Scheduling background jobs” section).
    Access to report’s output:
    1. A user that had proper access (see Configuring user access above) can
    retrieve a job/report output through transaction SP01.
    2. The selection screen can be configured by clicking “Further selection
    criteria…” button (e.g. to bring “Spool request name (suffix 2)” field or hide other
    fields).
    3. The following fields can be used to search for a specific output (Note that
    Created By must be blank when searching for scheduled job’s outputs)
    a. Spool request name (suffix 2) – corresponds to a spool name in p. 3.b in
    “Scheduling background jobs” section above).
    b. Date created – to find an output of a job that ran within a certain date range.
    c. Title – corresponds to spool Title in p. 3.c in “Scheduling background jobs”
    section above).
    d. Department - corresponds to spool Department in p. 3.e in “Scheduling
    background jobs” section above).
    4. Upon entering selection criteria, the user clicks the Execute button to
    retrieve the list of matching spool requests.
    5. From the spool list the user can use several function such as view the
    content of a spool request, print the spool request, view attributed of the spool
    request, etc. (some functions may need special authorization, see p.3 in
    Configuring user access)
    a. Click the Print button to print the spool request with the default attributes
    (usually defined with the job definition). It will print it on a printer that was
    specified when a job was created.
    b. Click the “Print with changed attributed” button to print the spool request
    with the different attributes (e.g. changing the printer name).
    c. Click the “Display contents” button to preview the spool request contents. A
    Print and Download functions are available from the preview mode.

  • How to Schedule a Backup in db2

    Hi, Experts
    We are using ECC6 (OS400 with DB2). i want to schedule a backup in db13 but system throwing error iSeries : Function not supported for DB2/400
    Please tell me how to schedule a backup
    Thanks & Regards
    Venkat

    Hi,
      In Application(SAP) level you can't able to take Backup.
    You can take backup from OS level.
    GO SAVE command and schedule the backup...R3<SID>DATA and R3<SID>JRN...libraries you can take daily..
    Monthly once you cane take Entire System Backup with offline.
    If you want online backup you came go to BRMS..But it is licence product with IBM.
    Thanks
    Jibin.

  • Disconnected Slicer in PowerView - Hour | Day | Week | Month | Year | Max

    I want to create a Power View chart in Power BI with the Minute/Hour/Day/Week/Month/Year filters:
    Workbook can be downloaded at:https://www.dropbox.com/s/r00btg5zb8snohz/Disconnected%20Slicer%20Demo.xlsx?dl=0
    when MINUTE is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 60 seconds (from current time) with 5 or 10 seconds interval.
    when Hour is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 60 minutes (from current time) with 5 minutes interval.
    ex: 10:00AM 10:05AM 10:10AM ...................................11:00AM
    when DAY is selected the chart should display:
    Total Number of Msgs vs. X-axis showing last 24 hours (12AM to 11:59PM with 1 hour interval)
    when WEEK is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 7 days from current datetime stamp with 1 day interval.
    when MONTH is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the 30 days from current datetime stamp with 1 day interval
    when YEAR is selected the chart should display:
    Total Number of Msgs vs. X-axis showing the last 12 months from current day with 1 month interval
    It would be great if the PowerView chart can be made to look something like this:
    shown in the below link:
    When '5 Day' is selected the values in the Y axis and X axis change automatically.
    Here's the link:
    https://www.google.co.in/search?&biw=1600&bih=799&sclient=psy-ab&q=google+share+price&oq=google+share+price&gs_l=serp.3..0l4.148.192.3.270.2.0.0.2.2.0.0.0..0.0.msedr...0...1c.1.60.serp..0.2.11.Jf8jXyUgmDA&pbx=1&bav=on.2,or.r_qf.&bvm=bv.82001339,d.dGY&ech=1&psi=qcGPVJmeJoHGmQXsooDACQ.1418707370733.9&ei=nsOPVJGiI6GgmQW0g4LABA&emsg=NCSR&noj=1
    for more clarifications and information please feel free to reach out to me at [email protected]
    www.twitter.com/mph88

    Hi Manjunath,
    Currently looking into a possible solution although some of the limitations within Power View restrict how close we can get to the ideal result. Still exploring some approaches :)
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com, Twitter:
    @nimblelearn

  • Month,year wise

    month,year wise query.
    Posted: Jan 3, 2012 11:28 AM Edit Reply
    i have from anf to date parameter
    if i enter from date 13-jan-2011 and to date is null (upto as on date )
    i created matrix format.
    but i need the how to print the months in matrix column cell
    ex: dec/2010 jan/2011 feb/2011 mar/2011 .... dec/2011 jan/2012
    based on from and to date parameters.
    we need to start 31/dec/2010
    how to write the query.

    what is the month & year on which you're based, to collect the data?
    Thanks & Best Regards,
    HuaMin

Maybe you are looking for

  • I have to click "save as" to download anything

    If I click a link to download anything from Firefox (which I use) or even Safari it will just continuously load the page without starting to download it. For instance if I try to download a .zip file it will try to load the page in the browser with t

  • Fields in R/#

    Hi Expers, How to know from which Fields in R/3, data is coming to the infoobjets in BW. Thanks in Advance. Krishna.

  • Some photos don't appear in the blog's main page

    All the entries in my blog include a photo and almost always a small version of the picture appears in the blog's main page. Sometimes the small picture does not appear, although it shows up in the individual entry containing the photo. You can see w

  • How to Check Images File Exist? in different server

    Hi, I have 10 different coldfusion server. for example 9 server is for the web application site - for example http://myserverone/studentweb the other one is for images website, just for displaying student picture - for example http://myserverimage/st

  • AppleTV's streaming issues... are there limits ?

    I had 2 appletv's (v2) connected to an iMac (3GHz intel cores i3 with 4 gb of memory) which in turn is hard wired into a linksys router which has an  8TB Buffalo NAS device on it which stores approx 2.5GB of media... mostly movies and TV shows... all