FM for getting Last 3 years

Hi experts,
   Can any body tell me how to get last three years from current year using FM.
Which function module is suitable for this?
2011- need to get 2008 2009 2010
Thanks in advance,
Veena.
Moderator Message: Basic Date-related questions are not allowed.
Edited by: kishan P on Apr 15, 2011 2:57 PM

at first you need a proper definition what the last three years means.
If i give you todys date 04/15/2011 what do you expect ? 05/14/2008 - 04/15/2011 ? or just 05/14/2008
or maybe really calculated 1096) days back? Do you need a interval or all the days between then and now or what exactly do you need?
Once you know that you will have done a short abap within 5 minutes which does what you need.

Similar Messages

  • I just upgraded my iPhone 3GS to 4.3.5 and my universal doc stopped working with it?  It has worked flawlessly for the last year and suddenly I get the message: "this iphone is not optimized for this device."  The music comes out too quiet to the speakers

    I just upgraded my iPhone 3GS to 4.3.5 and my universal doc stopped working with it?  It has worked flawlessly for the last year and suddenly I get the message: "this iphone is not optimized for this device."  I dismiss the message, but the remote no longer works with it and the music is too quite to the speakers.  The remote works fine with my Macbook Pro.  I tried a restore on the iPhone and started from scrach, but the same problem exists.
    Any help with this?
    Thanks,
    JT

    yep... my iphone 4 also having problem like astoker.. u see on dock pin using torch light.. i found 2 pin touch each other.. i solve my problem ready.. thanks wjosten.

  • HT4972 Did I just lose everything on my IPAD for the last year because it said to update it, not giving an option to back it up first? Its updating with ITunes now but under the RESTORE option.  There was no way out of this.

    My IPAD2 had a pop up message that an update is available, to close or click on details, so I clicked on details. It took me to an upgrade box, no back up options. I clicked to upgrade it.  It downloaded for awhile, then turned off, and when it turned back on, it directed me to plug into my ITUNES with the USB adapter, which I did.  When ITunes came up, it said I had to restore it before I could use ITUnes.  Again, no other options.  I am worried that I just lost everything on my IPAD2 for the last year, apps, photos, documents, settings, email, etc.  It is still downloading after 30 minutes.  Is everything gone and truly back to factory settings?  If so there was no warning for this at all, I'll never get everything back.

    I'm not sure what happned either but If you are doing this via iTunes, iTunes should have backed up the iPad first. It can take a good bit of time when you update with iTunes on your computer because iTunes downloads and installs the entire iOS all over again. If you are running iOS 5 on the iPad, and you will be now, you can update OTA via WiFi in the future and the process takes far less time since you will only be downloading an incremental update.
    If you are syncing on a regular basis with iTunes, you should have a recent backup. In the worst case scenario, you should be able to restore from the backup. And as stated aboce, you can download all apps again and virtually all purchased content from iTunes (if you live in the U.S.) and you can always sync your iTunes library back to the iPad.
    Let the update finish and see where you are then. Come back if you need help.

  • To get last year Net Value by fiscal period

    Dear experts,
    Since yesterday am trying to get solution where still unable to succeed.The report requirement is that they need Planned sales and actual sales qty of current fiscal year/period wise and in first column to get last year Actual sales for same period.(Ex:009.2006 to 011.2006 is input and in first coloumn 009.2005 to 011.2005)
    This is the situation:
    I have kept restricted W2 for fiscal year varient in filter and have created quantity sales(for last year) RKF with variable as "From fiscal year/period-13 and To Fiscal year/period-1"(with offset) and have placed in Key Figure structure in column section.Above this Structure have kept Fiscal year/period info object with variable "From Fiscal Year/period to To Fiscal year/period.This is because i need period wise breakup.
    I understand that above we have "From Fiscal year/period infoobject" and below that in key figure structure u have the above quoted key figure with quantity sales of previous year.I want period wise it has to show me last year(period wise) quantity with current year Planned aty and sales Qty
    Have gone through all threads and now it feels that i should to for variable exit ?...Do i have any option apart from variable exit?...If so could anybody can provide code for the same...Kindly gimme solution.
    Maximum points will be awarded..
    Thanks and Rgds
    Chandru

    Hi,
    I hope, you are entering  values 009.2006 to 011.2006 for the variable "From Fiscal Year/period to To Fiscal year/period". Am I right?
    If so, Donot restrict the fiscal year period with "From Fiscal Year/period to To Fiscal year/period like as you mentioned:--
    <i>Above this Structure have kept Fiscal year/period info object with variable "From Fiscal Year/period to To Fiscal year/period.This is because i need period wise breakup.</i>
    To get the break up Priod wise, taking Fiscal year period characterstics above  the structure is sufficient with ou any restriction.
    Under the characterstic fiscal year period take two KF (same kf called SALES QTY two times with different heading like " last year Actual sales" and "current year Actual sales ") . First KF will be restricted with customer exit varible on Fiscal year period characterstic. Second KF will be restricted with user entry varible on Fiscal year period characterstic.
    In case if you enter the value 009.2006 to 011.2006 as the iput to user entry varible, the code should generate the value 009.2005 to 011.2005 to Customer exit varible.
    With rgds,
    Anil Kumar Sharma .P
    With rgds,
    Anil Kumar Sharma. P

  • I recently bought a new macbook and installed Acrobate Pro. My settings/preferences did not come over and I do not have the same style options for my signature.  It now only allows me three options and the style I have been using for the last year is not

    I recently bought a new macbook and installed Acrobate Pro. My settings/preferences did not come over and I do not have the same style options for my signature.  It now only allows me three options and the style I have been using for the last year is not there.  How do I add additional options and get my preferred signature style back?

    Hi Amanda ,
    Which version of Acrobat are you using?
    Which signature style are you talking about?
    You can go ahead and try uninstalling and reinstalling it and see if that works for you .
    Use the cleaner tool to uninstall it .Here is the link.
    Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs
    You can refer to the following link to re install it .
    https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html
    Regards
    Sukrit Dhingra

  • Using Fiscal/Year Period to get last year all months data

    Hi,
    Had a requirement to get Last Years 1-12 months data based on Fiscal/Year Period. So here i am using Fiscal/Year period as my input. Please let me know with code.
    Regards,
    Vishnu

    Hi ,
    Where you want to write code ?
    Well the basic logic will be like :
    TYPES: BEGIN OF ty_range,
    sign TYPE c LENGTH 1,
    option TYPE c LENGTH 2,
    low TYPE c LENGTH 8,
    high TYPE c LENGTH 8,
    END OF ty_range.
    DATA : t_range TYPE TABLE OF ty_range,
    w_range LIKE LINE OF t_range.
    DATA :v_lastyear type c length 4  .
    v_lastyear = sy-datum(4) - 1 .
    w_range-sign = 'I'.
    w_range-option = 'EQ'.
    concatenate  v_lastyear '001'  t into w_range-low.
    concatenate  v_lastyear '012'  t into w_range-high.
    APPEND w_range TO t_range.
    ****it will select data from source package for last one year .Internally year and period store like YYYYPPP  (2011001)
    select  SOURCE_PACKAGE WHERE 0fiscper  IN t_range.
    you can modify selection statement as per your requirement .
    hope this will be helpful .
    Regards,
    Jaya Tiwari

  • Getting last year sale , this year sale and getting there percentage

    Hi,
    I am using three query in my report
    first query : to get this year actual sales
    second query : to get last year actual sales
    third query : to get target sales
    my first query is
    select t.branch_cd,b.branch_e_name,t.vndr#,v.vndr_name,
    sum(nvl(t.sales_actl_amt,0)) sales_actl_amt
    from inv_sales_trgt_val t,branches b,vendor v where
    t.branch_cd=b.branch_cd and
    t.vndr#=v.vndr# and
    (t.yymm between :fiscal_month and :fiscal_month2) and
    (:fiscal_month<>trunc(:fiscal_month2,-2)) and :fiscal_month2<>trunc(:fiscal_month2,-2)) and t.branch_cd between :from_branch and to_branch and
    t.vndr# between :from_vndr and :to_vndr
    group by t.vndr#,v.vndr_name,t.branch_cd,b.branch_e_name
    order by t.vndr#,t.branch_cd;
    my second query
    select t.branch_cd,b.branch_e_name,t.vndr#,v.vndr_name,
    sum(nvl(t.sales_actl_amt,0)) sales_actl_amt0 ,
    sum(nvl(t.sales_actl_amt,0)) last_year_sales_actl_amt
    from inv_sales_trgt_val t,branches b,vendor v where
    t.branch_cd=b.branch_cd and
    t.vndr#=v.vndr# and
    (t.yymm between :fiscal_month-100 and :fiscal_month2-100) and
    (:fiscal_month<>trunc(:fiscal_month2,-2)) and :fiscal_month2<>trunc(:fiscal_month2,-2)) and t.branch_cd between :from_branch and to_branch and
    t.vndr# between :from_vndr and :to_vndr
    group by t.vndr#,v.vndr_name,t.branch_cd,b.branch_e_name
    order by t.vndr#,t.branch_cd;
    and my third query is
    select t.branch_cd,b.branch_e_name,t.vndr#,v.vndr_name,
    sum(nvl(t.sales_actl_amt,0)) sales_actl_amt ,
    sum(nvl(t.sales_trgt_amt,0)) sales_trgt_amt
    from inv_sales_trgt_val t,branches b,vendor v where
    t.branch_cd=b.branch_cd and
    t.vndr#=v.vndr# and
    (t.yymm between :fiscal_month and :fiscal_month2) and
    (:fiscal_month<>trunc(:fiscal_month2,-2)) and :fiscal_month2<>trunc(:fiscal_month2,-2)) and t.branch_cd between :from_branch and to_branch and
    t.vndr# between :from_vndr and :to_vndr
    group by t.vndr#,v.vndr_name,t.branch_cd,b.branch_e_name
    order by t.vndr#,t.branch_cd;
    in second query i am created two summary column and one place holder column and one formula column to get the percentage % :
    cs_3=sales_actl_amt
    cs_4=last_year_sales_actl_amt
    cp_2
    cf_1(example :cp_2=cs_3/cs_4)
    I am getting all 100 percentage.
    in the third query i created two summary column and one place holder column and one formula column to get the percentage % :
    cs_1=sales_actl_amt
    cs_2=last_year_sales_trgt_amt
    cp_1
    cf_1(example :cp_1=cs_1/cs_2)
    Here i am getting correct percentage
    I need to get cf_1 percentage but it is getting 100 for all
    its urgent please help.
    thank you.

    Create three restricted key figures.
    In one restrict month by current month.
    In other use offset of -12 and -24 while restricting current month.

  • New Releases Section is the same for the last year

    As the title says the "New Releases Section" in the "Browse" all the platforms (desktop, android, web and iOS) is absolutely the same for the last year. It is never updated but why as I can clearly see my album notifications from artists I follow? Is this section a "sponsored" artists only secrion, whats the deal here? Here is a screenshot of how the section looks today 30.4.2015, notice that Rammstein which added their music almost and year ago is still occuping most of the space.

    You will not believe the response I got, I am waiting on an escalated response as what they told me is unacceptable at least for me. I will remove the Spotify support person's name as it is not his fault and I don't want to get anyone in trouble for a bug that he/she did not make: Hi ...,
    Thanks for your feedback. You mentioned that you're still seeing the same artists from last year in the New Releases section.
    Can you please try to login Spotify using these details and tell us if you're still seeing the same artists/albums?:
    Username: ...
    Password: ...
    Let us know right away if you are seeing new artists and albums. If you are, then creating a new account may be necessary.
    We'll wait for your response.
    Have a nice day, to that I responded: When I log-in with that test account the New Releases is different and is up to date. Are you serious that I need to create a new account to fix this, this is unacceptable. I WILL NOT leave my entire music library and my premium subscription history in order to fix a clear bug in your system, I am better of leaving Spotify all together. Please escalate this issue to your managers as it is again UNACEPTABLE to require me to create a new account to resolve a clear bug in your system, what is next if this gets stuck again down the road in 3 months will you ask me to create new account again, till what end. I am shocked at this. I have not idea what is happening at Spotify quarters but the last 5 months have been a pure pain, starting with the 10 000 limit of Your Music, than the 1.0 desktop version disaster and now this absurd "solution". I have been a loyal paying customer for over and year and now I feel like I wasted this time supporting a company that was not worth it. Edit: If such an issue cannot be resolve by Spotify and the only solution is to create a new account I can't even imagine what "spaghetti code" is the core implementation of their service.

  • How to get Last Year Sales and YTD Sales without using AGO and TODATE?

    Hi all,
    I have got Company and Time dimensions and Sales Fact. My requirement is to get Last Year sales for each company without using AGO function and YTD without using TODATE function. (Due to performance issue as AGO and TODATE do not insert a Cache entry).
    Can someone please help me to achieve my requirement? Thanks in advance.

    Hi Satya,
    Thanks again for your reply. To start with I don't have data for the years 2012 and 2011 to test as I am using SH sample schema from Oracle. I have applied your solution but it does not seem to be working for the previous years like 2000, 2001. My requirement is to have a dashboard prompt "YEAR" and let the user choose whatever year he wants.
    Please have a look at the column formulas of my analysis (As per your solution) :
    ***here B_YEAR is replaced by CALENDAR_YEAR.  
    Amount: "F1 Sales"."Amount"
    AmountYTD:  FILTER("F1 Sales"."Amount" USING "D1 Time"."CALENDAR_YEAR" =YEAR(CURRENT_DATE))
    Amount LY: FILTER("F1 Sales"."Amount" USING "D1 Time"."CALENDAR_YEAR" =YEAR(CURRENT_DATE)-1)and the physical query generated by BI Server: (as you can see I have got a filter CALENDAR_YEAR= 2000)
    WITH
    SAWITH0 AS (select sum(T1074.AMOUNT_SOLD) as c1,
         sum(case  when T1035.CALENDAR_YEAR = TO_NUMBER(TO_CHAR(TO_DATE('2012-05-03' , 'YYYY-MM-DD'), 'yyyy'), '9999') then T1074.AMOUNT_SOLD end ) as c2,
         sum(case  when TO_NUMBER(TO_CHAR(TO_DATE('2012-05-03' , 'YYYY-MM-DD'), 'yyyy'), '9999') - 1 = T1035.CALENDAR_YEAR then T1074.AMOUNT_SOLD end ) as c3,
         T1035.CALENDAR_MONTH_DESC as c4,
         T1035.CALENDAR_YEAR as c5,
         T1035.CALENDAR_MONTH_ID as c6
    from
         TIMES T1035 /* D1 Time */ ,
         SALES T1074 /* F1 Sales */
    where  ( T1035.CALENDAR_YEAR = 2000 and T1035.TIME_ID = T1074.TIME_ID )
    group by T1035.CALENDAR_MONTH_DESC, T1035.CALENDAR_MONTH_ID, T1035.CALENDAR_YEAR)
    select distinct 0 as c1,
         D1.c4 as c2,
         D1.c5 as c3,
         D1.c1 as c4,
         D1.c2 as c5,
         D1.c3 as c6,
         D1.c6 as c7
    from
         SAWITH0 D1
    order by c3, c2 Thanks in advance.

  • Any function module for getting fiscal year week numbers

    can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
    Thanks!
    Lakshmikandh

    hi,
    Use FM <b>'DATE_GET_WEEK'</b>...
    parameter D1 LIKE SCAL-DATE.
    Data w like scal-week.
    CALL FUNCTION <b>'DATE_GET_WEEK'</b>
    EXPORTING
    date = D1
    IMPORTING
    WEEK = W
    EXCEPTIONS
    DATE_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.
    write W+4(2).
    Regards,
    Santosh

  • For the last year, I have to refresh my browser to load certain normal pages...IE opens them, but not Firefox. I also have extreme difficulties loading video from sites including YouTube, Yahoo, etc. I open them in IE just fine. I update all the time.

    For the last year, I have to refresh my browser to load certain normal pages...IE opens them, but not Firefox. I also have extreme difficulties loading video from sites including YouTube, Yahoo, etc. I open them in IE just fine. I update all the time.

    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"<br />
    "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"<br />
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    Your plugins list shows outdated plugin(s) with known security and stability risks.
    *Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)

  • I have a wd my passport which for the last year i was using with my windows pc...but recently i bought a macbook and was trying too put files on it but it wouldnt work....please help!!!

    i have a wd my passport which for the last year i was using with my windows pc...but recently i bought a macbook and was trying too put files on it but it wouldnt work....please help!!!

    Hi
    You need to find the format of the drive by looking at its info, my guess would be you are currently in NTFS (windows only) mac can use any mac os journaled or non journaled, or you can use fat32 which is usable on both pc and mac but is unable to move files over 4GB so no good for large file transfers. You will need to re format at some point but this will delete everything currently on the drive.
    Hope this helps

  • Getting last year column value from a single table

    I am having the following columns in my table
    BRANCH_CD
    YYMM
    VNDR#
    VGROUP#
    SALES_TRGT_AMT
    SALES_ACTL_AMT
    CUM_TRGT_AMT
    CUM_ACTL_AMT
    i need to get sales_actl_amt from this year and sales_actl_amt from last year from a single table
    pls help
    thank you
    Edited by: 960991 on Nov 19, 2012 11:13 PM

    Hi ashish,
    but i can't use unions in my reports.
    once view my query :
    select t.branch_cd,b.branch_e_name,t.vndr#,v.vndr_name,
    sum(nvl(t.sales_actl_amt,0)) sales_actl_amt
    from inv_sales_trgt_val t,branches b,vendor v where
    t.branch_cd=b.branch_cd and
    t.vndr#=v.vndr# and
    (t.yymm between :fiscal_month and :fiscal_month2) and
    (:fiscal_month<>trunc(:fiscal_month2,-2)) and :fiscal_month2<>trunc(:fiscal_month2,-2)) and t.branch_cd between :from_branch and to_branch and
    t.vndr# between :from_vndr and :to_vndr
    group by t.vndr#,v.vndr_name,t.branch_cd,b.branch_e_name
    order by t.vndr#,t.branch_cd;
    how can i get last year sales_actl_amt .

  • What is the table name for getting Last Receipt  & issue date of material?

    Hi Friends,
    What is the table name for getting Last Receipt  & issue date of material?
    *Case 1:*
    Here, I am running report in May 2008. But, if there is no goods receipt for the respective material since last 13th March 2007.
    Then in this case Last goods receipt date should be 13th March 2007.
    Please guide me.
    Regards
    Siva

    I checked MSEG table. But, I didn't find any field for date.
    Can you tell me field name.
    Regards
    Siva

  • How can I view my iTunes purchase history for the last year?

    How can I view my iTunes purchase history for the last year?
    (My account in the iTunes store will only give me my RECENT purchases)

    Sign into your Account > Click on your account name > Click on Account > Purchase History
    iTunes Store & Mac App Store: Seeing your purchase history and order numbers - http://support.apple.com/kb/HT2727
    Direct link - https://phobos.apple.com/WebObjects/MZFinance.woa/wa/purchaseHistory

  • Can I view/print a log of my phone calls for the last year?

    How can I view/print a log of my phone calls for the last year without going into each of my individual monthly bills?

        tinaro, managing your account online at My Verizon is easy breezy. You can view and print your call details for the last 12 months. However, I apologize that you will be required to access these records from your previous billing statements. For your convenience, you may click here to access your account online: http://bit.ly/xB4iTc
    LasinaH_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • CS 4 Tabbed view and moving layers b/w documents

    I want to know if it's possible to select a layer from the layer palette start dragging it and move it to another open document while in tabbed view. It is possible when each document is in a separate window. I am on OS X 10.4.11 with CS 4 11.0.1 Tha

  • Creating a Seamless Pattern

    OK, I figured out my problems with creating a patter from a JPEG! Woo Hoo! However, I'm wanting to create a pattern that will not have seams in it. For instance, I'm filling a path that is about 12 inches by 12 inches with the pattern I created, but

  • Handling table control in lsmw

    hi, i need a help to handel table control in lsmw. i have created two source structure zheader and zitem. then at the time of maintain structure relations its taking only one structure . means i am able to assign only zheader structure. how can i ass

  • I posted a question. How and where do I find the answers.

    Where do I find the possible answers to my question.

  • Help with updating adobe flash player

    I am using a macbook pro (safari) and trying to update my flash player but I can't seem to have any luck. I am on the webpage to download the player and when I double tap on the icon to install the player it takes me to a webpage which seems to be a