Code to get past months

Hi,
The foll. is the code from the sdn posting for calculating past 12 months from a given date.
data: olddate like sy-datum,
newdate like sy-datum.
clear: olddate, newdate.
now pass given year/period to olddate, then use below function module.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = '-12'
olddate = olddate
IMPORTING
NEWDATE = newdate.
if i want to try out the code that is above to understand how it works, can i just copy paste in se38 and just change the olddate as parameter , so that i can enter a date, will it work or how should i test. can anyone help me here.
Thanks
Ravi
Message was edited by: ravi raj

Hi Ravi
This code will not get the past twelve months . This code will just return a date which is twelve months back.
I.e. say if you pass 01-OCT-2005 it will return 01-OCT-2004.
To get past 12 months you can check for answer in that same earlier post . There is no function you have to write abap. However you can cut / paste and see how this code works.
<b>parameter pdate like sy-datum.
data: olddate like sy-datum,
newdate like sy-datum.
clear: olddate, newdate.
olddate = pdate.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = '-12'
olddate = olddate
IMPORTING
NEWDATE = newdate.
write :/ newdate.</b>
Cheers
Message was edited by: Sanjay Sinha

Similar Messages

  • How to get the planned quantity of past month from md61

    Hi all,
           I couldnt get the planned quantity of past month from the tcode md61.It shows only the current and future month's demand.I want to know the planned quantity of past month's.
    I have checked PBIM,PBED,PBHI tables,here also I am facing the same problem.
        Is it possible to get past month quantity from md61? If No how to know the quantity planned for past month?...Please tel your ideas..
    Thanks in Advance!!!
    Edited by: Ranganayahi Chandirasekaran on Jul 30, 2008 8:17 AM

    Hi,
    You can check History of PIR through MD62 itself.
    Select particular row, Goto Menu, Select Item History(Shift +F6).
    Or
    You may pls execute transaction MD73.
    Plz select option "3 :History Planned ind reqmnts " in the display options and execute the report.
    Regards,
    R.Brahmankar

  • Itunes sync issue cant get past find my iphone page. has been months alr.

    When ever i connect my iphone to my computer, it would bring up itunes but as soon as the iphone page loads this appears:
    Free Find My iPhone
    Set up Find My iPhone for free so you can locate your device if you lose it, remotely lock the screen, or wipe its data. You can also find your iPad or iPod touch. Learn More
    Not Now
    Set up Find My iPhone
    Find My iPhone (or iPad or iPod touch) enables you to locate your iPad with Wi-Fi or iPod touch only when it is on and connected to a registered Wi-Fi network. Find My iPhone is not available in all countries.
    there does not seem to be a way to get past this page and the links are broken too.i have been having this problem for a few months already and when i tried calling apple, they did not know what to do either. i'm hoping someone would have the answer and the solution to this problem.
    Thx

    I had the same problem last night... I solved it but really just got around it.
    background
    - Existing setup was itunes 9.x with an IPOD worked great for many years
    - bought a new iphone 4 monday
    - connected to windows 7 64bit dekstop and got the setup text in itunes for "find my iphone" with two options (jave script links) that were dead links did nothing - you are stuck here
    - tried my other laptop (also already loaded with itunes 9.x same result
    - tried upgrading itunes to 10.2.1 same results
    - wiped the iphone same results
    - removed itunes - used reg cleaner to scrub all references and loaded 10.2.1 itunes fresh from a download (rebooting laptop a lot) Same results
    How i got around it after 5 hours of trial and error
    - I got my laptop that never had itunes installed ever - loaded itunes 10.2.1 and then attached the iphone 4 to sync - it installed a new driver for the iphone and the iphone was successfully connected to itunes. I synced to this itunes without any issues. although there was nothing to sync from this machine.
    - I then took the laptop back to the machine that I had not removed itunes (just upgraded itunes) and it was able to connect to itunes and sync without any issues. I had to be make sure it was defined to this laptops copy of itunes but it works now without issue.
    I can only conclude that the driver or older version of itunes had set the device in a strange state in regards to syncing and establishing connectivity for a sync with itunes and defining it to a new machine with a new install of itunes and having the driver for iphone 4 freshly installed cleared that state it was in.
    More work should be done by the apple engineers to determine technically what the root casuse is but I was able to get around the issue.

  • I wish to reset my ipad.  However, when I selectGeneral Reset Erase all content and Settings, I am prompted for a a Restrictions Passcode (which I have never set).  I have now entered random codes 11 times and the ipad not reset. How do I get past this?

    I wish to reset my ipad (as advised by the Apple Store) to attempt to resolve an issue with a non-responsive part of the screen..  However, when I select General>Reset>Erase all content and Settings, I am prompted for a a Restrictions Passcode (which I have never set).  I have now entered random codes 11 times and the ipad has not reset. How do I get past this?  I am now at the point where I have to wait 60 mins before I can enter another random passcode.  I just want the ipad to clear down, erase everything so I can start again.

    The other option is to force iPad into Recovery Mode.
    http://support.apple.com/kb/HT1808
    Note: You need to be patient and repeat the above many times to recover your iPad

  • What if a person no longer has access to the house in which the card itself, but iTunes recognizes my login, shows my balance, won't let me get past the "code" page?

    What if a person no longer has access to the card itself, but iTunes recognizes my login, shows my balance, won't let me get past the "code" page?

    What pops up is the page that tells me I can use my camera to take a photo - since I don't have access to the card, useless.  I am caught going round in this loop - there's that one button, no other option.  Thanks in advance. 

  • I have been dragging my files to a external drive to have a back-up for them and I lost some of my folders. They just went completely missing. I didn't delete them, and it was all stuff that I have worked on in the past month. How do I get them back?

    I have been dragging my files to a external drive to have a back-up for them and I lost some of my folders. They just went completely missing. I didn't delete them, and it was all stuff that I have worked on in the past month. How do I get them back?

    You really should be doing backups with an actual backup application, especially one that will work automatically, and, if your external HD is large enough, back up your entire system.  These can automatically back up only what's changed since the  previous backup, and some will keep "archive" copies of things you've changed or deleted, also.
    Too many things can go wrong, such as your internal HD failing, and you'll have a major project to reinstall everything.
    You already have Time Machine, built-in to OSX.  You might want to review the Time Machine Tutorial, and perhaps browse Time Machine - Frequently Asked Questions.
    #27 in the second link mentions some alternatives, too.

  • TS3899 I upgraded to iOS 7 and I lost emails that were in my inbox - I used to see all emails that I did not delete, now I only have emails from the past month - how can I get the old, undeleted emails back? Or, at least, show email older than one month o

    I upgraded to iOS 7 and I lost emails that were in my inbox - I used to see all emails that I did not delete, now I only have emails from the past month - how can I get the old, undeleted emails back? Or, at least, show email older than one month old?

    I upgraded to iOS 7 and I lost emails that were in my inbox - I used to see all emails that I did not delete, now I only have emails from the past month - how can I get the old, undeleted emails back? Or, at least, show email older than one month old?

  • I have turned on my phone this morning and it's asking for a pass code when I have never put one in and I can't get past the page help!

    I have turned on my I phone this morning and it is asking for a pass code I have never used one and cannot get past the page can anyone help?

    You won't get a reply on your email here. These forums are for users who want to help other users.
    If you didn't buy your iPhone in your own country and you unlocked it to work in any way, you're out of luck.  If you accidentally setup a passcode check out this old discussion:
    https://discussions.apple.com/thread/3671431?start=0&tstart=0

  • HT3228 IPad 2.   All past months Calendar info disappeared?  From March back?  Why and how can I stop that? Can I get it back?  It is still on my Iphone

    IPad 2
    All past months Calendar info disappeared from March back?  Why and can I get it back?  April and future months info is still there

    Go to "Settings > Mail, Contacts, Calendars > Sync" and set this to "All Events".

  • How do I get past my lock code?

    I briefly lost my phone and turned it to Lost Mode from the Find my iPhone app. When I found my phone, there was a pass code on it. I have no idea what it is and have tried all my codes. Any suggestions how to get past it? Apple support won't tell me or remotely reset it. I can't restore it because it requires me to turn off Find My iPhone in the Settings, which I can't get to because of the pass code. Thanks.
    <Email Edited by Host>

    That won't help, Peter.  Apple can't do anything about a passcode lock.  Activation lock, perhaps, but not passcode lock.  All that can be done is restore the device back to factory settings (and in this case, a remote wipe via www.icloud.com would be easiest.).
    iCloud: Erase your device - Support - Apple
    Erase your iPhone remotely. - Support - Apple

  • How do I get past the pass code on iPad running on Ios7.1 because j have forgotten it and I don not own a computer so it has to be with our a computer

    How do I get past the pass code on iPad running on Ios7.1 because j have forgotten it and I don not own a computer so it has to be with out
    a computer

    Use a friend's computer. Your iPad will be erased.
    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • How to get past country code limit

    Hello Users,
    I want to watch "US" format DVDs on my "European" format MacBook. Message appears: "You may only change the country code seven times!" Is there a way to get past this limit, to be able to use "US" format DVDs unlimited and switch back to "European" format afterwards?
    Do I need a special software or a special external DVD drive? Any suggestions to solve this are welcome! Thanks a lot!
    AliSan

    rip the dvd onto your computer using software such as handbreak and watch it from there? Dont know if it will work but its worth a shot.

  • 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

  • I've spent 6 hours trying to update my iPad, and it doesn't work. It can't get past trying to back up, and just stops and gives an error code. I've deleted the backup, re-synced, and tried again and still no luck. What do I do now?

    I've spent 6 hours trying to update my iPad, and it doesn't work. It can't get past trying to back up, and just stops and gives an error code. I've deleted the backup, re-synced, and tried again and still no luck. What do I do now?

    I am not running any antivirus software on my Mac, and I have the firewall shut off. Any other ideas? I have not problem downloading all other Apple software updates. I downloaded the latest iTunes software before starting the iPad update process.

  • Cannot get past security code on any website

    Trying to apply online to jobs and get to different sites. When the security code pops up, It says it's incorrect!... ***This is on any website, not just itunes.***

    You guys take it real easy:  You just try to humiliate the questioner.
    The same thing happens to me every time a captcha comes up.  On Yosemite (Updated recently and am very happy with it otherwise!) I can try twenty five times, I can try capital letters or small letters and other variations:  No luck.  So I start up Firefox and I get past the captcha on FIRST TRY.  The thing is I do not want to use Firefox; I am more comfortable with Safari.  This did not happen with OS X  / Safari 10.6.8. (pre-update).
    No jokes about Cataracts or new eye glasses or Alzheimer's medicine please!  At least come up with new ones!  But this is a real problem, maybe specific for some machines or something.  Essentially any captcha on any site fails to clear.  I wondered if it has something to do with some security setting; I dug through the settings, but I am only a simple pedestrian user and didn't find anything there.

Maybe you are looking for

  • Lion is super slow! Should I reinstall?

    Hi, I have a 13” MacBook Pro that has a 2.7GHz i7 processor and 4GB of RAM. I bought this June at it came pre-installed with OS X Snow Leopard. In July, I upgraded to Lion and initially, my computer just had the spinning beach ball a lot more, but a

  • HTML View using an iView dynamically

    Hello Visual Composer experts, I want to use a SAP Enterprise Portal iView in a VC Model. For that I use VC HTML View. In the URL I put SAP EP IView reference, for instance : http://<xxx>:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fco

  • Will it ever be possible to send SMS messages at a future time using Siri?

    As Siri can set reminders and make appointments for the diary, as well as being able to write messages and emails, will Siri ever be able to do both and write messages at a future time? For example, "At 5:00pm, tell Kay to put the bin out".  Would th

  • Service object creation

    I was asked to create rules with the following TCP ports: 41000, 41002, 41025. Since these ports did not exists, I just created new TCP service objects. The issue is I put the those ports as source port/range and destination port/range in the Add Ser

  • Heirarchial queries

    hi, create table tree(child int, parent int) How to find the grand parent of the child given the child. 1,2 2,3 2,4 3,5 5,6 Now given 6 how can i find that its grand parent is 1. thanks Pramod null