Move file from App server to same server on different path

Hi All,
I have to move a file from Application server to a folder in the same server....
pls tell me how can i do this....
its very urgent....
Thanks...............

Hi
First you read the file in output mode using Open dataset and Read dataset statement with the initial application server path.
Then write this data back to another file path by opening the file in Input mode and using Transfer statement.
Example.
open dataset <file1> mode output encding default.
if sy-subrc = 0.
do.
read dataset <file1> into wa_itab.
if sy-subrc = 0.
append wa_itab to itab.
else.
exit.
endif.
enddo.
open dataset <file2> mode input encding default.
if sy-subrc = 0.
loop at itab into wa_itab.
transfer wa_itab to <file2>.
endloop.
endif.
~ Ranganath
PS : Reward points for all useful answers !

Similar Messages

  • How to move files from my full Time Machine to a different external drive?

    Hello there. I have a 320 GB external hard drive which I have been using as my "Time Machine." It recently filled it up and I would like to move the data (files, music, pics, etc.) to a larger external hard drive. 
    HOWEVER, I don't want this new drive to be another "Time Machine." I want to store files here in an archival fashion in my own folder structure. (Some of the files on my Time Machine are no longer on my iMac, otherwise this wouldn't be an issue and I would just copy from my iMac to the new external drive.)
    Can anyone help with which particular files I should be copying from the Time Machine (I am just opening it in the finder window, I am not launching Time Machine itself)? I don't know a lot about Time Machine but I know that hard links are created and I just want to make sure I get the right data copied over.
    Thanks for any direction or insight you may have.

    That's not really the way time machine works. Yes it copies most all your files to it, but it's real job is to keep multiple copies of each file that changes.
    Let say you have a document file named "List of things" and you add and delete stuff off of it and over a weeks time you did this 10 times, well time machine will now have 10 copies of that file, one for each version you changed.
    If you just want to "restore" a file to another disk you can do that by entering Time Machine and picking the file, right click and select "restore to" then it will bring it forward and allow you to place it on another drive.
    If you just delete files off the time machine drive (or move) then you will mess up the database and render the time machine functions useless.

  • HT3678 If I download a .mov file from gmail, I am not able to open the file. I reinstalled QuickTime 7.6.6, still unable to open the file. If I download the same file from another mail server I have no trouble. What is gmail doing to my file?

    If I download a .mov file from gmail, I am not able to open the file. I reinstalled QuickTime 7.6.6, still unable to open the file. If I download the same file from another mail server I have no trouble. What is gmail doing to my file?

    Also i have reinstalled the reader9 two  times and tried with reader8 also but in both the cases same problem.
    it would be gr8 help if someone can help.

  • System exception while deleting the file from app server in background job

    Hi All,
    I have a issue while the deleting the file from application server.
    I am using the statement DELETE DATASET in my program to delete the file from app server.
    I am able to delete the file from the app server when i run the program from app server.
    When i run the same report from background job i am getting the message called System exception.
    Is there any secuirity which i need to get the issue.
    Thank You,
    Taragini

    Hi All,
    I get all the authorization sto delete the file from application serever.
    Thing is i am able to run the program sucessfully in foreground but not in the background .
    It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
    Can anybody please give me suggestion
    Thanks,
    Taragini

  • Function module to fetch pdf file from App. Server and print/email?

    Hi all,
    Is there any function module to fetch a PDF file from APPLICATION SERVER and print the PDF file or send it as an attachment in an email?
    Please help..
    Thanks in advance.
    Sandeep.

    Hi Sandeep,
    Is there any function module to fetch a PDF file from APPLICATION SERVER
    1) As far as i know there are no FMs to read a file from App server, you can do the same using *OPEN/READ/CLOSE dataset ABAP statements - There are tons of examples for this on the net.
    and print the PDF file or send it as an attachment in an email?
    You can send the file read from the app server(by the suggested method above) and use CL_BCS to send it as an attachment.
    Again there are many examples on the net on how to use CL_BCS for the same.
    Regards,
    Chen

  • Problem in downloading file from app server using CG3Y in to .XLS fomat

    hi All,
    I have uploaded file in to application server through a program using open data set with the separater as "|" ( pipe ) . Now the user should be able to download the file from apps server to presenataion server in .XLS format using txn CG3Y. but when we download, the format appears wierd and the data is not consistent across columns in excel. i.e the data which is supposed to be in one column in the excel is in the other column. what precautaions should i take  before moving data to apps server so that it will be downloaded in a good format.
    Appreciate your help...
    Regards,
    Sreekanth.

    Separate each values with TAB space present in the application server .
    Currently u r using | pipe character. Instead of that use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as delimiter.
    Each value will displayed in separate cells in excel sheet when u download it frm app.server
    Regards,
    Lakshman.

  • Transfer a file from App Server to a FTP site.

    Hi, Abapers.
    I need your help. Probably, this topic has already been posted in a similar way, but we need an answer to solve our problem.
    We have to sent a PDF file from a directory of our app server (AIX) to a FTP directory... which would the FM sequence we should use to goal it?
    Best Regards.

    Hi Santiago,
    create fm to send file from APP server to FTP site.
    if you want to Post file from desktop to Appl use Transaction - CG3Y
    if you want to Post file from Appl to Desktop use Transaction - CG3Z
    copy the code below....
    *  Author: Prabhudas                            Date:  02/21/2006  *
    *  Name: Z_FTP_FILE_TO_SERVER                                          *
    *  Title: FTP File on R/3 Application Server to External Server        *
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(DEST_HOST) TYPE  C
    *"     REFERENCE(DEST_USER) TYPE  C
    *"     REFERENCE(DEST_PASSWORD) TYPE  C
    *"     REFERENCE(DEST_PATH) TYPE  C
    *"     REFERENCE(SOURCE_PATH) TYPE  C
    *"     REFERENCE(FILE) TYPE  C
    *"     REFERENCE(BINARY) TYPE  CHAR1 OPTIONAL
    *"     REFERENCE(REMOVE_FILE) TYPE  CHAR1 OPTIONAL
    *"  TABLES
    *"      FTP_SESSION STRUCTURE  ZMSG_TEXT OPTIONAL
    *"  EXCEPTIONS
    *"      CANNOT_CONNECT
    *"      SOURCE_PATH_UNKNOWN
    *"      DEST_PATH_UNKNOWN
    *"      TRANSFER_FAILED
    *"      COMMAND_FAILED
      DATA: w_password     TYPE zftppassword,
            w_length       TYPE i,
            w_key          TYPE i                  VALUE 26101957,
            w_handle       TYPE i,
            w_command(500) TYPE c.
      REFRESH ftp_session.
    * Scramble password (new Unicode-compliant routine)
      w_length = STRLEN( dest_password ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = dest_password
          sourcelen   = w_length
          key         = w_key
        IMPORTING
          destination = w_password.
    * Connect to FTP destination (DEST_HOST)
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = dest_user
          password        = w_password
          host            = dest_host
          rfc_destination = 'SAPFTPA'
        IMPORTING
          handle          = w_handle
        EXCEPTIONS
          not_connected   = 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
          RAISING cannot_connect.
      ENDIF.
    * Optionally, specify binary file transfer
      IF binary = 'X'.
        w_command = 'bin'.
        CALL FUNCTION 'FTP_COMMAND'
          EXPORTING
            handle        = w_handle
            command       = w_command
          TABLES
            data          = ftp_session
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        IF sy-subrc <> 0.
          CONCATENATE 'FTP command failed:' w_command
            INTO w_command SEPARATED BY space.
          MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
              WITH w_command
              RAISING command_failed.
        ENDIF.
      ENDIF.
    * Navigate to source directory
      CONCATENATE 'lcd' source_path INTO w_command SEPARATED BY space.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = w_handle
          command       = w_command
        TABLES
          data          = ftp_session
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      IF sy-subrc <> 0.
        CONCATENATE 'FTP command failed:' w_command
          INTO w_command SEPARATED BY space.
        MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
            WITH w_command
            RAISING source_path_unknown.
      ENDIF.
    * Navigate to destination directory
      CONCATENATE 'cd' dest_path INTO w_command SEPARATED BY space.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = w_handle
          command       = w_command
        TABLES
          data          = ftp_session
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      IF sy-subrc <> 0.
        CONCATENATE 'FTP command failed:' w_command
          INTO w_command SEPARATED BY space.
        MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
            WITH w_command
            RAISING dest_path_unknown.
      ENDIF.
    * Transfer file
      CONCATENATE 'put' file INTO w_command SEPARATED BY space.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = w_handle
          command       = w_command
        TABLES
          data          = ftp_session
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      IF sy-subrc <> 0.
        CONCATENATE 'FTP command failed:' w_command
          INTO w_command SEPARATED BY space.
        MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
            WITH w_command
            RAISING transfer_failed.
      ENDIF.
    * Disconnect from destination host
      CALL FUNCTION 'FTP_DISCONNECT'
        EXPORTING
          handle = w_handle.
    * Optionally, remove file from source directory
      IF remove_file = 'X'.
       CONCATENATE source_path '/' file INTO w_command.
      CONCATENATE 'rm' w_command INTO w_command SEPARATED BY space.
       OPEN DATASET '/dev/null' FOR OUTPUT FILTER w_command.
       CLOSE DATASET '/dev/null'.
    ENDIF.
    Regards,
    Prabhudas

  • Download PDF file from APP server!

    Hi!
    Has anyone tried uplaoding and downloding a PDF table from app server as I tried from a normal method by Open dataset, Transfer but it wont work.
    Please provide any inputs.
    Thanks.

    Hi park,
    1. Using open data set, transfer , close etc,
       also it will work.
       ( it will download / upload any kind of file from app server)
    2. Just make sure the
       FULL PATHNAME and the FILENAME
       are mentioned in EXACT CASE
      (small/CAPITAL).
    3. U can check thru transaction AL11, to see the file and path.
    regards,
    amit m.

  • Move files from one server to another

    <cfset spath = "\\ght4\clients\abc\new\256\">
    <cfset dpath ="\\ffg\clients\def\new\kij">
    <cffile action = "move" source = "#spath#" destination = "#dpath#">
    It generating an error Is there a way to move files from server to another in coldfusion

    You talk to your network administrator(s) and ask them what permissions have been assigned to the user that the ColdFusion service|demeon is running as.
    P.S.  By default, on a windows machine, ColdFusion runs as a "localSystem" user, which usually has *no* permissions to other systems.

  • How do I set up my Mac mini to read iTunes and iPhoto files from my new Mac mini server?

    Want my old Mac mini to read iPhoto and iTunes files from my new Mac mini server.  Old Mac has no more room to store files.  How do I do this?

    Hello,
    Have you tried enabling iTunes Sharing & iPhoto Sharing on the Server?
    Or maybe...
    http://support.apple.com/kb/ht1449
    http://www.apple.com/itunes/inside-itunes/2011/02/how-to-move-your-itunes-librar y-to-another-hard-drive.html
    http://support.apple.com/kb/PH2506
    http://support.apple.com/kb/ht1229

  • JSP to Upload file from client machine to Web Server!

    Hi,
    I want to upload a file from client machine to web server in order to send it as email attachment, How can I do it? After uploading the file the class should give me the path where the file is stored on the web server and the file name in return!
    I know the HTML <file> field but dont know how to copy it on web server, HTML Part will be:
    <FORM ENCTYPE="multipart/form-data"
    method="POST" action="My.jsp">
    <INPUT TYPE="file" NAME="mptest">
    <INPUT TYPE="submit" VALUE="upload">
    </FORM>
    Please help!
    Thanks,
    - Rahul

    You can use cos.jar provided by O'Reilly from http://www.servlets.com/cos/. Take a look at com.oreilly.servlet.multipart.* classes.
    Package is provided with source, classes, documentation and, of course, ready-to-use jar file.
    It is really usefull and - ready!

  • Can't add own application to RemoteApps - "You must specify a file from the RD Session Host server SERVERNAME by using the UNC path....

    Hi, there
    I'm not really pro- at RDS in server 2012 (r1), but I have a problem and don't find anything suitable on internet:
    I'm trying to publish one of my own, unlisted programs to rdweb, but it keeps saying "You must specify a file from the RD Session Host server SERVERNAME by using the UNC path...."
    1) I provided the path in the unc name - when I click "Add.." then i browse the the .exe file via network share, not via local path. So that should be OK
    2) Firewall is turned off and eventhough the exeptions are enabled, both of then, checked
    What else should I do to make this work?

    Okej, I found the sollution:
    You have to specify the path like \\hostname\drive_letter$\path-to-the-program.
    I was doing wrong because i wrote it like \\hostname\ShareName\path-to-the-program.
    I was misleded because the wizard wants me to find the program by clicking, and not by entring the path manualy.

  • HT204053 How do i move files from my dropbox app to my music app on my ipad?

    How do i move files from my dropbox app to my music app on my ipad?

    You can't.
    You have to add them from DropBox to iTunes on your computer and then sync them to your iPad

  • Transfer file from UNIX to windows application server G:\ drive

    Dear Expert,
    Really need some help on this, very urgent !
    The download program schedule in background to allow file store in unix.
    Can we do a unix command in abap program to transfer the file from unix to windows application server G:\ drive.
    The gateway for that application server is ukblmqg02.emea.astrazeneca.net .
    Anyone have the sample source code ?
    Thanks&regards
    Nislina

    Hi,
    1.
    There is  a FM 'ARCHIVFILE_SERVER_TO_CLIENT'.
    If the requirement need not necessarily require a FM to transfer a file, then you can also use transaction 'CG3Y' to transfer a file
    from application server to presentation server.
    2.
    Try to use FM  DOCFILE_SERVER_TO_CLIENT. I am using it to download a file from SAP application server to desktop.
    Source path should be application server file path along with file name i.e. /tmp/sample.xls.
    Target path should be something like c:\file.xls.
    Best regards,
    Prashant

  • Can't move files from one volume to another

    Using the 1.2 client on SLED, I don't appear to be able to move files from
    one volume to another. I have two drive "mappings", each to a
    different volume on a NW65SP5 box, but when I try and cut and paste files
    I get an error saying "Not on the same file system". However if I drop to
    a terminal and just use mv, that works.
    Is this a known issue?
    Joe

    On Tue, 12 Sep 2006 12:59:23 +0000, Joseph Marton wrote:
    Hmm, yep get the smae problem when trying to move files.
    Copy works just great though.
    I know there are some issues in Gnome/Nautilus that's being worked upon.
    These are outlined in the Readme. For example it's not possible to copy a
    folder from Server A to Server B, then delete the folder form Server A.
    Finally later on copy the folder back to Server A from Server B.
    Also Gnome is leaking file handles, which could be the cause for the
    problem we're getting here.
    I'll ask my contact at Novell about this and have him enter it in as a bug
    if it's not a known issue.
    For a workaround you already have a good alternative of using mv in a
    terminal.
    Niclas Ekstedt, CNA/CNE/CNS/CLS
    Senior Network Consultant/NSC Sysop
    Telindus Sweden AB

Maybe you are looking for