Date / Time System fields - inconsistent

This is a weird one...please bear with me
Before I begin...note that this is not a problem that is difficult to fix, I'm just interested in better understanding why the system fields are behaving the way they are.
We have 20 or so programs that use a function module to create a file header that includes a date/time stamp.  The programs also place a trailer with a date/time stamp that should match the one in the header.  However, the programmer used different system fields (after a GET TIME statement) to create the date/time stamp in the trailer.  On occasion, the date/time stamp comes out different. 
Here's the code (sry about all caps):
  GET TIME.
  CONCATENATE SY-DATUM SY-UZEIT INTO BATCHID.
  CALL FUNCTION 'Z_YADAYADA'
       EXPORTING
            FILE_ID              = P_FILEID
            REFRESH_TYPE         = P_REFTYP
            START_PERIOD         = START_PER
            END_PERIOD           = END_PER
       IMPORTING
            STRING255            = OUTPUTSTRING
       EXCEPTIONS
            INVALID_REFRESH_TYPE = 1
            INVALID_BATCH_ID     = 2.
  ...sy-subrc check...
  TRANSFER OUTPUTSTRING TO P_FILE1.  <--header output
  CONCATENATE L_TRL BATCHID COUNT T_TOTAL SPACE
              INTO OUTPUTSTRING SEPARATED BY L_DEL.
  CONDENSE OUTPUTSTRING NO-GAPS.
  TRANSFER OUTPUTSTRING TO P_FILE1.  <--trailer output
inside function module *****
  CONCATENATE: SY-DATLO SY-TIMLO INTO DATESTAMP,
               SY-SYSID SY-MANDT INTO MACHINE_NAME.
  CONDENSE: DATESTAMP, MACHINE_NAME NO-GAPS.
  CONCATENATE C_HDR DATESTAMP FILE_ID MACHINE_NAME
              SY-CPROG ' ' REFRESH_TYPE START_PERIOD
              END_PERIOD DATESTAMP
              INTO STRING255 SEPARATED BY '~'.
  CONDENSE: STRING255 NO-GAPS.
You can see that the function uses SY-DATLO and SY-TIMLO for creation of the header, while SY-DATUM and SY-UZEIT are used for the trailer.  What's wierd is that sometimes the trailer has a date/time stamp that is 1 second <b>greater</b> than the header, despite the fact that it is stored in the BATCHID variable <b>before</b> the header is created.
Any help, references, explanations greatly appreciated (and rewarded with points)
BMV

