How to transfer file from application server to presentation server in background?

Hi Experts,
How to transfer file from application server to presentation server in background?
Thanks in advance
Namita

Thanks Raman and Challa,
We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
We need this program to run in background so that we can use this in daily process chain.
Appreciate your inputs on this.
Thanks,
Namita

Similar Messages

  • How to download file from application server

    Hi Experts,
                  I developed report and execute in background mode. for this i used Open dataset transfer and close dataset . i got the requried output . But in this case user want downloaded file on presentation server so can anyone tell me How to download file from application server?
    i know it is possible through Tcode CG3Y. but i want code in program.

    This code will download a file to your Client package by package, so it will also work for huge files.
    *& Report  ZBI_DOWNLOAD_APPSERVER_FILE
    REPORT  zbi_download_appserver_file.
    PARAMETERS: lv_as_fn TYPE sapb-sappfad
    DEFAULT '/usr/sap/WBP/DVEBMGS00/work/ZBSPL_R01.CSV'.
    PARAMETERS: lv_cl_fn TYPE string
    DEFAULT 'C:\Users\atsvioli\Desktop\Budget Backups\ZBSPL_R01.CSV'.
    START-OF-SELECTION.
      CONSTANTS blocksize TYPE i VALUE 524287.
      CONSTANTS packagesize TYPE i VALUE 8.
      TYPES ty_datablock(blocksize) TYPE x.
      DATA lv_fil TYPE epsf-epsfilnam.
      DATA lv_dir TYPE epsf-epsdirnam.
      DATA ls_data TYPE ty_datablock.
      DATA lt_data TYPE STANDARD TABLE OF ty_datablock.
      DATA lv_block_len TYPE i.
      DATA lv_package_len TYPE i.
      DATA lv_subrc TYPE sy-subrc.
      DATA lv_msgv1 LIKE sy-msgv1.
      DATA lv_processed_so_far TYPE p.
      DATA lv_append TYPE c.
      DATA lv_status TYPE string.
      DATA lv_filesize TYPE p.
      DATA lv_percent TYPE i.
      "Determine size
      SPLIT lv_as_fn AT '/' INTO lv_dir lv_fil.
      CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
        EXPORTING
          file_name      = lv_fil
          dir_name       = lv_dir
        IMPORTING
          file_size_long = lv_filesize.
      "Open the file on application server
      OPEN DATASET lv_as_fn FOR INPUT IN BINARY MODE MESSAGE lv_msgv1.
      IF sy-subrc <> 0.
        MESSAGE e048(cms) WITH lv_as_fn lv_msgv1 RAISING file_read_error.
        EXIT.
      ENDIF.
      lv_processed_so_far = 0.
      DO.
        REFRESH lt_data.
        lv_package_len = 0.
        DO packagesize TIMES.
          CLEAR ls_data.
          CLEAR lv_block_len.
          READ DATASET lv_as_fn INTO ls_data MAXIMUM LENGTH blocksize LENGTH lv_block_len.
          lv_subrc = sy-subrc.
          IF lv_block_len > 0.
            lv_package_len = lv_package_len + lv_block_len.
            APPEND ls_data TO lt_data.
          ENDIF.
          "End of file
          IF lv_subrc <> 0.
            EXIT.
          ENDIF.
        ENDDO.
        IF lv_package_len > 0.
          "Put file to client
          IF lv_processed_so_far = 0.
            lv_append = ' '.
          ELSE.
            lv_append = 'X'.
          ENDIF.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize         = lv_package_len
              filename             = lv_cl_fn
              filetype             = 'BIN'
              append               = lv_append
              show_transfer_status = abap_false
            TABLES
              data_tab             = lt_data.
          lv_processed_so_far = lv_processed_so_far + lv_package_len.
          "Status display
          lv_percent = lv_processed_so_far * 100 / lv_filesize.
          lv_status = |{ lv_percent }% - { lv_processed_so_far } bytes downloaded of { lv_filesize }|.
          CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
            EXPORTING          "percentage = lv_percent - will make it fash
              text = lv_status.
        ENDIF.
        "End of file
        IF lv_subrc <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      "Close the file on application server
      CLOSE DATASET lv_as_fn.

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • Can i transfer file from application server to lotus server.

    hi
    can i transfer file from application server to lotus server.
    i m geting file on application server but i want to transefer that file from application server to lotus server.
    if yes than give me suggestion.
    thanks in advanced.

    Hello Laxman
    If you want to trigger the file transfer from within SAP then you need to execute an <b>external OS command</b> (transaction <b>SM49</b>, <b>SM69</b>).
    At the level of the OS (operating system, e.g. Windows, Linux) you need to be able to transfer files to the Lotus server.
    Your task is, for example, to write a report executing the external OS command which will be executed at the OS level where the file transfer happens.
    Regards
      Uwe

  • How to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is  new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files  from i pod to itunesb

    how to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is  new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files  from i pod to itunes......

    Some of the information below has subsequently appeared in a document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991
    Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was designed for you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchased content.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
    - Senuti - http://www.fadingred.com/senuti/
    - Phoneview - http://www.ecamm.com/mac/phoneview/
    - MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/
    - Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
    - Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
    - iexplorer (free) - http://www.macroplant.com/iexplorer/ - Mac&PC
    - Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
    - 2010 Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
    Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
    Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
    Additional information here https://discussions.apple.com/message/18324797

  • How to transfer files from an iMac to a PC?

    I copied files (.pdf, .doc) from my iMac to a memory stick for a colleague in a charity. He has a PC and can't open them. The folder in the memory stick shows the file extension as .fpbf  Please advise on how to transfer files from an iMac to a PC.

    Format the memory stick as "fat" then copy the files to it.

  • How to transfer files from Pc to mobiles?

    HI,
    How to transfer files from Pc to mobiles?
    what are the Methods to do transferring files.
    Sri

    hi
    tell me which type of files u want to transfer
    are they text files or j2me software
    clear it
    R

  • How to transfer files from iBook to reader?

    How to transfer files from iBook to reader

    The first step is to export the PDF from iBooks to your computer (this cannot be one on your iPad or iPhone). Connect your iPad or iPhone to your syncing computer. Open iTunes. Select your device (how to do this depends on which version of iTunes you are running). Click on the Books tab at the top. In the current version of iTunes 11, I had to choose to view by PDFs. Then I could drag a PDF from the iTunes window to my Desktop.
    Then follow the instructions in this document to import the PDF(s) into Adobe Reader:
    http://forums.adobe.com/docs/DOC-2532
    Not so easy, I'm afraid. Easier if you just keep copies of your PDFs on your computer.

  • How to transfer files from MacBook Pro pages app to iPad mini pages app?

    How to transfer files from MacBook Pro pages app to iPad mini pages app?

    The above assumes you are running current software.
    Mac - OX X 10.9.2, Pages 5.1.
    iPad - iOS 7.0.6, Pages 2.1.

  • How to transfer files from 1 ipad to another

    how to transfer files from 1 ipad to another

    Depends what you are trying to transfer.
    Are you just trying to add content such as apps, music and photos?
    Or are these files that were created by such apps as pages and numbers?
    You can download content that was purchased in the itunes or app store by signing into same account.
    You can dowload any documents saved to icloud by signing into the same account.
    You can create a backup of the first ipad and restore the second from that backup.
    You can import or sync the content from the first ipad into itunes and then manually sync to the second.
    But this all depends on what you are actually trying to do.
    http://www.apple.com/support/ipad/syncing/

  • How to transfer files from mac to ipad without using itunes

    how to transfer files from mac to ipad without using itunes ???
    as i want to use my ipad for official use as well...please suggest..

    well to be 100% technical, no you didn't but that aside, it good to know there are ways for people to transfer music into the default apps without iTunes, if they have a need.
    I tend to use 3rd party apps for documents, like your mentioned iExplorer etc, which are handy.
    I see from a search the two "apps" you mentioned are not iOS apps, which I had assumed, SyncPod and FreeSync are apps for your computer, that would explain their access to the default Music/Video apps.
    I had wondered how Apple had allowed iOS apps in the store that could get around the sandboxing in iOS of apps.
    Message was edited by: CGW3

  • How to transfer files from nano to a pc?

    how to transfer files from nano to a pc?

    What files?
    The music sync is one way -computer to ipod.  The exception is itunes purchases.  File>Transfer Purchases.
    As everything came from your computer in the first place, it should still be there.

  • How to transfer files from windows 7 to macbook pro

    how to transfer files from windows 7 pc to my new macbookpro

    You can use your external hard drive that is used to backup your important data to transfer the data from your PC to your Mac.
    If your Windows 7 PC is a laptop and you live near an Apple store, make an appointment at the Genius bar where they will help you transfer the data you want transferred from your PC to your MBP.

  • HT1379 Summary: how to transfer files from SD card when the system (Mac OS X v 10.7.5) will NOT recognize SD cards.

    How to transfer files from SD card when the system (Mac OS X v 10.7.5) will NOT recognize SD cards?
    Insert the SD card.
    System opens iPhoto with SD contents.
    Want to transfer files from SD card to system drive.  iPhoto closes
    SD card directory removed from the Finder window and is not available again. 
    I don't want to have to reboot the system every time I want to perform this option.
    What's wrong here. 
    The support columns show this isn't an isolated incident with all sorts of solutions possible.
    This is a simple task - there should be a simple method for the system to recognize SD cards.
    What's the answer?
    I've reviewed a recommendation to reset the SMC.
    https://discussions.apple.com/message/18500187#18500187
    and
    http://support.apple.com/kb/HT3964
    and another thread that says, basically, you must buy extra hardware to perform this simple task,
    https://discussions.apple.com/message/16911326#16911326
    another one that has the same problem with OS Mountian Lion,
    https://discussions.apple.com/message/21919740#21919740
    another one with the problem that says SD cards can't be read by Apple unless the card is formatted specifically for Apple, ie. that Apple is not compatible with other cards, but the problem maybe something else that requires Apple service - (bad SD card reader?).
    https://discussions.apple.com/message/18711818#18711818
    there are probably more discussions, but I dont' want to spend my entire sunny in Seattle day working this.
    thanks for the help!

    Bucky Fullmeister wrote:
    When I plug in an SD card, the finder window shows it under the DEVICES section.  At this point, I can drag the contents to the hard drive.  However, when I screw up and click the character on the right side of the name - it apparently closes the SD card and I can't find any command to reload or re-recognize the card.  I have to remove and reinsert the card and then sometimes it recognizes the card.  Other times I reboot and it will recognize it.
    What does that character on the right side of the SD card name do?  Is it an eject function - with no way to subsequently reread the drive?
    It ejects or unmounts the card. When the SD card mounts click on it once to highlight it and then drag the files shown within it to the new folder.
    Pete

  • How to delete file from application server(Unix)

    Hi All,
    Using the below code downloading a file from application server(Unix) to client machine. I want to delete the file from application server once it is downloaded to client
    We work on Forms 11.1.1.4.0 and Oracle DB 10g. Client machine are Windows 7.
    BEGIN
      IF webutil_file_transfer.AS_to_Client
      (clientFile => Name_In('global.g_file_name')
      ,serverFile => ls_AppServer_Loc)THEN
      message('Data exported Successfully');
      ELSE
       message('File download from Application Server failed');
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
      message('File download failed: '||SUBSTR(sqlerrm,1,200));
      END;
    I have search for solution on OTN. Few suggested to use HOST.
    Can any one help me how to use Host() built_in to delete the file.
    Thanks,
    Maddy

    Can any one help me how to use Host() built_in to delete the file.
    Host('/bin/rm <complete file path>');

Maybe you are looking for