How to get last 3 months on basis of sysdate in prompt

Hi,
I am using Fiscal Month in the prompts and the data in the column looks like below
201201
201202
201203
201204
User will select the prompts between months period, like below
Between 201201 and 201204.
My requirement is, I need to default this Fiscal month value to last 3 months, Since we are in February, it should look like this.
Between 201211 and 201301 (which is last 3 months)
Rgds,
Ma

That should be something like
SELECT MONTH FROM "Service - CRM Service Requests" WHERE Time.Date BETWEEN TIMESTAMPADD(SQL_TSI_MONTH,-3, current_date) AND TIMESTAMPADD(SQL_TSI_MONTH,-1, current_date) ORDER BY saw_0
So in each filed you have to put
TIMESTAMPADD(SQL_TSI_MONTH,-3, current_date)
TIMESTAMPADD(SQL_TSI_MONTH,-1, current_date)
Hope this helps, update back
Edited by: Srini VEERAVALLI on Feb 20, 2013 12:37 PM

Similar Messages

  • How to get last 24 months data (if user not enter any kind of information)

    Hi all,
    I am want a report such that
    1. if user does not enter months he has to get last 24 months data(from current month)
    eg1.
    Sales
    currentmonth     300
    currentmonth-1  400
    currentmonth-20 500
    2. if user  enter months he has to get required months data(from current month)
    eg1.assume that user entered the interval of last two months.
    Sales
    currentmonth     300
    currentmonth-1  400.
    friends please me in desinging this query.
    It's very urgent,waiting for responses.
    Thanks,
    James.

    Hi james,
    1. if user does not enter months he has to get last 24 months data(from current month)
    ANS: U have to create variable Of  Currentmonth with The following
             Process Type: SAP Exit
             Variable Represent: Single value
            Variable Entry: Optional
    Check chekboxes for <b>Ready for Input</b> & Can be change in Query navigation.
    b) After this u have to give offsets by restricting this variable
    2. if user enter months he has to get required months data(from current month)
    ANS:
    For this U have to use Process Type: User-exit( User Entry)
    & After that specify the offsets by restriction.
    Thanks,
    kiran.
    Message was edited by:
            kiran manyam

  • How to get last 5 monthly gross salaries of a particular employee

    hi,
    i have a requirement where i need to get the last 5 monthly gross salaries of a particular employee. how can i get the same . please help me on this.
    Regards,
    Shiva.

    Hi Shiva,
    First you shall call the function CU_READ_RGDIR.
    then with the seqnr field of rgdir table, call PYXX_READ_PAYROLL_RESULT
    In the result-inter-rt table get betrg field with the lgart eq '/101'.
    Regards,
    Dilek

  • How to get file name on the base of extension

    hi
    reply me
    how to get the filename on the base of extension from the
    current directory......
    for example
    i create file with the "igg" extension and save in the folder
    where the exe file of director save....
    i want when exe run then exe file read filename of the
    define( "igg" ) extension with out path just name of the file with
    igg extension
    tel me how
    regards
    farhana khan

    Here's a solution that requires no xtras:
    on GetFilesWithExtension(aFolderPath, aExtension)
    -- INPUT: <aFolderPath> should be a valid string
    folder path
    -- <aExtension> may be a string file extension,
    without the
    -- dot. For example: "txt" or "igg"
    -- OUTPUT: Returns an error symbol or a linear list of file
    names
    -- in the given folder. If an extension is given, only
    -- files with the given extension will be listed. If not,
    -- all files and folders will be listed.
    vFileList = []
    if not stringP(aFolderPath) then
    return #stringPathExpected
    end if
    vIgnoreExtension = not stringP(aExtension)
    vDelimiter = the itemDelimiter
    the itemDelimiter = "."
    n = 0
    repeat while TRUE
    n = n + 1
    vFileName = getNthFileNameInFolder(aFolderPath, n)
    if vFileName = "" then
    exit repeat
    end if
    if vIgnoreExtension then
    vFileList.append(vFileName)
    else if the last item of vFileName = aExtension then
    vFileList.append(vFileName)
    end if
    end repeat
    the itemDelimiter = vDelimiter
    return vFileList
    end GetFilesWithExtension
    You can also use
    Buddy API's baFileList,
    which allows you to do wildcard searching.

  • How to get last Build date of a dll in the real time target

    Info On My Project    
       I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...  
    I am facing some problems while checking Build date of my Application file( .dll)
    I have tried to use GetFileDate API. But it is not supporting for realtime Target..
    So i have tried __DATE__ macro.. That also having some problems..
    How to get last Build date of a dll from the real time target  ??
    Please Help to solve this....
    Thanks
    Vaishakh A  K

    Please reply if any one have suggestion...

  • How to get the current month number

    Hi everyone,
    Does anybody know how to get the current month number in Oracle Discoverer Worksheet calculation?
    I try to use EUL_DATE_TRUNC(CURRENT_DATE, 'MM'), but instead I got 01-AUG-00.
    If I change the data display format to MM, it will give me "08" but if I use TO_NUMBER function to convert it to number I get error "invalid number"
    Is there anyway to get the current month value in number? Thanks

    Scott,
    Thank you so much! It works perfectly! :)
    Hope you have a great day ahead!
    Cheers,
    Angeline

  • How to Get the current month at timezone UTC-10

    Hi All,
       can you please let me know How to Get the current month at timezone UTC-10.
    Function module ? which date and time needs to pass.

    Hi,
    Try with following code.
    DATA zdate TYPE  D.
    DATA ztime TYPE  T.
                      CALL FUNCTION 'ISU_DATE_TIME_CONVERT_TIMEZONE'
                        EXPORTING
                          x_date_utc          = sy-datum
                          x_time_utc          = sy-uzeit
                          x_timezone          = 'UTC-10'
                       IMPORTING
                         Y_DATE_LCL          = zdate
                         Y_TIME_LCL          = ztime
                       EXCEPTIONS
                         GENERAL_FAULT       = 1
                         OTHERS              = 2.
                      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                      ENDIF.
    WRITE : zdate, / ztime.
    Thank you,
    Sekhar.

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

  • How to Get last page number in report 10g

    I want to get last page number in report but Current page number found from srw.get_page_num(n)
    but i want to get last page number for conditional formating like this
    srw.get_page_num(current_page)=last_page
    pls help me how can get last page number;
    pls help;
    thanks in advanced;

    Hi,
    you can use the Property Print Object On for this.
    Regards
    Rainer

  • SQL query to get last 6 months records neglect the current month

    Hi All;
    I need help with 
    sql query to get last 6 months records neglect the current month
    Any help much appreciated
    Thanks
    Pradnya07

    SELECT <> FROM tbl WHERE dt >=dateadd(month,-6,GETDATE())
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to get last column used in report sorting?

    hi,
    how to get last column used in report sorting?
    simon

    How to identifiy which column was sorted having different reports on page?
    just use:
    'YOUR_STATIC_REGION_NAME' instead of p_static_id,
    :APP_ID for p_app_id,
    :APP_PAGE_ID for p_page_id
    :APP_USER_ID for p_app_user.
    and dont forget to grant SELECT on #OWNER# to APEX_030200.WWV_FLOW_PREFERENCES$
    good luck and thank you Juergen.Schuster
    Simon

  • How to get  past four month user history?

    Hi ,
    can any one help me.How to get past three month details like login and logoff from oracle database
    Edited by: 849135 on Mar 31, 2011 11:29 PM

    Hi;
    Check our previous discussion thread, if audit mechanisim is not avaliable on your db its ahrd to get all information. But you can get some info from thread which i mention here:
    Whether a DB user account has logged in the Oracle database
    Re: Whether a DB user account has logged in the Oracle database
    Regard
    Helios

  • How to get last date of the week

    hi,
    how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
    thnx

    data : p_week type KWEEK,
    p_Date type SYDATUM.
    p_week = <incoming value in week of year>
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    week = p_week
    IMPORTING
    DATE = p_date
    EXCEPTIONS
    WEEK_INVALID = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To get the last day of the week.
    p_date = p_date + 6.
    You can find the available fm in the system from se37 transaction code.

  • How to get a Job as SAP BASIS Fresher

    Hello Master's,
          I'm Raju Maddu and I'm from Vizag (Visakhapatnam). I have completed my B.Tech in Computer Science and Engineering at 2012. Once I've completed B.Tech, I started my career in the Education industry as System Administrator along with CCNA training at NIIT. And I have 2 years experience in that field.
    I did a lot of research and I found that I have a good career ahead of me in the SAP BASIS domain. I joined a institute and I did the BASIS course. They have provided real time training with the SAP BASIS tools and t-codes & Security. And I have real time experience in SAP BASIS.
    However, I don't have the SAP certification. I'm trying to get in to the SAP basis field. I also don't know how to reach a right contact for getting a job as a fresher in SAP BASIS.
    Please let me know how to get a job as a BASIS fresher. Any help will be very much appreciated.
    Regards.
    Raju Maddu,
    <<removed by moderator>>
    Message was edited by: kishan P

    Hi Raju,
    its somewhat too tough to get a job in SAP as a fresher, but it doesn't mean that it is impossible.
    I will only sujjest you to upload your resume at all leading job-portals, but please search any small
    scale industry, where sap has been implemented, and talk to them (i know its not easy, but never
    loose your hope anyways).
    You have told that, the training institute has provided you real time exposure, but for your kind information, these things are not calculated as a real time exposure in any companies,
    if you work in any organization, then only it will be counted.
    So, search, search and search, untill you get a job, even in starting if salary will be low, just
    catch it, once you will get right exposure, it becomes fruitful for you.

  • Get last august month from current date

    Hi,
    I need to get last august month from current date.
    e.g if current date is 1-OCT-2013 need to get last August date i.e.1-AUG-2013
    e.g. if current date is 1-MAY-2013 need to get last August date i.e.1-AUG-2012

    Something like this?
    SQL> WITH table_x AS(
      2     SELECT SYSDATE dt from dual UNION ALL
      3     SELECT TO_DATE('20-05-2013','dd-mm-yyyy') from dual
      4  )
      5  --
      6  ---
      7  --
      8  SELECT  dt,
      9    CASE
    10      WHEN (dt >= Add_Months(TRUNC(dt,'YEAR'),7)) THEN
    11          Add_Months(TRUNC(dt,'YEAR'),7)
    12      WHEN (dt < Add_Months(TRUNC(dt,'YEAR'),7)) THEN
    13          Add_Months(TRUNC(dt,'YEAR'),7) - 365
    14    END cs
    15  FROM table_x;
    DT        CS
    24-OCT-13 01-AUG-13
    20-MAY-13 01-AUG-12

