Script help for dated folder/file

would anyone mind helping me finalize an issue i have been needing to finalize? i have gotten some help on creating a script that creates a file or folder with the current date but i am not technically competent enough with applescript or chron or any of these things. i can handle terminal pretty much but some of the explanations while obviously complete have got me confused.
can anyone take a look at the first one here and just tell me how to get off the blocks with this?
apparently i need to /copy/ and paste the text into a text editor and save as a .pl file by converting the file extension or is this wrong? it seems to me like the next step is in terminal so with a question or two i am sure i can handle this second part...
https://discussions.apple.com/message/18109918#18109918
this is another version but the first seems like i have more editing control or may be more direct for my needs(?).
https://discussions.apple.com/thread/3526097?start=15&tstart=0

Well, since you have issues with copying, pasting, and saving a file in the GUI, the second option may be your best choice. Setting up crontab requires some proficiency using the vi text editor.

Similar Messages

  • Startup shell script help for newbie?

    New to UNIX (linux)... need the bash shell script commands for my r.c local file to start my services when server boots.
    I got my ds, dps and admin server in their respective /opt directories. I need the shell commands to have these start. Of course I can start them manually but when I try a line like this in a script, it doesnt work:
    ./var/opt/sun/directory-server/slapd-dsserver/start-dsserver
    Some path problem or dot thing?

    There are a few other things you may want to consider, such as what the default browser is, are tabs being used, is the page loaded yet, etc, but Safari has a do javascript command in it's scripting dictionary. The following script will open a new document and run your specified javascript, or you can go to their NPR Program Stream Page and download a playlist that will run directly from iTunes.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 335px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    set my_script to "NPR.Player.openPlayer(2, 0, '03-21-2008', NPR.Player.Action.PLAY_NOW, NPR.Player.Type.PROGRAM, NPR.Player.Mode.LIVE)"
    tell application "Safari"
    activate
    set the URL of the front document to "http://www.npr.org/"
    if my page_loaded(20) is false then error numner - 128 -- page not loaded in time
    do JavaScript my_script in document 1
    end tell
    on page_loaded(timeout_value) -- from http://www.apple.com/applescript/archive/safari/jscript.01.html
    delay 2
    repeat with i from 1 to the timeout_value
    tell application "Safari"
    if (do JavaScript "document.readyState" in document 1) is "complete" then
    return true
    else if i is the timeout_value then
    return false
    else
    delay 1
    end if
    end tell
    end repeat
    return false
    end page_loaded
    </pre>

  • F4 Help for Selecting a File in WD ABAP

    HI,
      What is the method, or FM that is available for selecting a file in WD ABAP.
       method FILE_OPEN_DIALOG is not working as it required GUI.
    Thanks
    Mahesh

    Hi ,
    THIS SHOULD UR PROBELM
    data: ifiletable type filetable.
    data: xfiletable like line of ifiletable.
    data: rc type i.
    selection-screen: begin of block blk with frame title text-001.
    selection-screen : skip 1.
    parameters : u_file like rlgrap-filename.
    selection-screen : skip 1.
    selection-screen : end of block blk.
    initialization.
      h_repid = sy-repid.
    at selection-screen on value-request for u_file.
      call method cl_gui_frontend_services=>file_open_dialog
       EXPORTING
         WINDOW_TITLE            =
         DEFAULT_EXTENSION       =
         DEFAULT_FILENAME        =
         FILE_FILTER             =
         INITIAL_DIRECTORY       =
         MULTISELECTION          =
        changing
           file_table              = ifiletable
           rc                      = rc
         USER_ACTION             =
       EXCEPTIONS
         FILE_OPEN_DIALOG_FAILED = 1
         CNTL_ERROR              = 2
         ERROR_NO_GUI            = 3
         others                  = 4
      if sy-subrc eq 0.
        read table ifiletable into xfiletable index 1.
        if sy-subrc = 0.
          u_file = xfiletable-filename.
        endif.
      else.
      endif.
    start-of-selection.
      clear : file ,count.
      move u_file to file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
          filetype                = 'ASC'
        HAS_FIELD_SEPARATOR     = SPACE
        HEADER_LENGTH           = 0
        IMPORTING
        FILELENGTH              =
        HEADER                  =
        changing
          data_tab                =  i_text_file[]
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17
      if sy-subrc <> 0.
               MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    loop at i_text_file ..
    Thanks
    Venki

  • Help for download local file

    Hi!!!
    This is my first post. Thanks to all the people here before all.
    I have a big problem trying to download a local file to an internal table. I have lines with more than 8000 positions, and i've tried to use WS_UPLOAD, GUI_UPLOAD and SO_OBJECT_UPLOAD, but all of them show me this messages:
       - Unable to satisfy send request: 8001 bytes.
    ¿Do you know any function module (i think it could be OO) that allows me to load this file?
    Thanks for all. Bye!

    Hi
    REPORT ZDOWN_UP_LOAD
            NO STANDARD PAGE HEADING
            LINE-SIZE  255.
    Declare Database Objects
    tables:
       DOKIL,
       TRDIR.
    Constants
    CONSTANTS:
       MC_TRDIR_IDENTIFIER(72)  TYPE C VALUE '%&%& RDIR',
       MC_REPORT_IDENTIFIER(72) TYPE C VALUE '%&%& REPO',
       MC_TEXT_IDENTIFIER(72)   TYPE C VALUE '%&%& TEXP',
       MC_THEAD_IDENTIFIER(72)  TYPE C VALUE '%&%& HEAD',
       MC_DOC_IDENTIFIER(72)    TYPE C VALUE '%&%& DOKL',
       MC_TRDIR_SHORT(4)        TYPE C VALUE 'RDIR',
       MC_REPORT_SHORT(4)       TYPE C VALUE 'REPO',
       MC_TEXT_SHORT(4)         TYPE C VALUE 'TEXP',
       MC_THEAD_SHORT(4)        TYPE C VALUE 'HEAD',
       MC_DOC_SHORT(4)          TYPE C VALUE 'DOKP'.
    Declare Module level data structures
    DATA: BEGIN OF MTAB_PROGRAM_SOURCE OCCURS 0,
             LINE(72) TYPE C,
           END OF MTAB_PROGRAM_SOURCE.
    DATA: MTAB_PROGRAM_TRDIR LIKE TRDIR OCCURS 0 WITH HEADER LINE.
    DATA: MTAB_PROGRAM_TEXTS LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
    DATA: MSTR_THEAD LIKE THEAD.
    DATA: BEGIN OF MTAB_PROGRAM_FILE OCCURS 0,
             LINE(275) TYPE C,
           END OF MTAB_PROGRAM_FILE.
    DATA: BEGIN OF MTAB_DIRECTORY OCCURS 0,
             NAME LIKE TRDIR-NAME,
             DESC(72) TYPE C,
             SAVENAME LIKE RLGRAP-FILENAME,
           END OF MTAB_DIRECTORY.
    DATA: BEGIN OF MTAB_PROGRAM_DOCUMENTATION OCCURS 0,
             LINE(255) TYPE C,
           END OF MTAB_PROGRAM_DOCUMENTATION.
    Selection Screen
    *-- Options for upload/download of programs
    SELECTION-SCREEN BEGIN OF BLOCK FRM_OPTIONS WITH FRAME TITLE TEXT-UDL.
    PARAMETERS:
       RB_DOWN RADIOBUTTON GROUP UDL DEFAULT 'X'.       " Download reports
    SELECTION-SCREEN BEGIN OF BLOCK FRM_TRDIR WITH FRAME TITLE TEXT-DIR.
    SELECT-OPTIONS:
       S_NAME  FOR TRDIR-NAME,              " Program Name
       S_SUBC  FOR TRDIR-SUBC               " Program Type
               DEFAULT 'F' OPTION EQ SIGN E," Exclude Functions by default
       S_CNAM  FOR TRDIR-CNAM               " Created by
               DEFAULT SY-UNAME,
       S_UNAM  FOR TRDIR-UNAM,              " Last Changed by
       S_CDAT  FOR TRDIR-CDAT,              " Creation date
       S_UDAT  FOR TRDIR-UDAT.              " Last update date
    SELECTION-SCREEN END OF BLOCK FRM_TRDIR.
    *-- Options for uploading programs
    PARAMETERS:
       RB_UP   RADIOBUTTON GROUP UDL.       " Upload reports
    SELECTION-SCREEN BEGIN OF BLOCK FRM_UPLOAD WITH FRAME TITLE TEXT-UPL.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(29) TEXT-SNG.
    PARAMETERS:
       RB_FILE RADIOBUTTON GROUP HOW DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 33(42) TEXT-FNA.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS:
       RB_LIST RADIOBUTTON GROUP HOW.
    SELECTION-SCREEN END OF BLOCK FRM_UPLOAD.
    SELECTION-SCREEN END OF BLOCK FRM_OPTIONS.
    *-- Options for up/downloading programs
    SELECTION-SCREEN BEGIN OF BLOCK FRM_FILEN WITH FRAME TITLE TEXT-FIL.
    PARAMETERS:
       RB_DOS  RADIOBUTTON GROUP FIL DEFAULT 'X', " Save to local
       RB_UNIX RADIOBUTTON GROUP FIL,       " Save to UNIX
       P_PATH  LIKE RLGRAP-FILENAME         " Path to save files to
             DEFAULT 'c:\abap\'.
    SELECTION-SCREEN END OF BLOCK FRM_FILEN.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-LOW.
       CALL FUNCTION 'F4_PROGRAM'
            EXPORTING
                 OBJECT             = S_NAME-LOW
                 SUPPRESS_SELECTION = 'X'
            IMPORTING
                 RESULT             = S_NAME-LOW
            EXCEPTIONS
                 OTHERS             = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-HIGH.
       CALL FUNCTION 'F4_PROGRAM'
            EXPORTING
                 OBJECT             = S_NAME-HIGH
                 SUPPRESS_SELECTION = 'X'
            IMPORTING
                 RESULT             = S_NAME-HIGH
            EXCEPTIONS
                 OTHERS             = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-LOW.
       PERFORM GET_NAME USING 'S_UNAM-LOW'
                     CHANGING S_UNAM-LOW.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-HIGH.
       PERFORM GET_NAME USING 'S_UNAM-HIGH'
                     CHANGING S_UNAM-HIGH.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-LOW.
       PERFORM GET_NAME USING 'S_CNAM-LOW'
                     CHANGING S_CNAM-LOW.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-HIGH.
       PERFORM GET_NAME USING 'S_CNAM-HIGH'
                     CHANGING S_CNAM-HIGH.
    TOP-OF-PAGE.
       IF RB_LIST = 'X'.
         FORMAT COLOR COL_HEADING.
         NEW-LINE.
         WRITE: AT 3 TEXT-H01,
                AT 15 TEXT-H03.
         FORMAT COLOR OFF.
       ENDIF.
    AT LINE-SELECTION.
       CHECK RB_LIST = 'X'.                 " only do in list mode
       READ LINE SY-CUROW FIELD VALUE MTAB_DIRECTORY-SAVENAME.
    *-- Read file into an internal table
       PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
                                     USING  MTAB_DIRECTORY-SAVENAME.
    *-- Split table into TADIR entry, report lines, and report text
       PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
                                          MTAB_PROGRAM_SOURCE
                                          MTAB_PROGRAM_TEXTS
                                          MTAB_PROGRAM_DOCUMENTATION
                                 CHANGING TRDIR
                                          MSTR_THEAD.
    *-- Save all of the data
       PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
                                        MTAB_PROGRAM_TEXTS
                                        MTAB_PROGRAM_DOCUMENTATION
                                 USING  TRDIR
                                        MSTR_THEAD.
    Start of processing
    START-OF-SELECTION.
       FORMAT COLOR COL_NORMAL.
       IF RB_DOWN = 'X'.
         PERFORM DOWNLOAD_REPORTS.
       ELSEIF RB_UP = 'X'.
         PERFORM UPLOAD_REPORTS.
       ENDIF.
    END-OF-SELECTION.
       IF RB_DOWN = 'X'.
         CONCATENATE P_PATH
                     'directory.txt'
           INTO P_PATH.
         PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_DIRECTORY
                                    USING  P_PATH.
       ENDIF.
          FORM UPLOAD_REPORTS                                           *
    FORM UPLOAD_REPORTS.
    *-- Can upload a reports entered in selection criteria or
    *-- select from a list.  List can be from index.txt in same directory
    *-- (created by the download) or by reading the first line of each file
    *-- in the directory.
       IF RB_FILE = 'X'. " Upload single program from a file
    *-- Read file into an internal table
         PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
                                       USING  P_PATH.
    *-- Split table into TADIR entry, report lines, and report text
         PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
                                            MTAB_PROGRAM_SOURCE
                                            MTAB_PROGRAM_TEXTS
                                            MTAB_PROGRAM_DOCUMENTATION
                                   CHANGING TRDIR
                                            MSTR_THEAD.
    *-- Save all of the data
         PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
                                          MTAB_PROGRAM_TEXTS
                                          MTAB_PROGRAM_DOCUMENTATION
                                   USING  TRDIR
                                          MSTR_THEAD.
       ELSEIF RB_LIST = 'X'. " Show list for user to choose from
    *-- get list of report names/descriptions from directory text
         CONCATENATE P_PATH
                     'directory.txt'
         INTO P_PATH.
         PERFORM READ_REPORT_FROM_DISK TABLES MTAB_DIRECTORY
                                       USING  P_PATH.
         SORT MTAB_DIRECTORY.
    *-- Write out list of report names/descriptions
         LOOP AT MTAB_DIRECTORY.
           WRITE:
             / MTAB_DIRECTORY-NAME UNDER TEXT-H01,
               MTAB_DIRECTORY-DESC UNDER TEXT-H03,
               MTAB_DIRECTORY-SAVENAME.
         ENDLOOP.
    *-- Process user selections for reports to upload.
       ENDIF.
    ENDFORM.                               " upload_reports
          FORM DOWNLOAD_REPORTS                                         *
          From the user selections, get all programs that meet the      *
          criteria, and save them in ftab_program_directory.            *
          Also save the report to disk.                                 *
    FORM DOWNLOAD_REPORTS.
       DATA:
         LC_FULL_FILENAME LIKE RLGRAP-FILENAME.
    *-- The table is put into an internal table because the program will
    *-- abend if multiple transfers to a dataset occur within a SELECT/
    *-- ENDSELCT (tested on 3.1H)
       SELECT * FROM  TRDIR
              INTO TABLE MTAB_PROGRAM_TRDIR
              WHERE  NAME  IN S_NAME
              AND    SUBC  IN S_SUBC
              AND    CNAM  IN S_CNAM
              AND    UNAM  IN S_UNAM
              AND    CDAT  IN S_CDAT
              AND    UDAT  IN S_UDAT.
       LOOP AT MTAB_PROGRAM_TRDIR.
    *-- Clear out text and source code tables
         CLEAR:
           MTAB_PROGRAM_FILE,
           MTAB_PROGRAM_SOURCE,
           MTAB_PROGRAM_TEXTS,
           MTAB_PROGRAM_DOCUMENTATION.
         REFRESH:
           MTAB_PROGRAM_FILE,
           MTAB_PROGRAM_SOURCE,
           MTAB_PROGRAM_TEXTS,
           MTAB_PROGRAM_DOCUMENTATION.
    *-- Get the report
         READ REPORT MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_SOURCE.
    *-- Get the text for the report
         READ TEXTPOOL MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_TEXTS.
    *-- Get the documentation for the report
         CLEAR DOKIL.
         SELECT * UP TO 1 ROWS FROM DOKIL
                WHERE  ID          = 'RE'
                AND    OBJECT      = MTAB_PROGRAM_TRDIR-NAME
                AND    LANGU       = SY-LANGU
                AND    TYP         = 'E'
                ORDER BY VERSION DESCENDING.
         ENDSELECT.
    *-- Documentation exists for this object
         IF SY-SUBRC = 0.
           CALL FUNCTION 'DOCU_READ'
                EXPORTING
                     ID      = DOKIL-ID
                     LANGU   = DOKIL-LANGU
                     OBJECT  = DOKIL-OBJECT
                     TYP     = DOKIL-TYP
                     VERSION = DOKIL-VERSION
                IMPORTING
                     HEAD    = MSTR_THEAD
                TABLES
                     LINE    = MTAB_PROGRAM_DOCUMENTATION
                EXCEPTIONS
                     OTHERS  = 1.
         ENDIF.
    *-- Put the report code and texts into a single file
    *-- Put the identifier line in so that the start of the TRDIR line
    *-- is marked
         CONCATENATE MC_TRDIR_IDENTIFIER
         MTAB_PROGRAM_TRDIR-NAME
         INTO MTAB_PROGRAM_FILE-LINE.
         APPEND MTAB_PROGRAM_FILE.
    *-- Add the TRDIR line
         MTAB_PROGRAM_FILE-LINE = MTAB_PROGRAM_TRDIR.
         APPEND MTAB_PROGRAM_FILE.
    *-- Put the identifier line in so that the start of the report code
    *-- is marked
         CONCATENATE MC_REPORT_IDENTIFIER
                     MTAB_PROGRAM_TRDIR-NAME
           INTO MTAB_PROGRAM_FILE-LINE.
         APPEND MTAB_PROGRAM_FILE.
    *-- Add the report code
         LOOP AT MTAB_PROGRAM_SOURCE.
           MTAB_PROGRAM_FILE = MTAB_PROGRAM_SOURCE.
           APPEND MTAB_PROGRAM_FILE.
         ENDLOOP.
    *-- Put the identifier line in so that the start of the report text
    *-- is marked
         CONCATENATE MC_TEXT_IDENTIFIER
                     MTAB_PROGRAM_TRDIR-NAME
           INTO MTAB_PROGRAM_FILE-LINE.
         APPEND MTAB_PROGRAM_FILE.
    *-- Add the report texts
         LOOP AT MTAB_PROGRAM_TEXTS.
           MTAB_PROGRAM_FILE = MTAB_PROGRAM_TEXTS.
           APPEND MTAB_PROGRAM_FILE.
         ENDLOOP.
    *-- Put the identifier line in so that the start of the THEAD record
    *-- is marked
         CONCATENATE MC_THEAD_IDENTIFIER
                     MTAB_PROGRAM_TRDIR-NAME
           INTO MTAB_PROGRAM_FILE-LINE.
         APPEND MTAB_PROGRAM_FILE.
         MTAB_PROGRAM_FILE = MSTR_THEAD.
         APPEND MTAB_PROGRAM_FILE.
    *-- Put the identifier line in so that the start of the report
    *-- documentation is marked
         CONCATENATE MC_DOC_IDENTIFIER
                     MTAB_PROGRAM_TRDIR-NAME
           INTO MTAB_PROGRAM_FILE-LINE.
         APPEND MTAB_PROGRAM_FILE.
    *-- Add the report documentation
         LOOP AT MTAB_PROGRAM_DOCUMENTATION.
           MTAB_PROGRAM_FILE = MTAB_PROGRAM_DOCUMENTATION.
           APPEND MTAB_PROGRAM_FILE.
         ENDLOOP.
    *-- Make the fully pathed filename that report will be saved to
         CONCATENATE P_PATH
                     MTAB_PROGRAM_TRDIR-NAME
                     '.txt'
           INTO LC_FULL_FILENAME.
         PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_PROGRAM_FILE
                                    USING  LC_FULL_FILENAME.
    *-- Write out message with Program Name/Description
         READ TABLE MTAB_PROGRAM_TEXTS WITH KEY ID = 'R'.
         IF SY-SUBRC = 0.
           MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
           MTAB_DIRECTORY-DESC = MTAB_PROGRAM_TEXTS-ENTRY.
           MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
           APPEND MTAB_DIRECTORY.
           WRITE: / MTAB_PROGRAM_TRDIR-NAME,
                    MTAB_PROGRAM_TEXTS-ENTRY(65) COLOR COL_HEADING.
         ELSE.
           MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
           MTAB_DIRECTORY-DESC = 'No description available'.
           MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
           APPEND MTAB_DIRECTORY.
           WRITE: / MTAB_PROGRAM_TRDIR-NAME.
         ENDIF.
       ENDLOOP.
    ENDFORM.                               " BUILD_PROGRAM_DIRECTORY
          FORM SAVE_TABLE_TO_FILE                                       *
    -->  FTAB_TABLE                                                    *
    -->  F_FILENAME                                                    *
    FORM SAVE_TABLE_TO_FILE TABLES FTAB_TABLE
                             USING  F_FILENAME.
       IF RB_DOS = 'X'.                  " Save file to presentation server
         CALL FUNCTION 'WS_DOWNLOAD'
              EXPORTING
                   FILENAME = F_FILENAME
                   FILETYPE = 'ASC'
              TABLES
                   DATA_TAB = FTAB_TABLE
              EXCEPTIONS
                   OTHERS   = 4.
         IF SY-SUBRC NE 0.
           WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
                    F_FILENAME COLOR COL_NEGATIVE.
         ENDIF.
       ELSE.                                " Save file to application serve
         OPEN DATASET F_FILENAME FOR OUTPUT IN TEXT MODE.
         IF SY-SUBRC = 0.
           LOOP AT FTAB_TABLE.
             TRANSFER FTAB_TABLE TO F_FILENAME.
             IF SY-SUBRC NE 0.
               WRITE: / 'Error writing record to file;' COLOR COL_NEGATIVE,
                        F_FILENAME COLOR COL_NEGATIVE.
             ENDIF.
           ENDLOOP.
         ELSE.
           WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
                    F_FILENAME COLOR COL_NEGATIVE.
         ENDIF.
       ENDIF.                               " End RB_DOS
    ENDFORM.                               " SAVE_PROGRAM
          FORM READ_REPORT_FROM_DISK                                    *
          Read report into internal table.  Can read from local or      *
          remote computer                                               *
    FORM READ_REPORT_FROM_DISK TABLES FTAB_TABLE
                                USING  F_FILENAME.
       DATA:
          LC_MESSAGE(128) TYPE C.
       CLEAR   FTAB_TABLE.
       REFRESH FTAB_TABLE.
       IF RB_DOS = 'X'.
         TRANSLATE F_FILENAME USING '/\'.   " correct slash for Dos PC file
         CALL FUNCTION 'WS_UPLOAD'
              EXPORTING
                   FILENAME            = F_FILENAME
                   FILETYPE            = 'ASC'
              TABLES
                   DATA_TAB            = FTAB_TABLE
              EXCEPTIONS
                   CONVERSION_ERROR    = 1
                   FILE_OPEN_ERROR     = 2
                   FILE_READ_ERROR     = 3
                   INVALID_TABLE_WIDTH = 4
                   INVALID_TYPE        = 5
                   NO_BATCH            = 6
                   UNKNOWN_ERROR       = 7
                   OTHERS              = 8.
         IF SY-SUBRC >< 0.
           WRITE: / 'Error reading file from local PC' COLOR COL_NEGATIVE.
         ENDIF.
       ELSEIF RB_UNIX = 'X'.
         TRANSLATE F_FILENAME USING '\/'.   " correct slash for unix
         OPEN DATASET F_FILENAME FOR INPUT MESSAGE LC_MESSAGE IN TEXT MODE.
         IF SY-SUBRC = 0.
           DO.
             READ DATASET F_FILENAME INTO FTAB_TABLE.
             IF SY-SUBRC = 0.
               APPEND FTAB_TABLE.
             ELSE.
               EXIT.
             ENDIF.
           ENDDO.
           CLOSE DATASET F_FILENAME.
         ELSE.
           WRITE: / 'Error reading file from remote computer'
                           COLOR COL_NEGATIVE,
                  / LC_MESSAGE,
                  / F_FILENAME.
           SY-SUBRC = 4.
         ENDIF.
       ENDIF.
    ENDFORM.                               " READ_REPORT_FROM_DISK
          FORM SPLIT_INCOMING_FILE                                      *
    -->  FTAB_PROGRAM_FILE                                             *
    -->  FTAB_PROGRAM_SOURCE                                           *
    -->  `                                                             *
    -->  FTAB_PROGRAM_TEXTS                                            *
    FORM SPLIT_INCOMING_FILE TABLES FTAB_PROGRAM_FILE
                                          STRUCTURE MTAB_PROGRAM_FILE
                                     FTAB_PROGRAM_SOURCE
                                          STRUCTURE MTAB_PROGRAM_SOURCE
                                     FTAB_PROGRAM_TEXTS
                                          STRUCTURE MTAB_PROGRAM_TEXTS
                                     FTAB_PROGRAM_DOCUMENTATION
                                       STRUCTURE MTAB_PROGRAM_DOCUMENTATION
                            CHANGING FSTR_TRDIR
                                     FSTR_THEAD.
       DATA:
         LC_DATATYPE(4) TYPE C,             " Type of data, REPO, TEXP, RDIR
         LC_PROGRAM_FILE LIKE MTAB_PROGRAM_FILE.
       LOOP AT FTAB_PROGRAM_FILE.
         LC_PROGRAM_FILE = FTAB_PROGRAM_FILE.
         CASE LC_PROGRAM_FILE(9).
           WHEN MC_TRDIR_IDENTIFIER.
             LC_DATATYPE = MC_TRDIR_SHORT.
           WHEN MC_REPORT_IDENTIFIER.
             LC_DATATYPE = MC_REPORT_SHORT.
           WHEN MC_TEXT_IDENTIFIER.
             LC_DATATYPE = MC_TEXT_SHORT.
           WHEN MC_DOC_IDENTIFIER.
             LC_DATATYPE = MC_DOC_SHORT.
           WHEN MC_THEAD_IDENTIFIER.
             LC_DATATYPE = MC_THEAD_SHORT.
           WHEN OTHERS. " Actual contents of report, trdir, or text
             CASE LC_DATATYPE.
               WHEN MC_TRDIR_SHORT.
                 FSTR_TRDIR = FTAB_PROGRAM_FILE.
               WHEN MC_REPORT_SHORT.
                 FTAB_PROGRAM_SOURCE = FTAB_PROGRAM_FILE.
                 APPEND FTAB_PROGRAM_SOURCE.
               WHEN MC_TEXT_SHORT.
                 FTAB_PROGRAM_TEXTS = FTAB_PROGRAM_FILE.
                 APPEND FTAB_PROGRAM_TEXTS.
               WHEN MC_THEAD_SHORT.
                 FSTR_THEAD = FTAB_PROGRAM_FILE.
               WHEN MC_DOC_SHORT.
                 FTAB_PROGRAM_DOCUMENTATION = FTAB_PROGRAM_FILE.
                 APPEND FTAB_PROGRAM_DOCUMENTATION.
             ENDCASE.
         ENDCASE.
       ENDLOOP.
    ENDFORM.                               " SPLIT_INCOMING_FILE
          FORM INSERT_NEW_REPORT                                        *
    -->  FTAB_PROGRAM_SOURCE                                           *
    -->  FTAB_PROGRAM_TEXTS                                            *
    -->  F_TRDIR                                                       *
    FORM INSERT_NEW_REPORT TABLES FTAB_PROGRAM_SOURCE
                                       STRUCTURE MTAB_PROGRAM_SOURCE
                                   FTAB_PROGRAM_TEXTS
                                        STRUCTURE MTAB_PROGRAM_TEXTS
                                   FTAB_PROGRAM_DOCUMENTATION
                                        STRUCTURE MTAB_PROGRAM_DOCUMENTATION
                            USING  FSTR_TRDIR LIKE TRDIR
                                   FSTR_THEAD LIKE MSTR_THEAD.
       DATA:
         LC_OBJ_NAME LIKE E071-OBJ_NAME,
         LC_LINE2(40)     TYPE C,
         LC_ANSWER(1)     TYPE C.
    *-- read trdir to see if the report already exists, if it does, prompt
    *-- user to overwrite or abort.
       SELECT SINGLE * FROM TRDIR WHERE NAME = FSTR_TRDIR-NAME.
       IF SY-SUBRC = 0.                     " Already exists
         CONCATENATE 'want to overwrite report'
                     FSTR_TRDIR-NAME
           INTO LC_LINE2 SEPARATED BY SPACE.
         CONCATENATE LC_LINE2
           INTO LC_LINE2.
         CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
              EXPORTING
                  DEFAULTOPTION  = 'N'
                  TEXTLINE1   = 'The selected report already exists, do you'
                  TEXTLINE2      = LC_LINE2
                  TITEL          = 'Report already exists'
                  CANCEL_DISPLAY = SPACE
              IMPORTING
                   ANSWER         = LC_ANSWER
              EXCEPTIONS
                   OTHERS         = 1.
       ELSE.
         LC_ANSWER = 'J'.
       ENDIF.
       IF LC_ANSWER = 'J'.
    *-- Create the TADIR entry.  (TRDIR entry created by INSERT REPORT)
         LC_OBJ_NAME = TRDIR-NAME.
         CALL FUNCTION 'TR_TADIR_POPUP_ENTRY_E071'
              EXPORTING
                   WI_E071_PGMID     = 'R3TR'
                   WI_E071_OBJECT    = 'PROG'
                   WI_E071_OBJ_NAME  = LC_OBJ_NAME
                   WI_TADIR_DEVCLASS = '$TMP'
              EXCEPTIONS
                   EXIT              = 3
                   OTHERS            = 4.
         IF SY-SUBRC = 0.
    *-- Create Report
           INSERT REPORT FSTR_TRDIR-NAME FROM FTAB_PROGRAM_SOURCE.
    *-- Create Texts
           INSERT TEXTPOOL FSTR_TRDIR-NAME FROM FTAB_PROGRAM_TEXTS
                  LANGUAGE SY-LANGU.
    *-- Save Documentation
           CALL FUNCTION 'DOCU_UPDATE'
                EXPORTING
                     HEAD    = FSTR_THEAD
                     STATE   = 'A'
                     TYP     = 'E'
                     VERSION = '1'
                TABLES
                     LINE    = FTAB_PROGRAM_DOCUMENTATION
                EXCEPTIONS
                     OTHERS  = 1.
         ELSE.
           WRITE: / 'Error updating the TADIR entry' COLOR COL_NEGATIVE,
                    'Program' COLOR COL_NEGATIVE INTENSIFIED OFF,
                    FSTR_TRDIR-NAME, 'was not loaded into SAP.'
                       COLOR COL_NEGATIVE INTENSIFIED OFF.
         ENDIF.
       ELSE.
         WRITE: / FSTR_TRDIR-NAME COLOR COL_NEGATIVE,
                  'was not uploaded into SAP.  Action cancelled by user'
                      COLOR COL_NEGATIVE INTENSIFIED OFF.
       ENDIF.
    ENDFORM.                               " INSERT_NEW_REPORT
          FORM GET_NAME                                                 *
    -->  VALUE(F_FIELD)                                                *
    -->  F_NAME                                                        *
    FORM GET_NAME USING VALUE(F_FIELD)
                CHANGING F_NAME.
       DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
             LC_PROG LIKE D020S-PROG,
             LC_DNUM LIKE D020S-DNUM.
       TRANSLATE F_FIELD TO UPPER CASE.
       refresh ltab_fields.
       LTAB_FIELDS-FIELDNAME = F_FIELD.
       append ltab_fields.
       LC_PROG =  SY-REPID .
       LC_DNUM =  SY-DYNNR .
       CALL FUNCTION 'DYNP_VALUES_READ'
            EXPORTING
                 DYNAME     = LC_PROG
                 DYNUMB     = LC_DNUM
            TABLES
                 dynpfields = ltab_fields
            EXCEPTIONS
                 OTHERS     = 01.
       read table ltab_fields index 1.
       IF SY-SUBRC EQ 0.
         F_NAME = LTAB_FIELDS-FIELDVALUE.
         refresh ltab_fields.
       ENDIF.
       CALL FUNCTION 'F4_USER'
            EXPORTING
                 OBJECT = F_NAME
            IMPORTING
                 RESULT = F_NAME.
    ENDFORM.                               " GET_NAME
    This is the entire program.hope it helops you.
    Reward if useful
    Regards
    divya

  • Scripting help for image pop-up within a PDF

    Hi,
    I'm creating some sample eBooks in Acrobat Professional 9 (Mac), and I am stuck on one element that needs to be present. In the text within the PDF, there might be a phrase like, "See Fig. 1". Fig. 1 might not be on that page, however. I know how to create a link in a PDF that will navigate the reader to the page with the image referenced, but that's not good enough. I'd like to have this happen:
    User clicks on "See Fig. 1".
    Popup window appears with the referenced thumbnail image.
    The image's popup window will stay on-screen until dismissed by the user.
    Clicking on the popup thumbnail image calls up a full-size image.
    The added wrinkles are many after we figure out the scripting for the above, but here are two major ones to be addressed right away:
    1) The images are already part of the typeset document converted to PDF, so I am guessing the images would have to be bundled with the PDF somehow. Our users need to use the PDFs in an offline environment, so a call-out to a URL is out of the question.
    2) The PDFs will be read on Macs, PCs, and possibly iPads. If a bundled, local file is called out when a user clicks on "See Fig. 1", how do I set a relative filepath in the call-out?
    Thanks for any help you can provide.
    Andrew

    Here's a sample document that demonstrates some of what you're asking about: https://acrobat.com/#d=aP-2xL45pM57xVkT6d6fSg
    The images are stored in buttons, so there is no concern about having to use external images. Note that this may not work on an iPad since most (all?) PDF viewers on the iPad do not have JavaScript support.

  • Scripting help for a tedious process.

    Ian Wood wrote a script that takes a list of version names from a Word.doc or plain text doc. and opens Aperture, searches the Library and then creates an album from those gathered images. This is great, for example if a Bride gives you a list of her favorite photos for the design of the final wedding book.
    The script works well, however it looks at the whole Aperture library.
    If you have versions with the same name it only picks one.
    (You may have exactly the same version names scattered around your library because your camera cycles back to 0001 after it reaches 9999)
    If someone out there knows how to re-write the script so that it only looks in a particular project as it picks the version names, then an otherwise tedious process would be simplified.
    Any help would be appreciated.
    The following is a copy of Ian's script.
    This script is written by Ian Wood. No warranty is given or implied for the script's use.
    Feel free to copy and adapt this script for your own use. Originally written in answer to a thread on the Aperture discussion forum.
    Please visit http://www.aperture-assistant.com for more scripts and information about automation and Aperture.
    set tfile to (choose file "Pick the text file")
    set fref to (open for access tfile) -- now we read the file in
    set tSize to (get eof tfile)
    set tText to (read fref as string from 1 to tSize)
    close access fref
    log tText
    set tList to every paragraph of tText -- turn the lines into a list
    tell application "Aperture"
    activate
    tell library 1
    set this_project to make new album with properties {name:"Results of file name list"} -- you can change this if you want the Album to have another name.
    end tell
    repeat with i from 1 to the count of the tList
    set tName to item i of the tList
    set tImgID to "not found"
    try
    set tImgID to (first image version whose name is tName)
    end try
    if tImgID is not "not found" then
    try
    duplicate tImgID to this_project
    end try
    else
    log tName
    end if
    end repeat
    end tell

    Ian Wood wrote a script that takes a list of version names from a Word.doc or plain text doc. and opens Aperture, searches the Library and then creates an album from those gathered images. This is great, for example if a Bride gives you a list of her favorite photos for the design of the final wedding book.
    The script works well, however it looks at the whole Aperture library.
    If you have versions with the same name it only picks one.
    (You may have exactly the same version names scattered around your library because your camera cycles back to 0001 after it reaches 9999)
    If someone out there knows how to re-write the script so that it only looks in a particular project as it picks the version names, then an otherwise tedious process would be simplified.
    Any help would be appreciated.
    The following is a copy of Ian's script.
    This script is written by Ian Wood. No warranty is given or implied for the script's use.
    Feel free to copy and adapt this script for your own use. Originally written in answer to a thread on the Aperture discussion forum.
    Please visit http://www.aperture-assistant.com for more scripts and information about automation and Aperture.
    set tfile to (choose file "Pick the text file")
    set fref to (open for access tfile) -- now we read the file in
    set tSize to (get eof tfile)
    set tText to (read fref as string from 1 to tSize)
    close access fref
    log tText
    set tList to every paragraph of tText -- turn the lines into a list
    tell application "Aperture"
    activate
    tell library 1
    set this_project to make new album with properties {name:"Results of file name list"} -- you can change this if you want the Album to have another name.
    end tell
    repeat with i from 1 to the count of the tList
    set tName to item i of the tList
    set tImgID to "not found"
    try
    set tImgID to (first image version whose name is tName)
    end try
    if tImgID is not "not found" then
    try
    duplicate tImgID to this_project
    end try
    else
    log tName
    end if
    end repeat
    end tell

  • Script Help for iPhoto

    fairly new to Mac. I life iPhot....except, when I mod a photo, it moves to a completely different folder. My simple mind can't grasp the fundamentals of either applescript or automator. Can someone help me write a script that will help move the modified photo's from the iphoto library's "modified" folder, back to the original folder?
    Mahalo,
    Mike

    You can drag and drop the image from iPhoto to wherever you need it. For example, just drag and drop an image from iPhoto to the Desktop, and then you have a copy on the Desktop. If you don't want it in iPhoto anymore, just delete within iPhoto and the original and any modifications are gone. You'll also find buttons in iPhoto that let you easily set your Desktop background, send photos in an email, or publish them with iWeb, among other things.
    iPhoto is for not having to worry about where or how your photos are organized on the your hard drive, just like iTunes does for music. Just let iPhoto handle the organization. Free your mind, let your computer do the work. This is the 21st century, you know.
    Also consider creating albums in iPhoto for your own grouping, and tagging images with keywords and comments so you can create smart albums to automatically do the grouping for you. You can also drag and drop an image from one film roll to another or combine film rolls. Time to let go of the Finder when it comes to organizing your images.

  • Requesting help for converting .cwk files

    for use with Windows.
    http://discussions.apple.com/thread.jspa?threadID=2548903
    Can someone help this poor soul who is being sucked into the dark hole that is Windows?

    These FAQ entries are a good starting point for file conversion:
    What tools can I use to convert my video to DV-AVI?
    How can I convert my AVCHD footage to more traditional HDV?
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • Help for converting edited files

    So I'm trying to get the hang of this program.
    I have a bunch of mpeg files that are edited to the orginal source of 1280x720  otherwise known as "letterbox". The other source is 23.976fps,
    What I would like to do is the following:
    Use the edited clips that I already have:
    Convert them into a format where I can import them back onto adobe premiere elements 10 and edit further
    Keep the same dimensions of 1280x720
    Not lose any of the picture quality
    I have no clue of which video codec or file to convert them to. I would prefer to keep them mpegs.
    Please help me.

    These FAQ entries are a good starting point for file conversion:
    What tools can I use to convert my video to DV-AVI?
    How can I convert my AVCHD footage to more traditional HDV?
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • F4 Help for selecting the file

    Hi All,
    I want to select the file into my selection screen by providing the browsing option for user to locate the file.
    But i want only '.CSV' files to be displayed. I am not sure if f4_filename provides option to restrict file type to '.csv' instead of '.*'.
    I tried the fm 'KD_GET_FILENAME_ON_F4' .It has an option mask where i can enter the file type.The file type which i enter comes in the file dialog box but those files are not available for selecting.
    Kindly help me in this regard.
    Regards,
    S.Subasree

    hi,
    have you pass all the value which is shown in the below code
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
       FIELD_NAME          = 'P_FILE '
       STATIC              = 'X'
       MASK                = '.excel , *.xls '
      CHANGING
        file_name           = p_file
    EXCEPTIONS
       MASK_TOO_LONG       = 1
       OTHERS              = 2          .
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    hope this hwlps
    Regards
    Ritesh

  • Looking for help for sharing pdf files with ipad from mac.  Pages only recognizes text.  What app should I use for file sharing pdf documents?

    Looking for advice on how to share pdf files with iPad from Mac.   Pages seems to only recognize text.   What app is recommended for pdf documents?

    Welcome to Apple Support Communities!
    If I understand your question, you want to read pdfs on your iPad, not create or edit.
    Drag pdf files to the iPad icon in Finder while connected to your computer via the USB cable.
    They will show up in the iBooks application
    (If you don't already have iBooks, it's a free download from the App Store.)
    Once installed, there are two buttons at the top left of the Bookshelf.
    One is Books, the other is Collections.
    Tap Collections, and you'll see Books and PDFs.
    Tap PDFs and you're there.

  • I need help for repair dmg file in illustrator 5.0!

    Hi everyone, I just un-pluged my hard drive with out select eject that dmg all the my homework AI files.
    I tried open new file> place.
    I tried open with Acrobat X.
    I tried open and place with photoshop.
    I tried Recovery Toolbox for Illustrator.
    all of these didnt work so far....
    these files are really important to me!
    is any other way could fix it?
    thank you everyone....

    Your system's disk utility can possibly repair the DMG and in turn some of the files...
    Mylenium

  • Basic script help for a newbie?!?!

    Need help with a basic script, I need to display 5 input fields in a single dynamic field. And i need them to have a certain order of display, ie: input 1 is displayed on line 1, 2 on the next line, etc. any help would be appreciated
    I have been trying various scripts but i either make the second input field replace the first one, or i cant get the vars to populate the field with a button.. Im kinda lost.

    Show what you have tried so far that give you the results where you either replace fields or can't get vars to populate them with a button.

  • Need help for playing .mov file in  a swing window......

    Am a B.Tech final yr student and my project output is an mov file... i need to play it in a swing jFrame... Can anyone guide me for the above????

    Hi.... I tried the code after changing but now am getting a new exception
    - create processor for the image datasource ...
    Setting the track format to: RGB, 24-bit, Masks=3:2:1, PixelStride=-1, LineStrid
    e=-1, Flipped
    - create DataSink for: file:/c:/1.avi
    start processing...
    - reading image file: C:\Program Files\Java\jdk1.6.0_12\bin\class1\1.jpg
    read 1832 bytes.
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x044c2890, pid=2052, tid=1200
    # Java VM: Java HotSpot(TM) Client VM (11.2-b01 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [jmjpeg.dll+0x12890]
    # An error report file with more information is saved as:
    # C:\Program Files\Java\jdk1.6.0_12\bin\hs_err_pid2052.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    Whats the problem now????
    Can u guide me????

  • Mapping help for IDOC to file

    Hi Experts,
    I need help in mapping. All mapping is working fine. I am getting issue when mapping comment field to only BOX when it occurs multiple times.
    Actually I am getting correct lines in queue , but it is not mapping correctly, It consider lines from first MIXPLT.
    Target Structure:
    BOX                    0.n          Z1WHCUSTC   when Z1WHCONS is initial
    ++LIne                 0..n        Z1CUSTCD
    ++++Comment     0...n      Z1WHCMTH
    MIXPLT                0...n      Z1WHCONS
    BOX                     0..n       Z1WHCUSTC    when Z1WHCONS is not initial
    ++LIne                 0...n
    ++++Comment    0...n
    Source Structure:

    Hi Ranj,
    Did you import Idoc or Idoc xsd ?
    If you imported xsd, open external definition IDoc check for errors like below.
    I think the problem might be with source xml structure.
    Regards,
    Krupa

Maybe you are looking for