Method for Saving the attendence data

Dear All,
             We are implementing the HR,MM,FI,SD module and also implementing  the Kronos Time Machine for Time details.
I got the text file in which employee attendence data is mentioned  from the kronos system.Now which way i have to used for upload this information in sap tables or infotype .Because some buddy told we can not used the CATS ,I don't know why.
So now how i can save attendence data and also in which table in sap we have to save that data.Kindly Help me .I am using IT2001,2002 and 2006 infotype for time management
Kindly tell me the procedure for saving the Attendence data it' urg.
Thanks
sandeep
Edited by: SANDEEEP DABRAL on Jun 19, 2009 2:45 PM

Hi
Does your client is using punch in and punch out data. If then then we can store the P10 and P20 data in SAP directly with the help of the integration with 3rd party systems.
If not then just prepare a customized prghramme with the help of ABAP guys to uplad the data in IT 2002 against the absence types.
For this you need to do the Absences customization in SAP R/3
Thanks
Sheetal

Similar Messages

  • What is the best method for saving the client sequence file revision in the database \ report?

    I'm trying to figure out the best way to store the sequence file Revision in the database. That is, if I have the Revision (SequenceFile.AsPropertyObjectFile.Version), where (e.g. what table / field) should I put it if I'm using the SQL Server schema that ships with TestStand?  How do I get it there?
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs
    Solved!
    Go to Solution.

    Ok LabBEAN,
    Here is my tutorial.  It is actually easier than I thought:
    Step 1: Configure>>Database Options and uncheck the Disable Database Logging.
    Step 2: Click the Data Link tab
    Step 3: Make sure the Connection String Expression is pointing to the right location.  Should be a public directory with a .mdb file if you are using TestStand defaults.  Click the View Data button to verify.  It should open the Database Viewer so you can look at the tables.  Leave the Database Viewer open.
    Step 4: Click the Schemas tab
    Step 5: With the Generic Recordset (NI) selected click the Duplicate button.
    Step 6: You should now see a copy of that schema.  In the Name box name it MyRecordset and make sure it is checked
    Step 7: Click the Statements tab and highlight STEP_SEQCALL.  NOTE: you must always do this before clicking on the Columns/Parameters tab
    Step 8: Click the Columns/Parameters tab
    Step 9: Highlight the SEQUENCE_FILE_PATH item and click the Copy Button
    Step 10:  Highlight the new entry and change the Name to SEQUENCE_FILE_VERSION
    Step 11: MOST CRITICAL STEP: Change the Expression to RunState.Engine.GetSequenceFileEx(Logging.StepResu​lt.TS.SequenceCall.SequenceFile, 107, ConflictHandler_Error).AsPropertyObjectFile.Versio​n  It is better to do it this way because you never now where a sequence file call will be made and not all sequence calls are made to the model client sequence.
    Step 12: Hopefully you left the Database Viewer open from Step 3. Go to it.
    Step 13: Right click the STEP_SEQCALL and select Add Column..  Name the new column: SEQUENCE_FILE_VERSION.  Basically you need a column that matches the one you created back in the Columns/Parameters tab.  Set it up with the same type and size.  NOTE: there is an alternate way to do this using the Execute SQL View in the Database Options but you need to create it.  You can create it from the Schemas tab back in TS by clicking the Build .sql File.. button.
    Step 14: Back in TestStand click OK to save and close the Database Options.
    Now run your sequence and you will see the new data in your database.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • User Exit OR Badi for MK01 transaction (used for saving vendor amster data)

    Hi All,
    I have a requirement where I have to call my workflow, when we create the Vendor using my custom transaction (ZMK01, which is a copy of standard transaction MK01).
    For Workflow triggering I am using FM 'SAP_WAPI_CREATE_EVENT' in the user exit  'EXIT_SAPMF02K_001' but this is only for checking the data on saving Vendor Master.
    So I want to use FM 'SAP_WAPI_CREATE_EVENT' at right place. For that , I need User-Exit or BADI which is used for saving vendor master data.
    Could anyone please help me to find out the user exit or BADI for save event of vendor master data using transaction MK01.
    Looking forward to your advise and thanks in advance.
    Best Regards,
    Mamta

    Hi ,
    I forgot to activiate the project linked with User exit 'EXIT_SAPMF02K_001' .
    so problem is solved now
    Thanks,
    Mamta

  • Location/directory used by JRE, for saving the temporary Internet files

    Hello sir,
    I am working on a project( in JavaFX ) which takes the URL of a streaming FLV video( eg: http://sun.edgeboss.net/download/sun/media/1460825906/1460825906_11810873001_09c01923-00.flv ) as input and plays it in Media Player component.
    I have successfully played the streaming video, by taking the aid of sample project, Media Box( http://javafx.com/samples/MediaBox/ ).
    Now I am interested in knowing the location/directory, where these temporary Internet files will be downloaded to. Please let me know, the location/directory used by JRE( on both Windows and Linux ) for saving the temporary Internet files. Also let me know, if there is any possibility of changing that location/directory.
    Thanks for any help, in advance.
    Edited by: prabhakar9885 on Aug 22, 2010 2:29 AM

    You should avoid posting the same message multiple times...
    By definition, streaming is supposed to play the received movie data on the fly, without intermediary file. Now, it depends on implementation, if that's real streaming, etc., so in practice there might be a temp file, or not.
    But this temp location will be, obviously, highly dependent on the current system (even between WinXP and Win7, for example). You can find the answer experimentally, eg. on Windows by using Sysinternals' Process Monitor application (did that to find out where Storage files go), but it is brittle.
    I doubt there is (an official) way to know that from within the JavaFX application...

  • Grouping to display null values for all the missing dates

    Hi SAP,
    I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14       0.00
    20-Jan-14     80.00
    However, my crystal report is showing as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14
    20-Jan-14     80.00
    The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
    Thank you.
    Regards.

    Hi,
    Thanks for your reply.
    Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
    whileprintingrecords;
    if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
    There is another formula field in crystal report to display the missing dates in between as follows:
    whileprintingrecords;
    Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
    Below is my report custom functions:
    Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
    ' This function is only used to display what data is missing within a specified date range...output type is text
    dim thisdate as date
    dim nextdate as date
    dim output as string 'output is the text display
    dim daysbetween as number
    dim looptimes as number
    looptimes = 0
    daysbetween = 0
    output = ""
    thisdate = datevalue(datefield) + 1
    nextdate = datevalue(nextdatefield)
    if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
    do
    if nextdate - thisdate > 1 _
    then output = output + totext(thisdate, format) + chr(10) _
    else _
    if nextdate - thisdate > 0 _
    then output = output + totext(thisdate, format)
    looptimes = looptimes + 1
    thisdate = thisdate + 1
    loop until looptimes = daysbetween
        Days_Between = output
    End Function
    The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
    Regards,
    Ting Wei 

  • File name used by plug-in for saving the image file.

    I have a program that creates a web page that has an object tag with a call to a program and that program delivers a PDF file.  When my users want to save that image the name of the image is a random name.  Is there any way to make the plug-in, Adobe, use the meta tag Title or any other infromation that my program can provide, as image (file)  name to be used for saving the image. (the initial suggested name)?  I really appreciate your help.

    One option is to rename the file after it's been exported using Windows File I/O API.

  • Communication exception occured while saving the thresholds data to the emd

    Hi All,
    I have a 2 node installation of R12 running on HP-UX whereby one node is the application tier and the second node is the database tier....
    I have configured Enterprise Manager Database console on the db tier.
    Am trying to edit the metrics but i keep getting the error below.I have enough disk space and my permissions are setup correctly but am still getting the same error.
    I have tried editing on different browsers but still i have failed.Could anyone please help me out.]
    Error occurred while editing the metric thresholds.
    Communication exception occured while saving the thresholds data to the emd.

    2008-10-20 17:43:35,075 [SeverityLoad http://erpdb.zantel.com:3938/emd/main] WARN jdbc.ConnectionCache _getConnection.303 - Got a fatal exeption when getting a connection; Error code = 17002; Cleaning up cache and retrying
    2008-10-20 17:43:35,075 [SeverityLoad http://erpdb.zantel.com:3938/emd/main] WARN jdbc.ConnectionCache _getConnection.306 - Io exception: Got minus one from a read call
    java.sql.SQLException: Io exception: Got minus one from a read call
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:518)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:767)
         at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:324)
         at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:114)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:694)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:540)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:346)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:324)
         at oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:296)
         at oracle.sysman.util.jdbc.ConnectionCache.getUnwrappedConnection(ConnectionCache.java:423)
         at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:156)
         at oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnectionNoWait(ConnectionService.java:659)
         at oracle.sysman.emdrep.receiver.FxferRecv.markFileAsError(FxferRecv.java:1083)
         at oracle.sysman.emdrep.receiver.FxferRecv.loadSeverities(FxferRecv.java:1216)
         at oracle.sysman.emdrep.receiver.FxferRecv.receiveFile(FxferRecv.java:1509)
         at oracle.sysman.emdrep.receiver.FxferRecv.doPost(FxferRecv.java:820)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:282)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    2008-10-20 17:43:35,192 [HttpRequestHandler-9114403] ERROR eml.FxferRecv doPost.828 - Upload repsonse header :-ERROR-400|Io exception: Got minus one from a read call-

  • Regarding configuration of "Parameters for determining the basic dates"

    Hi All,
    Can anyone give inputs in which scenario we need to use the configuration "Parameters for determining the basic dates".
    1)Do we have any restrictions for usage of above IMG configuration, 2) any pre-requisites to use the configuration of "Parameters for determining the basic dates" and 3)does configuration of this task is having any integration with any other modules, if yes what is the point of integration with other modules.
    Thanks in advance.

    Dear Aditya,
    Parameters for determining the basic dates in production order are used to calculate the Basic Start date & End date of Production order. It Determines if and how the basic dates or the dependent requirements dates are adjusted during lead time scheduling. You can customize this in OPU3 for planned order & OPU5 for Production Order.
    There are the following possibilities:
    1.The basic dates are adjusted and the dependent requirements are scheduled for the start dates of the relevant operations.
    2.The basic dates are not adjusted and the dependent requirements are scheduled for the start dates of the relevant operations.
    3.The basic dates are adjusted and the dependent requirements are scheduled for the order basic start date.
    4.The basic dates are not adjusted and the dependent requirements are scheduled for the order basic start date.
    1)Do we have any restrictions for usage of above IMG configuration
    For scheduling this has to be. If you want that start date should be calculated based on Inhouse production time & not on routing select opetion 2 or 4
    2) any pre-requisites to use the configuration of "Parameters for determining the basic dates"
    Not as such
    3)does configuration of this task is having any integration with any other modules
    Not directly but with MM to determine dependent requirement Proposal.
    Regards
    ABhijit Gautam.

  • What is the best method for saving files off of the hard drive?

    I would like to save music files and photos somewhere other than my hard drive (eg. CDs, DVDs, zip disks). What is the best method for doing this?

    It rather depends on how paranoid you are
    External hard drives protect you from hard disk trouble on your machine.
    Optical media (CD's, DVD's) protect you from trouble with magnetic disks - such as external hard drives and the HD in your machine. Optical disks are thought to be more reliable that magnetic disks for long term storage.
    Off site back-ups will protect you from fire or theft at your home or office.
    How paranoid are you? Personally everything is backed up across three diferent external HD's. And maybe twice a year I burn a copy of my photos onto DVDs and they go to a relative's house across town.
    Regards
    TD

  • Is there a REAL method to create the initial data replica TO A USB DRIVE for DPM 2012?

    I've got several remote office locations with file servers containing a good amount of data, but they have very poor (3Mbps) WAN connections.
    I've been tasked to set up DPM to back up these locations.  Due to the size of the data and the lack of bandwidth, I'm going to need to get the techs out there
    to copy the data portions of the servers onto USB drives and send them to me so I can import them into the DPM storage here.
    But I’m having some problems finding the document that instructs a tech
    how to copy the initial data replica to a USB drive, then docs on how I can import this data.
    I have found this: 
    http://technet.microsoft.com/en-us/library/jj642916.aspxbut
    it talks about server-to-server copying, which previously mentioned is not something we can
    not do due to bandwidth issues.  We need to copy to USB drive, then ship the drive to me for import into DPM.
    There’s some mention of doing this to tape (then importing to DPM) as well, but I can’t find more details either… it’s sort of weird, like the documentation or help
    files on TechNet are incomplete.  Like take a look at this link http://technet.microsoft.com/en-us/library/hh757818.aspx-- it’s
    pretty useless!
    Has anyone done this yet?  Can anyone please point me in the right direction?

    YES - we do this all the time.  In fact we never do the initial replica creation over the WAN.
    Let's say you want to protect the entire D: drive of your server.  Attach the USB drive to the server and use robocopy to copy everything to the USB drive.  Something like (assuming the USB drive is E:) --
    robocopy D:\ E:\ /b /e /r:0
    You don't have to worry about copying permissions and all that stuff to the USB drive. DPM will take care of that during the initial consistency check and will make sure the DPM replica is an exact copy.  (If you DO want to make sure the USB copy has
    the same permissions, add the /copyall switch to the robocopy command.)
    On the DPM server, set up protection for that server's D: drive and make sure you choose the option to do the initial replica creation MANUALLY.  Once protection has been set up, you basically use robocopy again to transfer data from the USB drive to
    the replica path on the DPM server.
    You can find the replica path on the DPM server by going to the "Protection" area of the console and selecting the protected member of your file server (like the D: drive in the above example).  In the bottom pane there will be a "Replica Path" line
    with a hyperlink that says "Click to view details".  Click that and a dialog will open. You can copy the path to the clipboard.  The path will be something like this:
    C:\Program Files\Microsoft DPM\DPM\Volumes\Replica\File System\vol_7a200c36-19b0-4f92-b05b-16458180f0fa\f1295bef-8329-46a4-9761-85e82017603d\Full
    Just use a similar robocopy command to copy everything to the replica path.  Make sure you put quotes around the replica path destination since there are spaces in it.  Once robocopy is complete, you initiate a consistency check in the DPM console.
    That's all there is to it...

  • Webdynpro abap-method for saving updated values in new database table

    Hi Experts,
    I am creating an ALV  application in weddynpro abap where i have given update button to update fields & save button to save values in mastertable,but whenever i am updating & saving ,it will overwrit previous values. For this,I need  to create a separate method to save the updated values of the fields in a new database table.
    Looking forward for solutions.
    Thank You!

    becuase of the below statement u r getting the error
    insert into ZTAB_CS_ISSSAL values Item_Dates.
    u declared the field Item_Dates as Stru_Issuesal-DATES
    and u were trying to inesrting the record in the table ZTAB_CS_ISSSAL with the field Item_Dates
    the error is related to the compatible.
    so declare work area for updating the table should be of type ZTAB_CS_ISSSAL.

  • Question for saving the parameters in order to reload them on the next run of the VI.

    Hello,
    I need your help if it is possible.
    I have an application : Figure1.vi
    For running this vi: first I choice the parameters which I'd like display,for example Courant Isa, Isb, etc..
    and I click on the button Valider for display their respectives curves.
    My question is I'd like to save the last parameters of displaying in order to reload them on the next run of the VI.
    What is the method to save them?
    I think that There are several ways of saving the parameters in order to reload them on the next run of the VI. For my particular case, someone say me that he would recommend usingan .ini file, which can be written using the configuration VI's on the file i/o palette.
    I already See "Write Configuration Settings File.vi" and "Read Configuration Settings File.vi" in the Example Finder for an example of how to do this but I don't know what I must make in my application when I have a graph XY and a multi plot.
    When I click on Enrgistrer:I'd like to save my parameters but when I clik on «Charger», I'd like to reload the last parameters whwen I save.
    Can you help me, please ?
    I send you my files,
    Thannks a lot ,
    Attachments:
    Fig.zip ‏78 KB

    Hello,
    In your case it's perhaps better to use an XML file.
    Connect everything you want to save into and array or a cluster, and then use the "Flatten to XML" and then, "Write to XML File".
    Then in he beginning of you program, use "Read from XML file" and "Unflatten from XML", this should recover the data you previously stored in the file. Connect to the type input of the "Unflatten from XML" the type you created when saving (the array or the cluster of all your data).
    Hope this helps,
    Paulo

  • Photoshop CC on Windows 7 is saving the file "date" as the created date not the modified date

    I have been using a much older version of PS (CS2) and just decided to update to PS CC. I have installed the trial version of PS CC and will begin the CC subscription as soon as the trial expires.
    I have noticed that PS CC saves the (main) date of the files as the "created date" not the "modified date" as it pertains to Windows Explorer and the Windows OS.
    Here is what is happening: I have a file that I created in 2007 that I use for a template. It is sized to specific dimensions, etc. and when I do my save as, it automatically saves into the desired file folder, so that's why I use this as a template. I setup a new photo and then drag and drop it into my template, flatten the image and save as. When doing this with PS CS2, the date for the newly saved file was assigned as the modified date (current date and time). So, when I searched for the file in Windows Explorer or when I went to open the file, the date shown for the file was the modified date. NOW, with PS CC when I perform the exact same process and do a save as, the file date shown in Windows Explorer and/or when I go to open the file is showing as the created date (3/9/2007), the date that I created and saved the template I use. This is aggravating to me because now when I want to open a file and sort by date, the date shown in Windows Explorer is not accurate. As far as I can tell, this only happens in PS CC. When I open an old file with ID CC and do a save as, it applies the current date, not the created date. And, when I was using PS CS2, whenever I did a save as the current date was applied as well.
    In summary, when performing a save as, the created date is being applied as the main date instead of the modified date. The question is: Is there a way to change this so that the modified date can be applied as the main date for the file when performing a save as?

    Below are two files created the exact same way on the exact same computer: the top one was saved in PS CS2 and the bottom one was saved in PS CC. Both were saved using the "Save As" command. You will notice that when the "Save As" command was used in CS2 it updated the "Created:" date, however, in the CC version the "Created:" date was not updated, only the "Modified:" date was updated. Is there a way to update the "Created:" date when performing a "Save As" in PS CC?

  • FICA -IDOC for posting the billing data from NON-SAP ISU system

    Hi,
    Kindly note we are implementing NON-SAP ISU with SAP FICA for the finance implementation. In this context, we ahve identified BAPI for BP and CA. We have decided to go for transaction posting through the transaction FPE1. For this, we are looking for the transaction data IDOC which is CTRACDOCUMENT_ACCOUNT (FICA Posting)  in the WEDI. But it seems that it is not yet released. Can anybody help me out for this to either identify the equivalent IDOC or other method to post the data from Banner system (NON-SAP ISU ) system. We are presently not implmenting billing system in SAP ISU, but only FI system

    Hi,
    you can create the same...
    but normal practice what we do is create swc for each system so that it is easy to maintain and easy to extend in the future..
    or else follow some conventions if you are just starting the things..
    HTH
    Rajesh

  • A script for adding the current date to file name?

    I am working in Indesign CS3. I frequently save file as PDFs into a designated folder. I was hoping for help in writing a script that would apply the current date to the end of the file name, when saved into this folder. Some days, I save the same file several times, into this folder. I was also hoping there was a way to add a date and version, for example "filename_2.25.11(1).pdf" Is this possible? Can someone help me?

    ok, I ended up with this test routine:
    on adding folder items to this_folder after receiving added_items
    tell application "Finder"
    repeat with this in added_items
    my checkifopened(this)
    display dialog (name of this) as text
    end repeat
    end tell
    end adding folder items to
    on checkifopened(this)
    set a to POSIX path of (this as alias)
    repeat until 1 = 0
    ## don't like that one because it relies on an error msg ... so
    (** try
    set b to do shell script "lsof | grep " & quoted form of a
    on error
    exit repeat
    end try**)
    ##so I use this one
    set b to do shell script "lsof"
    if b does not contain a then
    exit repeat
    else
    say "still opened"
    end if
    end repeat
    end checkifopened
    this is a folder action that tests if the added file is still opened by an application... there is no delay between each test-loop since lsof takes some time to execute...
    And after adding a timeout (just in case) to this function the final script looks like this:
    on adding folder items to thefolder after receiving added_items
    tell application "Finder"
    set folderkind to kind of thefolder
    set myfiles to every item of thefolder whose name does not contain "#" and kind is not folderkind
    repeat with myfile in myfiles
    set myfile_datestring to my get_datestring(creation date of myfile)
    set myfilename to name of myfile
    if (count of every character of myfilename) > 4 and (character -4 of myfilename) as text is "." then
    set filestatus to my checkifopened(myfile, 60)
    if filestatus = false then
    display dialog "timeout on folder action"
    else
    set tmp to ((characters 1 through -5 of myfilename) & "#" & myfile_datestring & (characters -4 through -1 of myfilename)) as text
    set myfilename to my checknamewith_pdfsuffix(tmp, thefolder, false)
    set name of myfile to myfilename
    end if
    end if
    end repeat
    end tell
    end adding folder items to
    on get_datestring(mydate)
    return year of mydate & "-" & (characters -2 through -1 of (("0" & (month of mydate as integer)) as text)) & "-" & (characters -2 through -1 of (("0" & (day of mydate as integer)) as text)) as text
    end get_datestring
    on checknamewith_pdfsuffix(n, D, looped)
    --check if filename exists in D
    -- so if "A File.pdf" exists it names it "A File 1.pdf","A File 2.pdf",...
    #n = string of the filename
    #D = file reference to the directory to check
    #looped = boolean used for recursive loop...
    tell application "Finder"
    set thefiles to name of every item of (D as alias)
    end tell
    if thefiles contains n then
    if looped = false then
    set n to ((characters 1 through -5 of n) & "(1)" & (characters -4 through -1 of n)) as text
    my checknamewith_pdfsuffix(n, D, true)
    else
    set tmp to (last word of ((characters 1 through -5 of n) as text) as integer)
    set tmpcount to (count of characters of (tmp as text)) + 5
    set tmp to tmp + 1
    set n to ((characters 1 through (-1 * tmpcount) of n) & "(" & tmp & ")" & (characters -4 through -1 of n)) as text
    my checknamewith_pdfsuffix(n, D, true)
    end if
    else
    return n
    end if
    end checknamewith_pdfsuffix
    on checkifopened(this, mytimeout)
    ## this file reference
    ## timeout in seconds
    set a to POSIX path of (this as alias)
    set startdate to current date
    repeat until 1 = 0
    ## don't like that one because it relies on an error msg ... so
    (** try
    set b to do shell script "lsof | grep " & quoted form of a
    on error
    exit repeat
    end try**)
    ##so I use this one
    set b to do shell script "lsof"
    if b does not contain a then
    return true
    else if ((current date) - startdate) > mytimeout then
    return false
    else
    ##say "still opened"
    end if
    end repeat
    end checkifopened
    to use this save this script in /Library/Scripts/Folder Action Scripts
    and add this as a folder action to your folder...
    The script processes all files inside that folder each time a new files is added...

Maybe you are looking for