Help to get date before

hi,
i have to get in field the date of six month ago what is the best way to do that?
example.
if now_date = 14.10.07
i wont in l_date 14.4.07
or if now_date = 15.1.2003
l_date = 15.7.2002
Regards

Hi,
There is FM <b>HR_99S_DATE_ADD_SUB_DURATION</b> .This is the sample code.
PARAMETERS: p_date TYPE datum,
            p_months TYPE psen_durmm.
CONSTANTS: c_op TYPE adsub VALUE '-'.
DATA: w_duration TYPE psen_duration,
      w_get_date TYPE datum.
w_duration-durmm = p_months.
CALL FUNCTION 'HR_99S_DATE_ADD_SUB_DURATION'
  EXPORTING
    im_date     = p_date
    im_operator = c_op
    im_duration = w_duration
  IMPORTING
    ex_date     = w_get_date.
WRITE:/ 'Actual Date :', p_date,
      / 'Sub No. of months :', p_months,
      / 'Date :', w_get_date.
reward the points if helpful.
Regards,
Abhijit

Similar Messages

  • Help to  get date before (six month)

    hi,
    i have to get in field  the date of six month ago  what is the best way to do that?
    example.
    if now_date = 14.10.07
    i wont in l_date 14.4.07
    or if now_date =  15.1.2003
    l_date = 15.7.2002
    Regards

    Hi,
    For this logic to work,we will have to use the Offset method for the month as well as the Year part of the date.
    Please refer to the sample code mentioned below:
    data:cur_date type sy-datum.  "Date entered by the user.
    data:wanted_date type sy-datum.    "Date six months ago.
    if suppose the month for the current date is greater than June,i.e from July to December,then the logic should be,
    wanted_date = cur_date + 2(0) - 6.   "Only reduce the month part of the date by 6.
    if suppose the month for the current date is either equal to or less than June,i.e
    from January to June,then the logic should be,
    wanted_date = cur_date + 2(0) - 6.    "Reduce the month by 6.
    wanted_date = cur_date + 4(0) - 1.    "For reducing the year by one as the year also gets changed in this case.
    I hope you understood my point.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • Help, for getting data(photos, songs or vid) from multiple sources.....

    Here is a background of the situation. I've bought my Ipod, October 06. I still don't own a laptop or a PC due to the lack of space of living on a ship(Navy). When I got my Ipod I used a friend's laptop. I installed Itunes on there and was able to import songs I had from my collection of CDs and Photos. Just recently I separated from that command. Now I want to put some new songs and photos I've recently acquired. And I plan to use my girlfriend's laptop. She has her own Ipod therefore already has Itunes installed.
    Now my question is:
    Will I be able to get songs from her Itunes Library(that I've copied from my collection of CDs), AND new photos from her laptop and STILL retain the old songs and photos I already have on my Ipod.
    Thanks!

    heres a more simple answer...YES you can add more songs from your GF laptop or from any PC/laptop for that matter
    Just remember to have oyur IPOD to MANUALLY MANAGE SONGS
    if its in automatic mode, your ipod will be the mirror image of the pc you are syncing in...so if you sync with another pc in automatic, that pc's itunes library will be in your ipod and the old songs will be erased. so be in manual so you could sync from multiple computers.
    As far as pics are concerned, it a totally different matter, you cannot do it manually, since you specify the folder where the pics are stored, it copies whatever is inside that folder and erases the old ones. so pictures in ipod needs to be in just 1 pc, if you transfer to another pc it erases the old ones and brings in the pics from the new pc
    Clear?

  • After upgrading to OS Mavericks, I realized that the Partition for Windows is gone. I have really important data on this drive without a back up. Is there any way I can get this data before reformatting. Is there any third party software for receiving the

    After upgrading to OS Mavericks, I realized that the Partition for Windows is gone. I have really important data on this drive without a back up. Is there any way I can get this data before reformatting. Is there any third party software for receiving the data or any possible way? Money is not a limitation to this fix. Please help!!!

    sure pretty simple.  make a backup of your current settings
    http://support.apple.com/kb/HT1766?viewlocale=en_US
    then restore device from old backup you need pics off of
    then import pics to computer
    http://support.apple.com/kb/HT4083
    you may need to save pics to camera roll first
    then restore the new backup and sync pics back to phone via itunes
    Peace, Clyde

  • Please help.  getting desperate. i cannot set up 3g on my ipad 2. when i go to mobile data in the settings there is no option to view account. which is apprently what i need to click on, any help greatly apprectiated

    please help.  getting desperate. i cannot set up 3g on my ipad 2. when i go to mobile data in the settings there is no option to view account. which is apprently what i need to click on, any help greatly apprectiated

    I got mine (2 weeks ago) 64GB WiFi+3G (Verizon) from the apple store online
    I didnt have to do anything to it, turned it on, activated it, got it on my home network then I signed up for the 3G data service, it works where ever I happen to be. (if there is an unknown WiFi connection available it asks me if I want to join before it continues to connect to the 3G when I am surfing or getting e-mail)
    do you have an Apple Store close enough to travel to?
    I am only assuming here, but since you have a SIM you are not in the US correct?

  • Hi all. I have a factory unlocked iphone 4s. I'm from Belize but i'm going to visit Fort Lauderdale, FLA. How can I get data for my phone? I checked the web and only got 'not sure to don't know' answers. Whoever has done this please help me

    Hi All. I live outside of the USA and have an iPhone 4s. I'm going to Fort Lauderdale, FLA and want to data service for my iPhone ( navigation using google or imaps, browsing and voip ing when no wi fi available). I browsed the net but seems almost impossible. When I visited Toronto I was able to get data thru Koodo but I don't think this is offered in the USA. Anyone who has real experience with this please help. This is a situation that is best aided by persons who have experienced it. Thanks

    Have a look here:
    http://forums.macrumors.com/archive/index.php/t-982315.html

  • Please help to get onhand stock report with last purchase and billed date warehouse and item wise

    please help to get onhand stock report with last purchase and billed date warehouse and item wise

    Hi Rajeesh Ambadi...
    Try This
    SELECT distinct T0.ITEMCODE , t1.ItemName, T0.ONHAND as 'Total Qty',  
      T1.LASTPURDAT ,t1.LastPurPrc
    FROM OITW T0 INNER JOIN OITM T1 ON T0.ITEMCODE = T1.ITEMCODE
    INNER JOIN OITB T2 ON T1.ITMSGRPCOD=T2.ITMSGRPCOD left join ibt1 t3 on t3.itemcode = t0.itemcode and t3.whscode = t0.whscode
    WHERE
    T0.ONHAND>0
    AND T0.WhsCode ='[%0]'
    Hope Helpful
    Regards
    Kennedy

  • Hi apple user. I have lost all iPad safari bookmarks. Tried hold home button with sleep button but it doesn't get back my safari bookmarks. I also have reset without erasing my iPad data but still doesn't work. Help me get back my safari iPad bookmarks.

    Hi, I have lost all iPad safari bookmarks. Have tried reset without erasing data and hold home and sleep button together but when go to safari all safari bookmarks still lost. Is there any case help me get back my iPad safari bookmarks ? Currently my safari is hanged, can't surf webs or anything. I saw the safari tab on iCloud is on, but I don't know using iCloud. Please help me get back my iPad safari bookmarks. I have contact Apple but could not set chat session. I have my Apple ID registered same with iCloud, also same during the time I have all iPad safari bookmarks lost. My iPad never synced on computer since I bought it with set at local store. Please help me get my iPad safari bookmarks back, thanks.

    Hi, I quitted Safari and press and hold the Home and Sleep buttons silmutaneously unti the Ipad turn off and on with the logo Apple appears but it has hanged on and fixed to the point. I do it again hold the Home and Sleep buttons silmutaneously and the Ipad turn off and on again with the Apple logo but it still is hanged on the same point. I have do it a few more time, it still hanged to the same point for few hours with no change (like picture):
    I think my Ipad is fault now. I guess I must connect it to the computer with itune, or something. So my case is this: at the moment everytime I hold the Home and Sleep buttons the Ipad always off and reappear with the Apple logo and be hanged on (like the pic), and I need restoring my Ipad Safari bookmarks... so I guess I need using Itune or something to get back the Ipad then using Icloud or blah. Please guide me for the step, Im not sure if connect to PC, if any that my Ipad data would lost, or is there anyway that I also can get back Ipad Safari Bookmarks after connecting to PC, also the how using Icloud. There is no Apple store or service store in my country so I think I must do it my self. Feel free to share your guide, thanks.

  • Need to Get Data From Siebel On Demand ( I am new to Siebel Please Help)

    Hi All,
    I have a project in which i need to get data from Siebel On Demand and Automate this process.
    I have downloaded the Custom WSDL file and the Schema file from Oracle Siebel On Demand. I am using IDE WSAD and when i import these files into WSAD i am getting an error stating the schema definitions are wrong. Can anyone help me.....
    I need to complete it asap....
    Edited by: user491578 on Nov 11, 2008 6:50 PM

    You should probably ask Advantech. This question really has nothing to do with LabVIEW SE or NI-ELVIS. You could try posting to the LabVIEW board but there have only ever been two posts regarding 'advantech 4716'.

  • Anyone help me ...I am writing to get Date, Month and Year...I got errors

    Could some body help me:
    I am try to get Date, Month and Year
    I got stuck, Anyone help me this:
    public class DateMonth
    public static void main(String[] args)
    toDay = new toDay("February 21, 2002");
    dayofWeek = today.getDay();
    System.out.println("Current month is " + toDay.getMonth());
    System.out.println("Current day is " + getDate());
    System.out.println("Current year is " + toDay.getYear());
    toDay.setDate(toDay.getDate()+60)
    System.out.println("Sixty days from now is ");
    System.out.println(toDay);
    }

    Try something like this:
    import java.util.*;
    public class DateMonth {
         public static void main(String[] args) {
              // Note: 0 = January
              Calendar calendar = new GregorianCalendar();
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
              System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
              System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
              System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
              // 60 days from now
              calendar.add(calendar.DATE, 60);
              System.out.println("\nSixty days from now");
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
    }Remember that January is 0!
    Take a look at the GregorianCalendar class:
    http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html
    Hope this helps!
    DesQuite

  • HT5538 i can't find the facetime on my iphone i was using it before 1 month after that it's just disappear i need your help to get it back . thank you

    hello everyone i need your help please
    i can't find the facetime on my iphone i was using it before 1 month after that it's just disappear i need your help to get it back .
    thank you

    FACETIME MISSING
    The governments in some middle eastern countries have banned Facetime and it is disabled on iphones purchased in those countries.  The countries include KAS, UAE and others.  There is no way to get Facetime on such phones (for example it cannot be downloaded and installed) and taking the phone to another country does not cause Facetime to reappear on such phones. In  support.apple.com/kb/ts3367  it says “Note: FaceTime may not be available, or may become unavailable, on devices purchased or used in certain countries, including Saudi Arabia and the United Arab Emirates. Check your device's region of purchase for more information.”

  • Need help in getting process form data

    Hi,
    We have one IT resource type definition say SSH. We have number of IT resources-abc,xyz of same type-SSH .
    When user gets provisioned to this resource, then in the resource profile, we can see resource name as SSH. In the process form of SSH we can see the IT resource name -abc,xyz
    Now the requirement is I need this IT resource name from process forom of SSH. I have written one java code which sends out an email to application owner when this SSH resource is revoked. But I need to show the IT resource name-abc,xyz in the email to application owners.
    Can anybody help to get the process form data?
    Thanks,
    Kalpana.

    yes, add new attribute to the process form and populate using adapter find below code
    public long getITResource(String itResource) {
              long returnValue = 0;
              String methodName = "getITResource";
              try {
                   tcITResourceInstanceOperationsIntf tcITResourceIntf = (tcITResourceInstanceOperationsIntf)Platform.getService(tcITResourceInstanceOperationsIntf.class);
                   HashMap<String, String> map = new HashMap<String, String>();
                   map.put("IT Resources.Name", itResource);
                   tcResultSet resultSet = tcITResourceIntf
                             .findITResourceInstances(map);
                   if (resultSet.getRowCount() <= 0) {
                        logger.error(className, methodName,
                                  "Following IT Resource not fetched:" + map);
                        throw new Exception("IT Resource not fetched");
                   resultSet.goToRow(0);
                   logger.info(className, methodName, "ITResource determined.");
                   // Got the result
                   returnValue = resultSet.getLongValue("IT Resources.Key");
                   tcITResourceIntf.close();
                   ops.closeUtilityObject();
                   return returnValue;
              } catch (Exception e) {
                   logger.error(className, methodName, e.getMessage());
                   return returnValue;
    pass itResource name as literal in adapter. If it is 10g use tcUtilityFactory instead of Platforml.getService
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get data from the Tables (Can func.module help then how to write )

    Hi,
    Can anyone tell the use of functional module to extract the data from R/3.i am working on PM module and need to extract the status of work order and equipment which i can get from First i had to get objnr then i had to go to jsto in jsto i get stsma and estat. by using estat and stsma i can get status in table tj30t here estat is same as stat in jest table.
    how to get all these in bw . any help.
    I need status of work orders and equipments which exists in tj30t or we can get from tj30 tables in the fields txt30 and txt04
    Any one pls help to get all these stuff from R/3 to BW
    Regards
    Srini-----

    Hi
    You need to enhance (write a user exit) for your Data Source.
    Here are some links on UE:
    Enhancment Framework
    ====================
    SAP Help Enhancment Framework
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Enhancements in sap bw
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
    User Exit Enhancments
    Enhancement
    User exit
    BADI
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Reg's
    Edan

  • Sign in told my firefox out of date did try to do upgrade but could not need help to get my sign in workin email

    sign in told my firefox is out of date. did try to do the upgrade but could not do
    need help to get my sign in working

    Kathleen Beal/funstarling please respond in https://support.mozilla.org/en-US/questions/982953

  • Getting data to show from context in adobe pdf form - Please help

    Friends,
    I need to get data passed to pdf based print form.
    Here are the steps i perfomed to bring the data to the form:
    1) created adobe form layout and context in sfp tcode
    2) created interface in sfp tcode. used a copy of a standard sap interface with the code initialization intact.
    3) dragged fields from interface to context
    4) did default binding in object palette of the form fields in the layout to the respective fields from context
    still, the data is not getting displayed in the form layout when the form is executed, whereas it is getting displayed in the standard form.
    Am I missing something here... Please help me as this is urgent.
    Points will be rewarded for helpful answers.
    Regards,
    John.

    Solved

Maybe you are looking for

  • Recording Fantom G8

    Hi I'm having a problem monitoring throug my macbook pro's headphone output when i'm recording an audio track from my Fantom G connected via USB (functioning as an usb audio interface). My setup for output (macbook) and input (fantom) in Leopard Syst

  • Do not understand the icons in Iphone Camera 5s .....any instruction manual or anything

    I really do not understand most of the icons in the camera mode. Stuff such as HDR, B.  how to take just a single picture without the burst mode activating C,  Having taken a burst mode of say three pictures how to view them all when viewing photo ga

  • Macintosh hd icon

    Is there anyway I can change the icon of macintosh hd on the desktop??

  • Test AP Tx level when Wlan Surveying

    Can ayone confirm what is the industry standard Tx power level for a test AP and when simulating AP for a WLAN survey? I think I read somwhere its 25mW and not 50mW? Thanks

  • Loading an image in from a file

    Hi, I am trying to load an image in from a file, I have found an example using the following code: import java.awt.Image; import java.awt.Toolkit; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; i