FM to find previous date

Hi,
   I have a need in HR, is there any function module which will return me a previous day for a given date
Ex,
     If i entered 1st Aug 06, it should return 31st july 06 or
     if i entered 1st jan 2007, it should return 31st dec 06.
Thanks
Karthik.k

Not sure if there is an Fm like that in HR but u can work it with combination of these Fms.
execute the code with ur input .
parameters: p_date like sy-datum.
data: date1 like sy-datum.
*previous month.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
  EXPORTING
    date            = p_date
    days            = 00      
    months          = 01         "sub 1 month
   SIGNUM           = '-'        "sub
    years           = 00
IMPORTING
   CALC_DATE       = date1. " new date
*write:/ 'Prev month :', date1.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
  EXPORTING
   day_in                  = date1
IMPORTING
   LAST_DAY_OF_MONTH       = date1
EXCEPTIONS
   DAY_IN_NO_DATE          = 1
   OTHERS                  = 2
write:/ 'last date of prevmonth:',date1.
regards,
vijay

Similar Messages

  • When updating my iphone 4s to the new ios 6, it lost all data including photos, contacts etc. itunes now cannot find previous back up. Is there anyway i can get this lost data

    when updating my iphone 4s to the new ios 6, it lost all data including photos, contacts etc. itunes now cannot find previous back up. Is there anyway i can get this lost data

    rebeccakhwar17 wrote:
    Hi
    Can anyone help me please. I've recesally had to take my Iphone to be repaired before I. took my phone i backed up my data into Icloud and when i got my new phone I have lost all my contacts and photos.
    Restore the iPhone from your backup.
    See this -> http://support.apple.com/kb/ht1766
    Then make sure you sync everything to your computer so you do not lose it.

  • Unable to find a data source in RSA5 which can be seen in RSA3.

    Hi there,
    I am unable to find the business content data sources in RSA5, but I can find the same data sources in RSA3 (extract checker).
    I need these data sources to be replicated to BW and take it up further.
    Any light on the above issue will be of great help.
    Thanks in advance.
    Regards.

    Guys
    Regarding my previous messages, None of the posts where working out for me. I Had tried all the possibilites of your messages,but I am facing the same problem
    1. I am unable to find data source in RSA5,But I had find the data in RSA3. Pls let me know how you guys what me to go. It will be really appreciated. pls let me know from ground level how do you want me to dig in to the issue.

  • I need to restore my Ipad from the iCloud, but not from the latest backup.  Can I restore from a previous date?  If so How?

    I went yesterday to the Albany, NY apple store genius bar with a sound issue on the Ipad.  After 2 hours the "genius" told me that
    they tried wiping my  Ipad clean, but not to worry that first everything was saved in the cloud.  I was told I had to reload all
    purchased Apps and would be no charge and would take some time.  Due to the late hour I said I'd do it at home.  I did not do
    it last night.  This morning I open the Ipad  to find nothing in it....no contacts,  no notes....nothing.  I rushed back to the apple
    store and was told that apparently last night a backup took place and the Icloud backed up a clean Ipad....no info.  This is a
    huge problem.  Apple personel simply said sorry that the "genius" should have known better.   Attempts to restore seems to
    only go back to the last backup which of course is blank.  Now my question is .....is it possible somehow with the cloud from a
    previous date like you can with  a PC?

    You can order recovery media here
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00810334&cc=us&lc=en&dlc=en

  • Updated my iphone 4 today to new operating system...said error 50 and i lost all my previous data...there is no back up to get my contacts and photos back although it did say it was backing up first before it installed the new operating system but

    updated my iphone 4 today to new operating system...said error 50 and i lost all my previous data...there is no back up to get my contacts and photos back although it did say it was backing up first before it installed the new operating system but i cant find it anywhere...so frustrated at losing everything

    http://support.apple.com/kb/TS3694#error50

  • Installing iOS 5 erases all previous data

    Installation of iOS 5 erased all previous data on my iPad. Help! Prior to iCloud being in the picture, where were all my photos and documents backed up?
    I am attempting to locate the files which vanished upon updating to iOS 5 - hundreds of pdf files, thousands of uploaded photos, screen shots, saved photos from web, ALL GONE. So were all my acquired apps, although those have been replaced - now I can begin or attempt to reconstitute the complex folder structure (notes, notes 2, notes 3, etc.) which grew over the last few iOS iterations, from too many apps stuffed into folders with strict limitations on contents. Tedious, but possible. Re all the photos, I'm still looking for clues: Is solid state storage similar to that on disk drives – does deleted information still reside on the drive, just not on the index?
    Also, post updating, I am continually being prompted to authorize my computer, even though it is, and my Apple ID is intermittently rejected as if invalid, this is causing syncing challenges.
    Thanks.
    Weary of chasing side effects of upgrading operating systems.

    Same for me, when install was finished all was gone, but strange enough the disk space bar was indicating 14Go other and that was exactly my content "in app" without apps, photos, video and music. So this data was not accessible due to missing apps and all my photo/video/music was gone.
    I had exactly the same issue last upgrade, and last time I decided to resync my media content and started to add apps one by one again, and by magic almost all the apps managed to find back their data in the 14Go "other" that was still in the IPad. But I had to redo a lot of work like Icon position, some settings, and some apps didn't restore well. Took me a very long time and effort to get back to a nominal situation.
    So this time I deciced instead to click "Restore" before doing any sync and used the backup that was generated automaticly just before the upgrade to 5.0 (so still with version 4 of ths IOS)
    The process started, the Ipad rebooted and firmware was then loaded again (still 5.0) and the 14Go data from the backup was reloaded also, and this time after this quite long step, itunes started to restore apps, music, photos and videos one by one ... was quite a very long process but at the end all was perfect, storage was back to 40 Go including my 14Go data and all photos, videos and apps, with all setting perfectly restored.
    Hope this help,
    Patrick

  • International - Can't find previous region

    International - Can't find previous region
    Hello there,
    I changed the region at System Preferences>International>Formats by mistake and now I can't find the previous location.
    The previous one was set to "Argentina (English)" and now I can only find "Argentina (Spanish)"... This changes some preferences that I would like to have as before....
    Any ideas?
    Thank you!!
    Julieta
    PowerMac G5 Dual, 1.8ghz   Mac OS X (10.4.4)  

    Hi Armeen, thanks for your response.
    No, before the currency (yes, under the formats tab) there are other options:
    Region
    Dates
    Times
    Numbers
    Well, I changed the region by mistake, (it used to say "Argentina (English)") and when I wanted to put that back I only found "Argentina (Spanish)" which changes the Dates, Times & Numbers format.
    Hope this is clear, english is not my language.
    Thank you.
    Julieta

  • MRP Lists from previous dates

    I have a question. Here in this factory we are running MD07 to check the exception messages, we typically see a lot of u201CPostpone processu201D messages because the planned order is firmed inside Planning Time Fence but thereu2019s no requirement.
    We want to find out what are those requirements that used to be there and now they are not.
    So Iu2019d like to know, is there a transaction where I can see MRP Lists (from MD05) from previous dates?
    If there is, then I can see at a material numberu2019s MRP list from today, compare it with the one from yesterday, and so on.

    Fernando,
    So Iu2019d like to know, is there a transaction where I can see MRP Lists (from MD05) from previous dates?
    No.  SAP only stores the most recent MRP list.
    Some companies print the MRP lists to a spoolfile immediately upon the conclusion of the MRP run.  MDLD.  The spoolfiles can be configured to be retained for any period you wish, talk to your Basis team.
    To review the contents of a spoolfile, SP01.  It is not a database per se, but an image of the printed report.  For your purpose, it would probably suffice.
    Beyond this solution, you will have to create some customized functionality.
    Best Regards,
    DB49

  • Find Previous row

    Hi All,
    Pls tell me how to find previous row data according to specific condition as follows,
    my table structure like this
    ID NAME SAL
    7 pp 500
    1 aa 100
    2 bb 200
    3 cc 300
    4 dd 400
    1 gg 400
    2 pp 500
    5 qq 700
    1 ql 900
    8 ql 900
    9 al 900
    1 al 700
    I want to select only previous row which is before id 1.
    I want result like this .
    ID NAME SAL
    7 pp 500
    4 dd 400
    5 qq 700
    9 al 900
    Pls help me.
    Thanks & Regards,

    Hi,
    SQL> SELECT * FROM t;
            ID NAME                        SAL
             7 pp                          500
             1 aa                          100
             2 bb                          200
             3 cc                          300
             4 dd                          400
             1 gg                          400
             2 pp                          500
             5 qq                          700
             1 ql                          900
             8 ql                          900
             9 al                          900
            ID NAME                        SAL
             1 al                          700
    12 rows selected.
    SQL> SELECT * FROM t
      2  WHERE  (id) IN (
      3  SELECT id_1 FROM (
      4  SELECT  id,lag(id,1) over (order by 1) id_1 FROM t
      5  ) WHERE id = 1
      6  )
      7  /
            ID NAME                        SAL
             4 dd                          400
             5 qq                          700
             7 pp                          500
             9 al                          900
    SQL>Regards

  • Listing an article on previous dates

    Hi,
    Is there a way I can list an article in a site on previous dates? (I tried using WSP4 and there was an error saying"Listing can be done only on dates >=Current date"). I need to do this to send sample consumption values to the F n R system and generate a forecast.
    Thank You,
    Best wishes,
    Manoj.

    Hi Manoj,
    you find the excel upload tool together with documentation in the info button (as well as other helpful tools) searching via /FRE/TOOLS in F&R. However, these are ment for testing only!!! Moreover, in order to produce a forecast in F&R, there are many things to be considered. I would highly recommend to attend the two F&R workshops W26FRF and W26FRT. See service.sap.com/retail for further information.
    Best regards
    Barbara
    Edited by: Barbara Wessela on Oct 9, 2009 2:57 PM
    Edited by: Barbara Wessela on Oct 9, 2009 2:59 PM

  • Clearing previous data

    Hi All,
            I have some VC models where I am displaying input form in one layer and after submit(Submit Form) I am displaying output layer. The problem i am facing is when user goes back to input screen by back button (History Back) and again enters different data what he sees in the output layer is previous run data until it is refreshed. I want to clear this previous data in output layer immediately when he clicks submit on first input layer.
    Also can we make submit button 'default' so that when users selects all input variables and presses 'ENTER' the form should get submitted. I could not find any such property for the button.
    Has anyone done this? please help me on this, this is a valid and a bit urgent requirement.....

    Hi Satish,
    You got it correct. In first run users selects some input and presses submit to see output layer. Now he clicks on 'back' (history back) button to see previous input layer. He changes some parameters and submits to see 'previous' output layer containing graph and table data for previous selection until the data is reloaded from back end. Instead of this after pressing submit he should see blank chart and table and once data comes from back end it should get displayed.
    I got the point to apply similar technique in blog to my 'Back' button on output layer. but the problem i am facing to 'Clear the output layer' is how should be graph cleared off the data and delete all the rows in table.
    We can clear forms by storing blank values but to graph how should i clear the data it has?
    If you have done this please advise me and correct my thinking if i am getting it wrong...
    Also can you also let me know your thoughts about how can we make submit button get clicked when we press 'Enter'? Usually in HTML and other UI techs we make it 'default' so that it gets clicked when we press enter key....
    waiting for your reply...
    Thanks in advance,
    Swapnil

  • Can not find master data in the cube

    ItemNo is an navigation attribute of 0Material. We are using 0material in a cube. When I display the cube data include ItemNo, I don't find the data I am looking for. For example:
    In 0Material:
    0Material      ItemNo    Description
    AAA                001           Test
    BBB                002           Test
    In the cube I expect to see:
    0Material             ItemNo            On Hand Qty
    AAA                      001                      1000
    BBB                      002                       2000
    Instead I saw:
    0Material             ItemNo            On Hand Qty
    AAA                                                1000
    BBB                                                2000
    0Material got refreshed after cube data got loaded. Is that why I don't find the refreshed Master data?
    Thank you!

    Hi,
    When you laod the cube, the Values for Master are automatically get created in the master data (If they are not present earlier and with "Data Update Type in the Data Tragets" setting in InfoPackage).
    Now when you are loading your cube with 0Material and Item Number, the values for Item Number seems blank. Thats the reason why you are not able to see the Item Number in Cube though it is present in Master. Because now these are two different keys, one with Item Number value and other without Item Number value.
    Regards,
    Yogesh.

  • Issue in clearing of previous data of screen cl_gui_docking_container= free

    Hi All,
    My program displays an idoc list(screen 100). Then if user selects any row in the method
    gets the index no and details of that idoc are displayed in another screen(screen 200) .
    Then control returns to this screen again. Now if user selects any row from idoc list (screen 100) then data is displayed along with data from previous screen .
    In PBO of screen 200 : some code is :
    create object go_docking
              exporting
                dynnr     = '200'
                extension = 65
                side      = cl_gui_docking_container=>dock_at_top.
            create object go_grid_detail
              exporting
                i_parent = go_docking.
    some code
    create object go_custom_cont
              exporting
                container_name = 'DISPLAY_IDOC_CONTENT_200'.
            create object go_grid_detail
              exporting
                i_parent = go_custom_cont.
    some more code
    call method go_grid_detail->set_table_for_first_display
              exporting
                is_layout            = gs_layout
                it_toolbar_excluding = lt_exclude
              changing
                it_fieldcatalog      = fieldcatalog1
    create object go_docking
                exporting
                  dynnr     = '200'
                  extension = 65
                  side      = cl_gui_docking_container=>dock_at_bottom.
              create object go_grid_detail
                exporting
                  i_parent = go_docking.
    In PAI of 200 screen i have used :
    some code      
    free go_grid_detail.
          free go_custom_cont.
          go_docking->free( ).  free go_docking.
    After freeing all data and on call of screen 200 from screen 100 still it shows data from which was there previously on screen 200.
    How can clear all previous data . Even i have free the docking still not working .
    Kindly please help.

    Hi,
    if go_grid_detail is type ref to cl_gui_alv_grid, call go_grid_detail->free( ) before container->free( ).
    Regards,
    Clemens

  • Can't find my data from Time Machine network backup

    Migration assistant shows inconsistent sizes for applications, computer settings and other files/folders, about 30GB when I had 270 GB only in pictures.
    I did a clean Mavericks install.
    How do I find my data from the TimeMachine network backup?
    The size of the TimeMachine backup is consistent with what I had before ( >300 GB)...so how do I recover it?.
    I'm using a new user account name in the clean installation.
    Thanks

    Read a few threads about this being a problem with account access, so I renamed the account in my new installation to the account name used to create the backup and found the old accounts....now when trying to proceed it told me there was a conflict with the account name and i had to use a different one!!.
    Apple has stopped to be simple...
    So how are we suppose to use the migration assistant if either way there is a problem? ( using same or different account name )...

  • Can V find Master data datasource by having Transaction data datasource?

    Hello All
    I have a datasource in r/3 side by this can v find Master data datasource?
    The Transaction datasource is 2lis_02_scl?
    how to find Master datasource for this?
    Many Thanks
    balaji

    AHP hello
    Thanks for info given
    Can v view same for customized datasources also?
    is it possible?
    so for datasource 2lis_11_vaitm,if v click on "Infosource Overview" v can view all the Infosource name,by this v can find our Master Datasource.?
    so for ex.,I can c infosource 0CUST_GRP1,so this is the datasource for Master data from r/3 side?
    Is it correct?
    Many Thanks
    balaji

Maybe you are looking for