Maybe you are looking for

  • 11g Upgrade Best Practices

    Hi, We have a SAP ERP 6.0 EHP5 SPS6 with Oracle Database 10.2.0.2 running on AIX 5.3. There is a DR Standby Database available for the Production setup. We need to upgrade the DB to 11g R2. Please let me know if the DB can be upgraded with minimal or

  • Flattening the xml data

    Hi, I have the following XML loaded in the xmltype column. <g1>      <f1>A</f1>      <g2>           <f2>a</f2>           <g3>                <f3>1</f3>                <f3>2</f3>                <f3>3</f3>           </g3>      </g2>      <g2>          

  • Photo uploaded

    I need help with this question, I uploaded a new photo in mail preferences, it worked great... when I check mail, in mail online its the new photo..but not on mail on the desktop? its the old photo. Any help is appreciated. Dolores Belser

  • Satellite P750 - touch buttons have been activated for no apparent reason

    Heya My Toshiba P750/02L001 seems to have this wierd issue where the touch buttons that activate the volume controls / green mode / wifi switch / etc... have been activated for no apparent reason My hands are no where near the proximity, and it only

  • POP mail not being deleted from server

    I am brand new to the MAC world, I just got my first MAC Book Pro Sunday (switching from a PC). I was successful in setting up Mail to connect to my POP mail account (comcast) and everything so far look great, but when I delete an email and remove it