Hi Brian
Here is the related part from the weblog of ABAP expert Horst Keller. Hope it may help. For the full document, you can visit <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.wcm.compound.docs/library/uuid/f1391fc3-0301-0010-d384-fccd036f1c67">here</a>.
The values of all system fields in this table are implicitly set when the program is started, every time a screen layout of a screen is sent, and when the internal mode is set. The GET TIME command explicitly updates the system fields, except for sy-dayst, sy-fdayw and sy-tzone.
With the exception of sy-datlo and sy-timlo, all system fields refer to the local date and time of the current SAP system. The ABAP runtime environment clock is synchronized with the database server clock at regular intervals in order to calculate the local time of the SAP system. During the synchronization process, the ABAP runtime environment clock is set to the database server clock. Because this happens on all application servers in an SAP system, the ABAP runtime environment clock is synchronous with the clocks on all other application servers and with the database system clock, and thus shows the local time of the entire SAP system. The time zone on which the local time of an SAP system is based is the only entry in the database table TTZCU.
The content of sy-zonlo is taken from the user master record of the current user. The values of sy-datlo and sy-timlo are calculated from sy-datum and sy-uzeit and from the time zone of the SAP system for the time zone in sy-zonlo. If the user master record does not contain a time zone, or if it contains an invalid or an inactive time zone, sy-datlo and sy-timlo are set to the values of sy-datum and sy-uzeit. All valid time zones are defined in table TTZZ.
Is't the naming of sy-datum and sy-uzeit really geeky?
Time Stamps
The above system fields for date and time are not sufficient for many requirements of determining unique points in time: They represent local times and the values are measured in seconds. For more exact date and time determination, you use time stamps.
A time stamp represents date and time in the form YYYYMMDDHHMMSS. YYYY is the year, MM the month, DD the day, HH the hour, MM the minutes and SS the seconds. There is a short form and a long form. In the long form, the format specified above additionally contains 7 decimal places for fractions of seconds, which allows for an accuracy of up to 100 ns. The maximum time resolution depends on the operating system of the application server and may be less.
A valid time stamp must contain values whose date and time specifications before the decimal separator correspond to valid values for the data types d and t. Time stamps in this form are always considered as UTC (Universal Time Coordinated, basis for calculating worldwide time specifications; the UTC reference time is based on Greenwich Mean Time, GMT, but is not a time zone; it has no daylight saving time or summer time) time stamps when processed with the corresponding statements. You use the statement GET TIME STAMP to create a time stamp that represents the current UTC reference time.
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Similar Messages

  • Blank exif date time original field in some files (scanned images)

    I have had some issues with scanned files or psd files where the date time original field does not exist or is blank. Mostly with scanned files. I would like to edit the field and fix the date; but the EXIF doesn't exist on scanned images or is a shorter data set excluding the date time original field.

    Lightroom won't update or insert missing EXIF date fields into master files. However, if you export a file with a date/time edited in Lightroom, it will have valid EXIF date/time fields.

  • How do I add to the list of servers in 'Date & Time' System Preferences?

    Earlier versions of the Mac OS (9 and below, I believe) allowed a user to add to the list of time servers in what was then the Date and Time Control Panel. Now, under OS X (Tiger), I am able to select from the three servers that Apple provides, but I would like to add my own. I am able to paste a new one into the field of the 'Date & Time' preference pane, but it will not be permanently added to the list. There must be a way to do this, no?
    Thanks!

    it will not be permanently added to the list.
    It should stay there as long as you don't change it.

  • Date/Time Field in Access 2000 - INSERT INTO ... syntax error

    I am using Labview 6.1 Professional with the Database Connectivity Toolkit. When I execute this SQL Command "INSERT INTO PRODUCTION (Part, Passed, Date) VALUES ('Part#1', 2, '10/10/2003 10:10:10 AM')" I get a Run-Time Syntax Error. If I remove the Date Label and Date Value it works. What is the proper Format of the Date/Time Type Field in ACCESS 2000 for Labview 6.1 SQL? I have seen and tried all of the solutions already posted like MSG 1ZNAJHJ6.

    Well, if it's any consolation handling dates is a pain regardless of which database you use. In any case, I created a table with the following definition:
    CREATE TABLE testing
    (item1 INTEGER,
    item2 DATE)
    I them did the following insert:
    INSERT INTO testing
    VALUES (1, '18/11/1953 04:20:00');
    And everything worked fine. Note that in the date (my Bday, BTW) the format is DD/MM/YYYY followed by the time.
    What exactly is the error you're getting? Can you post the exact text of the error message. Also, I ran my test using the examples that come with LabSQL--not the toolkit.
    Mike...
    Oops, just noticed something. You have a column name that is probibly a reserved word "Date". Try your insert as:
    INSERT INTO PRODUCTION
    VALUES
    ('Part#1', 2, '10/10/2003 10:10:10 AM')
    If there is only those three columns and they the order the data appears is the same as the column order, you don't need the column list. If this works (and it should--I just tried it) I would only view it as a temporary patch. The column name should be changed.
    This is also a good reason to not use the Access GUI to create tables. If you tried creating a table like that in SQL you would have gotten an error message. Learning to build tables in SQL code isn't hard and it adds an extra layer of error checking that the GUI apparently doesn't think is important.
    If you're interested let me know and I can send you the info on a really good book on SQL...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to find the last update date time and user of record field peoplecode

    how to find the last update date time record field peoplecode?
    Thank you.

    One can check the last update date time using the following query
    SELECT LASTUPDDTTM FROM PSPCMPROG WHERE OBJECTVALUE1 LIKE 'RECNAME' AND OBJECTVALUE2 LIKE 'FIELDNAME'

  • Delivery Date Time spot contains unformated value in PO in Auto PO creation

    Hi Experts,
    We have created a program that fetches the recent changes done in Purchase Requisition documents given as input and updates the corresponding Purchase Order document created from those PRs accordingly. We are using the FM BAPI_PO_CHANGE for the purpose of updating the changes to the POs. We are facing a peculiar situation while updating the scheduling lines. When we are passing the delvery date (EKET-EINDT) change, the system automatically passes the delivery date time spot (EKET-UZEIT) in an unrecognised format, something like '00::0:1' instead of '00:00:00'.  Due to this the system doesn't allow to open the Purchase orders since it is giving format error message. This issue does not happen in debug mode but happens in the foreground without the debug on.
    Please let me know how to go about solving this issue
    Thanks
    Devarajan

    Hi ,
    Thanks for the reply. But the issue is we are not passing any value to the Delivery Date Time Spot field (EKET-UZEIT). So by default when the BAPI_PO_CHANGE FM is called the value passed to this field is '000000'. It is that the system automatically changes the value to '00::0:1'. And it does so only if we execute the program without debugging the code. May be there might be a OSS note to update.
    Thanks
    Devarajan

  • ASN Delivery Date/Time Issue

    Hi
    We are having issue wherein vendor navigates to Create ASN screen from DCM screen there he enters the ASN number, Shipping date and time, quantity and PO number etc. After this he presses the Check button for calculating delivery date and time. Here instead of adding number of hours mentioned in Means of Transport entry to Shipping time, system adds some fix number hours to MoT hours and calculates the delivery time.
    But if vendor directly goes to Create ASN screen then system only considers number of hours mentioned in MoT entry. I want to know from where system is adding this fix number of hours while scheduling delivery date/Time.
    Thanks

    Hi ,
    Thanks for the reply. But the issue is we are not passing any value to the Delivery Date Time Spot field (EKET-UZEIT). So by default when the BAPI_PO_CHANGE FM is called the value passed to this field is '000000'. It is that the system automatically changes the value to '00::0:1'. And it does so only if we execute the program without debugging the code. May be there might be a OSS note to update.
    Thanks
    Devarajan

  • How to write Date/Time property of tdms file

    On the root page of the tdms file, there is a built-in property called "Date/Time" in the first row.
    I would like to use it to save the time stamp when the tdms file is created. But in the help file,
    I only find the following property constant. So, how can I write to the "Date/Time" property field?
    Property
    Constant
    Data Type
    Name
    TDMS_FILE_NAME
    String (char *)
    Description
    TDMS_FILE_DESCRIPTION
    String (char *)
    Title
    TDMS_FILE_TITLE
    String (char *)
    Author
    TDMS_FILE_AUTHOR
    String (char *)
    Thanks for any idea or suggestion.
    Solved!
    Go to Solution.

    Not sure if this is exactly what you want, but have you tried this?
    CVIAbsoluteTime CVItime, *t = NULL;
    TDMSFileHandle deH = 0;
    // Create TDMS file and set some properties
    errChk (TDMS_CreateFileEx (file, TDMS_Streaming2_0, TDMS_ByteOrderNative, 0,"example.tdm", "someText", "title", "author", &deH));
    GetCurrentCVIAbsoluteTime (&CVItime);
    errChk (TDMS_SetFileProperty (deH, "Date/Time", TDMS_Timestamp, CVItime));
    // Save and close file
    errChk (TDMS_SaveFile (deH));
    TDMS_CloseFile (deH);
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Is there a solution to the data/time camera metadata problem?

    After a lot of testing I've nailed down a serious flaw with Lightroom, and I'm wondering if people have any sort of solution, either from within Lightroom or externally.
    When Lightroom is used to export JPEGs, the exported files have the correct Image EXIF data stamped in the Date/Time Original and Date/Time Digitized fields - it matches the date/time of the RAW file, which is exactly what you'd want and expect.
    What it doesn't set correctly though is the JPEG file Created, and file Modified dates - they are set as the date/time the JPEG export was done from Lightroom. There are many applications that sort based on the last modified date of the JPEG, and it's illogical that Lightroom wouldn't have the JPEG file metadata match up with the EXIF data. I can't think of a single scenario where you'd want to have two different time/data stamps in the image that you just exported.
    Using ACDSee I can batch change the JPEG file Created and file Modified dates to match the EXIF data. It's an added step I shouldn't have to do, but I can do it. What I *can't* change in batch mode with ACDSee is the Camera Date/Time time - which, you guessed it, is stamped with the time that the JPEG was *created* during the export, not the time that the camera was set for when the RAW file was captured, which is what it SHOULD be set to. It should be stamped with the EXIF date/time original data. I think I already know the answer to this, but is there any setting in Lightroom that addresses this issue?
    I've seen others recommend EXIFtool but using a command line tool isn't what I consider a reasonable suggestion. Are there any other tools that might help me here?

    Jason -
    <br />
    <br />You mentioned that the CreateDate wasn't set correctly in your files. For my JPGs exported from LR, based on Canon CRW raws, the CreateDate does match the DateTimeOriginal. ExifTool is reasonable enough for me; here is a sample output of ALL the date/time related fields in one of my exported JPGs.
    <br />
    <br />
    <span style='font-size:10.0pt;font-family:Courier'>[File] File Modification Date/Time : 2007:07:28 11:25:31
    <br />
    <br /> [EXIF] Create Date :
    <span style='mso-spacerun:yes'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16 0;&#160;&#160;&#160;&#160;&#160;</span>2007:07:21 15:29:14
    <br />
    <br /> [XMP]
    <span style='mso-spacerun:yes'>&#160;</span>Date/Time Original :
    <span br="" /></span>style='mso-spacerun:yes'&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16 0;</span>2007:07:21 15:29:14-05:00
    <br />
    <br />[XMP]
    <span style='mso-spacerun:yes'>&#160;</span>Date/Time Digitized :
    <span br="" /></span>style='mso-spacerun:yes'&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2007 :07:21 15:29:14-05:00
    <br />
    <br />[XMP]
    <span style='mso-spacerun:yes'>&#160;</span>Modify Date :
    <span br="" /></span>style='mso-spacerun:yes'&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16 0;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2007:07:28 11:25:30-05:00
    <br />
    <br />[XMP]
    <span style='mso-spacerun:yes'>&#160;</span>Metadata Date :
    <span br="" /></span>style='mso-spacerun:yes'&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16 0;&#160;&#160;&#160;&#160;&#160;2007:07:27 14:35:04.062-05:00
    <br />
    <br />
    <br />
    <br />As discussed by other posters, I agree that the ModifyDate needs to reflect the most recent activity on this particular file, and is not related to the original capture time.
    <br />
    <br />Gary

  • Date & Time Disappears Under 10.5

    Hi,
    My brother has just set up his new 20" iMac. We have just discovered that when we connect to his Firewire ATMT external hard drive, the date & time disappear from the menubar at the top of the screen.
    When we open the date & time system preferences and check the 'show in menubar' option, after a few seconds, the box unchecks itself. This only occurs when the hard drive is connected.
    Has anybody experienced the same bug? This bug occurs in 10.5 and 10.5.1.
    Any ideas of a fix?

    Pondini has done an amazing job with TM/TC, I'm always refering people yo his fantastic work.
    http://Pondini.org/TM/FAQ.html
    http://pondini.org/TM/Troubleshooting.html
    Can't imaging something not being covered there.

  • Location in Date & Time

    A while back, (OK, quite a while back), the Map Control Panel allowed one to set the location of one's Mac to a higher degree of precision than the current "Time Zone" tab of the Date & Time System Preference. In short, one could enter the Lat&Lon of your office (or home) and the City and State (for us USA types) and that was a "remembered setting." I was truly hoping that I would not be forced to choose one of 4 "Closest Cities" in the Mountain Time Zone when Leopard rolled out. The city I choose is defaulted to display on my published dotMac Calendars from iCal. I would REALLY prefer to have my real city in here. Any plans to fix this and revert to the good ol' Map Control Panel feature? Or is there a work around someone can suggest? AppleScript communication with a secretly accessible setting? Third party shareware . . . Ideas anyone?

    You can't change it to portrait i'm afraid.
    Hit me on the PM if you want that theme okay.
    Grayburn @ www.nokiausers.net & www.dailymobile.se....come say Hello!!!
    If you appreciate ANY help from a member,then show it by clicking on the Blue Star button, cheers

  • Frustrating date/time settings, (have new battery)

    Hi,
    I have a G5 and notice the date and time settings change while my computer is in sleep mode. It is usually hours behind the real clock, or it is set to a competely new year or date. I replaced the internal battery yesterday, and that did not fix the problem. I zapped the PRAM this morning and this doesn't seem to have helped either.
    Any one got any suggestions?

    Hi
    I expect you've checked already, but presumably the following settings are still correct:
    System Preferences - International - Formats
    System Preferences - Date & Time - Date & Time
    System Preferences - Date & Time - Time Zone
    I guess it's possible you're using a UK date format etc where the day and month are reversed, or syncing with a remote clock in the wrong time zone.
    I could be wrong, but I didn't think the PRAM battery was used in sleep mode, so I'm wondering whether it's resyncing on wake up with a remote clock somewhere on a LAN or the internet that's set to a different time. My date and time is set automatically from Apple Europe (time.euro.apple.com).

  • Date & Time settings

    I have 'Set Date & Time automatically' using one of our Network Time Servers (on our LAN). The time will not update for normal users - only Admin users.
    1. Why can't normal users sync time/date?
    2. How does the OS trigger time/date to sync? Admin users can sometimes be a minute out but the time doesn't sync unless the Date & Time systems preference panel is opened.
    Would appreciate your assistance.

    Hi pjayem, and a warm welcome to the forums!
    Not 100% certain what is causing it, but try going to the Sharing Pref Pane>Firewall Tab, and see if Network Time is checked.

  • How to Convert a 'Time Stamp' field to Date......?

    Hello Gurus:
    I am using a Generic Extractor to pull some stats data.  One of the field is a Time Stamp field, which tells me the date and time of Transaction run.  I only need "Date".  I tried mapping the stamp field to Date info-object hoping for a automatic determination of the Date.... (like the Week, Month happens).   Well, I was wrong! 
    I only need the Date part.  How can I do this in BI?  is teher a specific SAP info-object for this that could be used..?  If not, what would be the routine.  The Date field that comes in is a SAP format... "u201C20,070,505.0000000u201D meaning the Transaction was run
    on 05/05/2007.  How can I get this convertion in BI transaformation??  is there a special Routine...?
    Also, we are trying to use "Time Stamp" based DELTA from a generic extraction.  The field used is a System date with time stamp.  Value looks like u201C20100,505,170,113.2918470u201D, u201C20100,505,170,113.4748820u201D  Every record pulled has a different value... probably giving me the time at which the record was created or generated.  Now, with DELTA specifid on this type of field, what will be the 'Current Status" value in Delta queue?  Is it based on the last record created and will that be the highest value?  For next Delta extraction, does it compare the extraction time stamp to this value and bring in those records that are greater than the 'Current Status" value?  I guess with that we can have as many deltas as we want..... right??  is there any particular setting I should be doing or worried/ careful about setting etc....?
    Thanks for the response in advance....
    Best..... SMaa

    Thanks Akshay,
    Your suggestion worked right away and was probably the easiest of all.  I tried the Function Module that Pravender suggested,
    but it did not return me the date back.... may be because it does not need the Micro Seconds in it....?  Routine as suggested by
    Satyam might work too, but did not go there....! 
    Thanks to all of you.
    Best..... SMaa

  • Automatically displaying date and time in a date/time field on form initialize

    Good day all;
    I am trying to have the current date and time automatically be generated in a “date/time” field when the form is opened.
    I went through the forum and found an entry from Srini “ xfa.host.messageBox("" + Date());” . Of course this brought up a system message box with the date and time.
    I then tried “DateTimeField1.rawValue = (“”+date())… This also gave me a system message box with the date and time…
    Please let me know where I am going wrong
    Chomp

    Found the answer... And yes... in was in the "help" section... What can I say I was making it a lot more crazy than I needed to.
    You can use a date/time field to automatically show the current date by using the Runtime Property option in the Value tab of the Object palette.
    When using a current date field, the date updates to reflect the system’s current date each time a user opens the form.
    1.
    In the Library palette, click the Standard category and drag a Date/Time Field object onto the form design.
    2.
    In the Object palette, click the Value tab and select Calculated - Read Only from the Type list.
    3.
    Select the Runtime Property option.
    4.
    View the form in the Preview PDF tab.

