Problem with the Date

HI frendz,
      I have to retrieve data considering the date range.I have to check a date in the where condition which should within the last 12 months.So my one interval will be sydatum but how can i get the other interval ie 1 year back date ?? Is there any std function module which gives one year back date if we give the present date. Pls help  me out in this ASAP...

hi
try this
CALL FUNCTION 'BKK_ADD_MONTH_TO_DATE'
  EXPORTING
    months        = -12
    olddate       = sy-datum
IMPORTING
   NEWDATE       = dt_new
dt_new gives u a 12 month previous date
check out my reply in this post for some more function modules...
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://Re: Function module to count periods elapsed
regards,
PJ

Similar Messages

  • Problem with the date conversion

    Hi Friends,
    i am facing the problem with the date conversion,  Actuall my requirement is to pass the date to the screen based on the user setting roles(SU01).
    I have fetched the user setting date format by using the funciton module SUSR_GET_USER_DEFAULTS, The function module picks the exact user date setting (Like as MM/DD/YYYY, MM.DD.YYYY, DD.MM.YY).
    After that i have implemented the FORMAT_DATE_4_OUTPUT funciton module for converting of the user role setting date format into system  date format.
    for the english language case the funciton module FORMAT_DATE_4_OUTPUT works fine but the funciton module not supported for other languages
    Can you please provide the Function Moudle for user setting date conversion.
    The funciton module is most important for us,
    Thanks
    Charan
    Moderator message: date conversion questions = FAQ, please search before posting.
    Edited by: Thomas Zloch on Dec 21, 2010 2:19 PM

    Hope this logic helps you.
    DATA LF_DATE    TYPE DATS VALUE '21122010'. " 21-dec-2010
    DATA LF_DATE_BI(10).
    WRITE LF_DATE TO LF_DATE_BI.  "Now LF_DATE_BI contains the date in user format
    "Now populate the value LF_DATE_BI to the screen field

  • Facing lot of problems with the DATA object  -- Urgent

    Hi,
    I am facing lot of problems with the data object in VC.
    1. I created the RFC initially and then imported the data object in to VC. Later i did some modifications to RFC Function module,and when i reload the data object, I am not able to see the new changes done to RFC in VC.
    2. Even if i delete the function module, after redeploying the IVIew, results are getting displayed.
    3. How stable is the VC?
      I restarted the sql server and portal connection to R3 is also made afresh.... still i am viewing such surprise results..
    please let me know what might be the problem.

    Hi Lior,
    Are u aware of this problem.
    If yes, please let me know...
    Thanks,
    Manjunatha.T.S

  • Spotify and facebook problem with the date

    Hi, everyone.My spotify account have a problem with the date. I changed the date on facebook and nothing happens with that, the spotify account has a wrong date, is not the same as facebook account

    Hi ,
    By default , RFC accept date format of SQL date (yyyy-mm-dd) . If you are using a date picker from WD, it directly set the date in SQL date format. Incase if you are trying to pass date to RFC in some other way you have to convert that into SQL date format before passing.
    if you are passing String date of format dd-mm-yyyy , you try this method to convert that to SQL date and pass to your RFC.
    public java.sql.Date sqlDateConvert( String date)  {
        //@@begin sqlDateConvert()
         java.sql.Date dateObj=null;
         try{     
              StringTokenizer tempStringTokenizer = new StringTokenizer(""+date,"-");          int dd=Integer.parseInt(tempStringTokenizer.nextToken().trim());
                                    int mm=Integer.parseInt(tempStringTokenizer.nextToken().trim());
              mm=mm-1;
              int yyyy=Integer.parseInt(tempStringTokenizer.nextToken().trim());
              Calendar cal =Calendar.getInstance();   
              cal.set(yyyy,mm,dd);                         
              dateObj = new java.sql.Date( cal.getTime().getTime());
         }catch(Exception e)
              return dateObj;
    Hope this will help you.

  • Help In keithley 2400 VI!!(Problem with the data logging and graph plotting)

    Hi,need help badly=(.
    My program works fine when i run it,and tested it out with a simple diode.The expected start current steps up nicely to the stop current.The only problem is when it ends,i cannot get the data log and the graph,though i already have write code for it.Can someone help me see what's wrong with the code?I've attached the necessary file below,and i'm working with Labview 7.1.
    Thanks in advance!!!
    Attachments:
    24xx Swp-I Meas-V gpib.llb ‏687 KB

    Good morning,
    Without the instrument it might be hard for others to help
    troubleshoot the problem.  Was there a
    specific LabVIEW programming question you had, are you having problems with the
    instrument communication, are there errors? 
    I’d like to help, but could you provide some more specific information
    on what problems you are encountering, and maybe accompany that with a simple
    example which demonstrates the behavior? 
    In general we don’t we will be unable to open specific code and debug,
    but I’d be happy to help with specific questions. 
    I did notice, though, that in your logging VI you have at
    least one section of code which appears to not do anything.  It could be that a small section of code, or
    a wire was removed and the data is not being updated correctly (see pic below).  Is your file being opened properly?  Is the data being passed to the file
    properly?  What are some of the things
    you have examined so far?
    Sorry I could not provide the ‘fix’, but I’m confident that
    we can help.  Thanks for posting, and
    have a great day-
    Message Edited by Travis M. on 07-11-2006 08:51 AM
    Travis M
    LabVIEW R&D
    National Instruments
    Attachments:
    untitled.JPG ‏88 KB

  • Problems with the "Date Created" Metadata in Adobe Bridge

    Hi everyone.
    I am currently working on an electronic photo library for our organization.  Part of my mandate is to add a Date Created metadata on all the photos since it is very important to know when the photo was taken.  Some photos were dated since 1980s.  Since we do not have the digital version of the old photos, we end up scanning these and, in effect the date specified on the "Date Created" was the date it was scanned.
    I have the date of some of the old photos when it was taken, but for some, I only have the month and the year (sometimes, just the year).  Inventing a day and a month is not an option.
    Is it possible to enter a month-year or just the year on the Date Created field under Metadata?
    I appreciate your help.
    Thanks,
    .m.u.r.d.o.c.h.

    The problem is that dates are recorded in the file in different schemas. Bridge is displaying the XMP Date Created field which was likely derived from the original Exif date (probably DateTimeOriginal, but may be DateTimeDigitized). This will be the date recorded in the file by the scanner software at the time it was scanned.
    The IPTC Date Created field is handled differently. It seems counterintuitive, but if you work in the news business you will know that news photographers often use the IPTC Date Created field more like a "date submitted" or "date scheduled" property, so that photos for a particular shoot which may have been captured over multiple days will sort together.  Because of this, most image browsers will not update the XMP Date Created (or Date Taken) fields when the IPTC Core date is changed.
    You can edit the original capture date in various programs, which should cause both the Exif and the XMP Date Created fields to be updated. Two that come to mind are Lightroom and BreezeBrowser Pro (for Windows).  I've found that with certain images it is necessary to use both programs to get all the dates to line up.

  • Problem with the data loads

    Hi,
    We have a daily data load to ODS and then to the CUBE. Yesterday what happened is that the load to ODS has been taken place for 140 times and the data is not activated in the ODS. We have deleted the requests from the ODS and did the manual load to ODS and activated successfully. My question is that what causes this job to repeat such many number of times. The jobs log is as follows.
    Job started
    Step 001 started (program ZBIXX_FDA_START_PROCESS_CHAIN, variant ZCUST_DAILY, user ID BWBATCH)
    Chain Is OK
    Chain ZPC_FDA_CUSTDAILY_TRAN was removed from scheduling
    Program RSPROCESS successfully scheduled as job BI_PROCESS_ABAP with ID 05302100
    Program RSPROCESS successfully scheduled as job BI_PROCESS_DROPINDEX with ID 05302100
    Program RSPROCESS successfully scheduled as job BI_PROCESS_INDEX with ID 05302100
    Program RSPROCESS successfully scheduled as job BI_PROCESS_LOADING with ID 05302100
    Program RSPROCESS successfully scheduled as job BI_PROCESS_LOADING with ID 05302101
    Program RSPROCESS successfully scheduled as job BI_PROCESS_ODSACTIVAT with ID 05302100
    Program RSPROCESS successfully scheduled as job BI_PROCESS_TRIGGER with ID 05302100
    Chain ZPC_FDA_CUSTDAILY_TRAN Was Activated And Scheduled
    Chain Is OK
    The same log is repeated for 140 times in the log window.
    Please Advise.

    hi,
    That is not a problem finally the jobs succes right.
    and the thing is it is performance problem suppose first time it take error to study the issue and rectify the first instance it is the best way
    Regards,
    Lakshmi

  • HT3345 Importing from xls problems with the date format (mixed european format)

    Hi.
    I made some spreadsheets with Neo Office and saved them in xls format. So I can import them in numbers, doing so in OpenOffice, LibreOffice or even the worst in Mircosoft Office on a PC works just fine. But importing them with Numbers 2.0.4 it just don't work.
    I have Mac OSX 10.5.8 and a PowerPC G4 1,67 GHz.
    The date format in all other programs is " 21.05.2011" and numbers creates "21/05/2011" out of it. Although my international setting is set to 23.05.2012. It defines the cells as my own format and takes than the totally wrong format.
    Does anyone know how to solve this problem, or how to change all the weird own formats in my international setting, which would be correct.
    Best regards.

    Hi Franklin,
    I used to have similar problem with date too. To make my forms and reports work for all date, I used to send the parameter from forms to the report in text format. In the report, I grab that parameter as "Text Format" (I mean the parameter created in Oracle Reports was really as Character in datatype property) then I manipulate them in my SQL to convert that "date" into real date using TO_DATE function. Usually I use DD-MM-YYYY as my date format.
    Hope this help.
    Regards,
    Franko Lioe
    Hello friends at www.oracle.com,
    when I sent some informations to Reports, one of these informations was a date field. Here, the format mask may vary from one computer to another - some computers here are using american date format; however, my computer was using brazilian date format.
    The fact is that I was sending date information to Reports using the mask dd/mm/yyyy, and Reports (in the computer that uses american date format) couldn't recognize it, stating that I was sending an invalid month. So I had to change my date information to dd-mon-yyyy and Reports could run in the other computer, but doesn't run here anymore - fact that obligated me to change my date format to american format.
    Is there any way for me to use a date format mask that's valid to all computers here? If other computers - with other format masks - meet the same problem, the use of this program may become something very complicated.
    Thanks for all answers,
    Franklin Gongalves Jr.
    [email protected]

  • Problem with the data source and web.xml

    I have an issue where JSC is removing my resource reference:
    <resource-ref>
    <description>Creator generated DataSource Reference</description>
    <res-ref-name>jdbc/localOracleDatabase</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    from the web.xml and sun-web.xml.
    The application has been working great in the IDE for months then wham, no more data source definition. I try and add the reference manually and the IDE takes it out. I am "NOT" adding it to the .xml's in the build area. Why is JSC removing the data source entry?

    This continues to be a problem. The only way that I can get around the problem is to drag a table from the data source onto the design pallete and then the datasource is added back to the web.xml. I can run fine for 10 or 15 runs then the entry is once again removed from the web.xml.
    Help please!

  • Problem with the Date format and sending it to R/3

    Hi all,
    I have an Adaptive RFC application which fetches the data from the R/3 and displays the Employee's Personal Data.
    I am using a ZFM which is customised as per the requirement from the Standard BAPI_EMPLOYEE_GETDATA.
    Now the Problem i am facing is Date is default and Optional Parameter in RFC.
    If i execute the RFC in R/3 without Date it is not filling the Internal Tables. And if i pass the Date it is filling the Internal Table and fetches the Records.
    So in WD application i am inputing Employee FirstName, LastName or the Employee ID.
    User can give any of the above input or combination of FirstName and LastName Or only the Employee ID.
    Now the Main Problem is of Date which is of type Date.
    I have also tried the SimpleDateFormat Class, but i am not able to achieve the result.
    I have also seen the Links and threads on SDN, but unable to solve the problem.
    So pls help me out asap.
    Thanks & Regards,
    Dhruv Shah

    Hi ,
    By default , RFC accept date format of SQL date (yyyy-mm-dd) . If you are using a date picker from WD, it directly set the date in SQL date format. Incase if you are trying to pass date to RFC in some other way you have to convert that into SQL date format before passing.
    if you are passing String date of format dd-mm-yyyy , you try this method to convert that to SQL date and pass to your RFC.
    public java.sql.Date sqlDateConvert( String date)  {
        //@@begin sqlDateConvert()
         java.sql.Date dateObj=null;
         try{     
              StringTokenizer tempStringTokenizer = new StringTokenizer(""+date,"-");          int dd=Integer.parseInt(tempStringTokenizer.nextToken().trim());
                                    int mm=Integer.parseInt(tempStringTokenizer.nextToken().trim());
              mm=mm-1;
              int yyyy=Integer.parseInt(tempStringTokenizer.nextToken().trim());
              Calendar cal =Calendar.getInstance();   
              cal.set(yyyy,mm,dd);                         
              dateObj = new java.sql.Date( cal.getTime().getTime());
         }catch(Exception e)
              return dateObj;
    Hope this will help you.

  • Problem with the "date" field

    Which is the correct way to insert a date in the attribute specified with a "date" type of a table? For example: 02-03-1999, 02-mar-1999, 02/03/1999......or what else?
    Thank you.
    Marco

    Hi,
    Date can be in ay formats you had mentioned.
    You can use to_date or to_char functions to
    manipulate the date in the way you wanted.
    Regards
    Anand

  • Time Zone Problem with the Data

    Post Author: sde
    CA Forum: WebIntelligence Reporting
    We are working on Remedy System. It basically stores all the data for different parts of the world into the database. While storing the date and time information it automatically converts it into PST( Pacific Standar Time ). But the reports to be made should be available to all the users from different time zones and they should see the date and time data as per their time zone. So do you have any idea about how can I convert data available from the database(PST) into the time-zone(will be varying) specific to the user? Is there any feature in WebI which will support this? I have tried with the preference-timezone option but that is not changing the data. Please reply if anyone has any idea.

    Something in your installation has gone awry. It indicates that some program in your PATH is yet using Java 1.3 (maybe you have some java.exe in c:\windows that is using Java 1.3)

  • Problem with the data plug-in ATF

    Hello everybody,
    I am trying to load the attached file with Diadem. Normally, it should open thanks to the plug-in ATFX. However, Diadem manages to load it, but when I go through the channels, they all are empty (NO VALUE). One of my collegue tryed to open it and for him it works... I don't understand what happens. Couls you help me please? Thank you.
    Attachments:
    test03_1_101.ATF.zip ‏58 KB

    Hi ernoult,
    It looks to me like this ATFX file contains the data model and all meta-data (attributes) but references most of the channel (measruement_quantity) values in external files.  My guess is that there are other files on your colleague's computer that start with "test03_1_101" but end with something other than ".atfx".  You need to copy those files to the same folder on your computer that contains the "test03_1_101.atfx" file.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • SQL Developer - problems with the Data Modeller part

    Hi SQL Developer users,
    I can open the Data Modeler pane, but I can't insert any object into the logical model or into the relational model. Any ideas about what I'm doing wrong? Do I need specific privileges to the database, or do I need to install SQL Developer in a different way?
    Thanks,
    Csisz

    Hi Csisz,
    as Ivaylo wrote - it's Data Modeler Viewer into SQL Developer.
    I can't insert any object into the logical model or into the relational modelYou can drag tables from SQL Developer browser and drop them on relational model diagram. If you keep Ctrl key pressed then all child tables also will be imported and shown on diagram.
    Philip

  • Problem with the date field in Table Control

    I have created a table control in my module programming. One of the column in the table control is a date field which is I/O field.
    Now if I enter a value in date field column and hit enter the date field is reset. I dont want the field to get reset and accept valid date field.
    I have set type of the column as DATS and I havent used any dictionary fields. The column is from the internal table in the program.
    Please suggest

    In your PAI, in the LOOP AT <itab> did you
    - check date validity
    - update internal table
    * Sample
    LOOP AT itab.
      FIELD itab-field MODULE checkfield.
      MODULE updateitab.
    ENDLOOP.
    Look also at SAP documentation like [Table Controls|http://help.sap.com/abapdocu/en/ABENTABLE_CONTROL1_ABEXA.htm] or [Table Controls in ABAP Programs|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm]
    Regards,
    Raymond

  • Problem with the date on pictures

    Hi guys,
    I recently added a group of pictures to iPhoto that have the wrong date on them. Apparently the camera was set to January 2007. This now means that these photos are in the wrong order in the library. How do I re organise the files so that they appear in the right order (i.e. at the bottom)? I've already tried highlighting all of the pictures, cliking 'batch change', and changing the date, but that only changes that date that they were added, which doesn't seem to change the order. Is there some sort of re organise button I need or something similar? Is there a way to change the date that the pictures were created? This is really only a small thing, but it is annoying all the same. All help is greatly appreciated.

    It sounds like you have iPhoto '08 - version 7.1.x - go to the iPhoto menu ==> about iPhoto and see is that is not the version you have
    when you did the batch change did you check change originals?
    When you look at the (event if I am right about the version - roll if it is version 6) does it have photos from multiple dates in it
    I think you can select the photos and do a batch change again checking the modify originals this time - or try using the adjust time/data - if it will works after the last attempt you made it does better in that it makes the time correct by adding the delta from the first photo to all photos so after the modification all the photos are correct.
    LN

Maybe you are looking for

  • The use of clean-out orders

    Dear SDN Is it possible to have clean-out orders created automatically, without using campaign management? We do not use campaign management functionality, and the production runs clean-out orders between process orders. We would like to have system

  • EPSON Artisan 810 a Bi-Function, not Multi-Function, All-In-One

    I was in a local OfficeMax, looking at an *EPSON Artisan 810* all-in-one (Print, Scan. FAX, Copy), which came in a box covered with text and imagery detailing all of the amazing features it has. To my delight, I discovered that it supported OS X, alb

  • After 2 years want to change depreciation key for a asset

    Hi, For a particular asset we want to change depreciation key for this asset already we have posted depreciation for 2 years. After 2 years user realizes they are using wrong depreciation key now they want to change depreciation key for a particular

  • Issues in creating Interactive Form UI element at runtime.

    Hi Experts, I have a requirement according to which i need to create multiple PDF forms at runtime.This i need to do using webdynpro Java. The approach that i would be using is creating interactive form U I element at runtime. So in a test applicatio

  • Lightroom not importing all photos from the SD card

    I have been using light room for a month now, importing photos from my Nikon's SD Card. All was going well until today. At first it seemed like lightroom could only see the first 144 photos (up to DSC_0217) as that was all that showed in the lightroo