Maybe you are looking for

  • Just got a Movie Box and can't get it to work

    I just purchased a movie box from Pinnacle in hopes of transfering some of my vhs tapes to the computer in a quick and painless fashion. This is proved to be anything but! First of all, even though the box is Mac compatible, the software isn't. And t

  • View issue with Form 9i Web

    I am using Form 9i (Web) and have installed Jinitiator 1.3.1.26 with IE 8.0. on Windows 7. I am getting a very strange issue, when I type any thing on the form, there is no display come, however when I tab to different screen and come back to the sam

  • Shared SO's and Load Balancing

    On Wed, 21 Jan 1998 17:24:33 -0000, Richard Stobart wrote: Dale, If SHARED is true in a Service Object then the Service Object is not re-entrant (because many clients are sharing its variables and therefore is not multitasked (Funny logical naming if

  • Planning 11.1.2.1 validatedata.js

    I'd like to customize all data forms to prevent users from entering numbers with decimal. I want to do that with ValidateData.js. var PRECISION_LIMIT = 0; function limitPrecisionForForm(Form1) {      for (row=firstDataRow; row<numRows; row++) {      

  • Turkish character problem on AFCS

    I want to run an authentication by AFCS through zend_amf and php.  I'm using Tom Krsha's sample service. <?php require_once("afcs.php"); class AFCSService{ public $account; public function __construct(){   $this->account = new AFCSAccount("http://con