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.

Similar Messages

  • Convertion pdf file from App. server to Pre.server

    Hi,
      I have file pdf file in application server. i want to convert this PDF file into presention server.
    plese send simple progrme.
    Thank&
    Regards,
    Madhu

    Also try
    FYI
    REPORT ztrans01 .
    *Parameters(files)
    PARAMETERS: ux_dir TYPE epsf-epsdirnam OBLIGATORY
                DEFAULT '/usr/sap/trans',
                filename TYPE epsf-epsfilnam OBLIGATORY DEFAULT 'test1',
                pc_dir TYPE rlgrap-filename OBLIGATORY
                DEFAULT 'c:\tmp'.
    *DATA(Strings)
    DATA itab TYPE TABLE OF string.
    DATA wa TYPE string.
    DATA file TYPE string.
    DATA size TYPE epsf-epsfilsiz.
    DATA ux_file TYPE epsf-epspath.
    DATA mode TYPE epsf-epstxtmod.
    *start-of-selection
    START-OF-SELECTION.
    *1) transfer
      CONCATENATE ux_dir '/' filename INTO ux_file.
      OPEN DATASET ux_file FOR INPUT IN TEXT MODE.
      IF sy-subrc <> 0.
        MESSAGE i502(me) WITH ux_file.
      ENDIF.
      DO.
        READ DATASET ux_file INTO wa.
        IF sy-subrc <> 0. EXIT . ENDIF.
        APPEND wa TO itab.
      ENDDO.
      CLOSE DATASET ux_file.
    *2)download
      CONCATENATE  pc_dir  '\' filename  INTO file.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                filename = file
           TABLES
                data_tab = itab.
    OR
    *&      Form  f1104_download_to_lofile
          Download to data from internal table to Logical File/application server
    FORM f1104_download_to_lofile.
    Open the file in application server
      OPEN DATASET v_filepht FOR OUTPUT IN TEXT MODE.
      IF sy-subrc <> 0.
        MESSAGE s185 WITH v_filepht.          
        LEAVE LIST-PROCESSING.
      ENDIF.
      LOOP AT i_logfile INTO w_logfile.
        TRANSFER w_logfile TO v_filepht.
        CLEAR w_logfile.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE:/ text-055, v_filepht, text-056.
      ELSE.
        WRITE:/ text-057, v_filepht.     
      ENDIF.
    Closing the file
      CLOSE DATASET v_filepht.
    and also check link
    http://sap.ittoolbox.com/code/archives.asp?d=2285&a=s
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Downloading a file from App Server to User's Desktop

    Hi All,
    I know that there are many threads on file upload and download :-)
    I have tried to browse through most of them and could not find my solution.
    The requirement is to place a file in the unix app server directory and allow the user to download it using a link, to the user's desktop. In case you think that this has already been answered in an old thread, kindly give me the pointer. Any sample code for doing this, would be great.
    I know how to upload a file from desktop to table/app server. I know how to download a file from a BLOB column in database.
    Thanks,
    Amit

    You would not be able to use file upload or download beans, as they interact with the database and not the filesystem.
    You would need to write a simple file reader routing in plain java.
    Tapash

  • Download PDF file from Application Server in BSP

    Hello,
    We have a requirement on which we want to download a PDF file stored in Application server using BSP application. I have used function module  ARCHIVFILE_SERVER_TO_CLIENT but this FM will help only if i want to download file from GUI it won't work in BSP application.
    Further i have used class CL_BSP_UTILITY and download method to download file from application server but it is not working in desired manner.
    I am attaching my code for your reference:
    DATA: BUTTON_EVENT TYPE REF TO CL_HTMLB_EVENT_BUTTON ,
               EVENT TYPE REF TO IF_HTMLB_DATA.
    DATA: LS_HOURS LIKE LINE OF GT_HOURS.
    DATA STR TYPE STRING.
    DATA: OUTPUT TYPE STRING ,
              L_XSTRING TYPE XSTRING ,
               APP_TYPE TYPE STRING. 
    EVENT = CL_HTMLB_MANAGER=>GET_EVENT( REQUEST ).
    DATA PHY_NAME_OUT     TYPE SAPB-SAPPFAD.
    IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME = HTMLB_EVENTS=>BUTTON .
      BUTTON_EVENT ?= EVENT .
      CASE EVENT->EVENT_SERVER_NAME.
        WHEN 'test' .
          IF GT_HOURS IS NOT INITIAL.
            PHY_NAME_OUT = '/usr/sap/put/form16//01000200_2007.PDF'.
          OPEN DATASET PHY_NAME_OUT FOR INPUT IN TEXT MODE ENCODING DEFAULT.
            IF SY-SUBRC IS INITIAL.
              DO.
                READ DATASET PHY_NAME_OUT INTO STR.
                IF SY-SUBRC IS INITIAL.
                CONCATENATE
                    OUTPUT
                    str
                    cl_abap_char_utilities=>cr_lf
    INTO output SEPARATED BY space. "cl_abap_char_utilities=>horizontal_tab
                ELSE.
                  EXIT.
                ENDIF.
              ENDDO.
            ENDIF.
    *LOOP AT gt_hours INTO ls_hours.
    *CONCATENATE
    *OUTPUT
    *ls_hours-hour
    *cl_abap_char_utilities=>cr_lf
    *INTO output SEPARATED BY space. "cl_abap_char_utilities=>horizontal_tab
    *ENDLOOP.
            APP_TYPE = 'APPLICATION/PDF;charset=utf-16le'.
            CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
              EXPORTING
                TEXT     = OUTPUT
                MIMETYPE = 'APPLICATION/PDF;charset=utf-16le'
              IMPORTING
                BUFFER   = L_XSTRING.
            CONCATENATE CL_ABAP_CHAR_UTILITIES=>BYTE_ORDER_MARK_LITTLE
            L_XSTRING
            INTO L_XSTRING IN BYTE MODE.
            CALL METHOD CL_BSP_UTILITY=>DOWNLOAD
            EXPORTING
            OBJECT_S = L_XSTRING
            CONTENT_TYPE = APP_TYPE
            CONTENT_DISPOSITION = 'attachment;filename=webforms.pdf'
            RESPONSE = _M_RESPONSE
            NAVIGATION = NAVIGATION.
          ENDIF.
      ENDCASE.
    ENDIF.
    From this code i am able to download PDF file but it is not opening in local machine.
    If any other way to download file then please suggest.
    waiting for ur reply.
    Regards,
    Gagan

    Hi,
    you do the file reading wrong:
    have a look at:
    Local declarations.
      data:
        components          type stringtab,
        component           type string,
        path                type text255,
        file                type text255,
        line_length         type i,
       filecontent_binary type sdokcntbin,
        rows                type sytabix,
        content             type sdokcntbin,
        exception           type ref to cx_sy_file_access_error,
        exception_tmf       type ref to cx_sy_too_many_files ,
        block_size          type i value 1022,
        length              type i.
      field-symbols:
        <hex_container>     type x.
      constants:
        c_dms_blk_size      type i value 2550.
      clear file_size.
      try.
          open dataset file_name  for input in binary mode message message.
        catch cx_sy_file_open  into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when '41825AD355C3005E000000000A1551B1'. raise open_error.
            when '47E8B03AECE5BA07E10000000A114829'. raise already_open.
            when others.
          endcase.
        catch cx_sy_file_authority into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when 'A70BB8396F051547E10000000A11447B'. raise authority_error.
            when others.
          endcase.
        catch cx_sy_too_many_files into exception_tmf.
          case exception_tmf->textid.
            when '8708B73915F6B645E10000000A11447B'. raise too_many_files.
            when others.
          endcase.
      endtry.
      do.
        try.
            read dataset file_name into filecontent_binary-line.
            if sy-subrc <> 0.
              add  line_length to file_size.
              append filecontent_binary to file_content_binary.
              exit.
            else.
              add  line_length to file_size.
              append filecontent_binary to file_content_binary.
            endif.
          catch cx_sy_file_open_mode into exception.
            case exception->textid.
              when '9207B73915F6B645E10000000A11447B'. raise cx_sy_file_open_mode.
              when '9807B73915F6B645E10000000A11447B'. raise read_only.
              when '9E07B73915F6B645E10000000A11447B'. raise not_open.
              when '409D273A2D824360E10000000A11447B'. raise incompatible_mode.
              when others.
            endcase.
        endtry.
      enddo.
      try.
          close dataset file_name.
        catch cx_sy_file_close into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when 'C10BB8396F051547E10000000A11447B'. raise close_error.
            when others.
          endcase.
        catch cx_sy_file_access_error into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when others.
          endcase.
      endtry.
    Get file size.
      split file_name at '/' into table components.
      describe table components lines sy-tfill.
      read table components into component index sy-tfill.
      path = file_name.
      replace component in path with ''.
      file = component.
      call function '/EUH/MMS_GET_FILE_SIZE'
        exporting
          dir_name  = path
          file_name = file
        importing
          file_size = file_size.
    and function /euh/mms_get_file_size.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(DIR_NAME) TYPE  TEXT255
    *"     VALUE(FILE_NAME) TYPE  TEXT255
    *"  EXPORTING
    *"     VALUE(FILE_SIZE) TYPE  SDOK_FSIZE
    *"  EXCEPTIONS
    *"      NO_AUTHORITY
    *"      ACTIVITY_UNKNOWN
    *"      NOT_A_DIRECTORY
    *"      NO_MEDIA_IN_DRIVE
    *"      TOO_MANY_ERRORS
    *"      TOO_MANY_FILES
    *"      BRACKET_ERROR_IN_FILENAME
    *"      NO_SUCH_PARAMETER
      types: begin of files,
               line like ocs_file,
             end of files.
      data: file type files,
         f_subrc like sy-subrc value 0,
         errno(3)    type c,
         errmsg(40)  type c,
         pos                        type i,
         len                        type i,
         parameter(120)             type c,
         help1(120)                 type c,
         help2(120)                 type c,
         error_counter              type i.
      data:
        dir_list  like  ocs_file occurs 0 with header line.
    CASE sy-subrc.
       WHEN 1. f_subrc = 64.
       WHEN 2. f_subrc = 65.
       WHEN 0.
      search dir_name for 'SY-HOST'.    "Is SY-HOST used in directory name?
      if sy-subrc = 0.
        pos = sy-fdpos + 7.
        move dir_name(sy-fdpos) to help1.
        move dir_name+pos to help2.
        concatenate help1 sy-host help2 into dir_name.
      endif.
      do 12 times.                                 " To avoid endless loop
        if dir_name cs '$('.           " Replace parameter by their value
          pos = sy-fdpos + 2.
          if dir_name cs ')'.
            len = sy-fdpos - pos.
            if len le 0.
              f_subrc = 4. exit.
            else.
              parameter = dir_name+pos(len).
              call 'C_SAPGPARAM' id 'NAME'  field parameter
                               id 'VALUE' field parameter.
              if sy-subrc = 0.
                len = pos + len + 1.
                pos = pos - 2.
                if pos > 0.
                  move dir_name(pos) to help1.
                else.
                  help1 = ''.
                endif.
                pos = strlen( dir_name ).
                if pos > len.
                  move dir_name+len to help2.
                else.
                  help2 = ''.
                endif.
                concatenate help1 parameter help2 into dir_name.
              else.
                f_subrc = 8. exit.
              endif.
            endif.
          else.
            exit.
          endif.
        else.
          exit.
        endif.
      enddo.
      shift dir_name right deleting trailing '/\ '.
      shift dir_name left deleting leading space.
      call 'C_DIR_READ_FINISH'                      " this is from RSWATCH0
            id 'ERRNO'  field errno
            id 'ERRMSG' field errmsg.
      call 'C_DIR_READ_START'
            id 'DIR'    field dir_name
            id 'FILE'   field file_name
            id 'ERRNO'  field errno
            id 'ERRMSG' field errmsg.
      case sy-subrc.
        when 1.
          case errno.
            when 2 or 20.  f_subrc = f_subrc + 66.
            when ' '. f_subrc = f_subrc + 67.
          endcase.
        when 0.
          clear error_counter.
          do.
            clear file.
            clear dir_list.
            call 'C_DIR_READ_NEXT'
                id 'TYPE'   field file-line-type
                id 'NAME'   field file-line-name
                id 'LEN'    field file-line-len
                id 'OWNER'  field file-line-owner
                id 'MTIME'  field file-line-mtime
                id 'MODE'   field file-line-acc_mode
                id 'ERRNO'  field errno
                id 'ERRMSG' field errmsg.   "sy-subrc = 3 is e.g. if return
            if sy-subrc = 0 or sy-subrc = 3."data do not fit into variables
              perform p6_to_date_time_tz(rstr0400) using
                    file-line-mtime
                    file-line-mod_time
                    file-line-mod_date.
              file_size = file-line-len.
              dir_list = file-line.
              append dir_list.
            elseif sy-subrc = 1.                 " nothing (more) found
              exit.
            else.
              if error_counter > 50.
                call 'C_DIR_READ_FINISH'
                    id 'ERRNO'  field errno
                    id 'ERRMSG' field errmsg.
                pos =  f_subrc mod 2.
                if pos = 0. f_subrc = f_subrc + 1. endif.
                exit.
              endif.
              add 1 to error_counter.
            endif.
            if sy-index > 1000.
              pos =  f_subrc mod 4.
              if pos = 0. f_subrc = f_subrc + 2. endif.
              exit.
            endif.
          enddo.
          call 'C_DIR_READ_FINISH'
               id 'ERRNO'  field errno
               id 'ERRMSG' field errmsg.
          if sy-opsys(3) = 'Win' and not ( file_name cs '*' ).
            describe table dir_list lines len.
            if len = 0.
              help1 = file_name.
              translate help1 to upper case.
              translate help1 using
                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
              call 'C_DIR_READ_START'
                    id 'DIR'    field dir_name
                    id 'FILE'   field help1.
              if sy-subrc = 0.
                clear error_counter.
                do.
                  clear file.
                  clear dir_list.
                  call 'C_DIR_READ_NEXT'
                      id 'TYPE'   field file-line-type
                      id 'NAME'   field file-line-name
                      id 'LEN'    field file-line-len
                      id 'OWNER'  field file-line-owner
                      id 'MTIME'  field file-line-mtime
                      id 'MODE'   field file-line-acc_mode
                      id 'ERRNO'  field errno
                      id 'ERRMSG' field errmsg.
                  if sy-subrc = 0 or sy-subrc = 3.
                    help2 = file_name.
                    translate help2 to upper case.
                    help1 = file-line-name.
                    translate help1 to upper case.
                    if help1 = help2.
                      perform p6_to_date_time_tz(rstr0400) using
                         file-line-mtime
                         file-line-mod_time
                         file-line-mod_date.
                      dir_list = file-line.
                      append dir_list.
                    endif.
                  elseif sy-subrc = 1.
                    exit.
                  else.
                    if error_counter > 50.
                      call 'C_DIR_READ_FINISH'
                          id 'ERRNO'  field errno
                          id 'ERRMSG' field errmsg.
                      pos =  f_subrc mod 2.
                      if pos = 0. f_subrc = f_subrc + 1. endif.
                      exit.
                    endif.
                    add 1 to error_counter.
                  endif.
                  if sy-index > 1000.
                    pos =  f_subrc mod 4.
                    if pos = 0. f_subrc = f_subrc + 2. endif.
                    exit.
                  endif.
                enddo.
                call 'C_DIR_READ_FINISH'
                     id 'ERRNO'  field errno
                     id 'ERRMSG' field errmsg.
              endif.
            endif.
          endif.
      endcase.
    ENDCASE.
    CASE f_subrc.
       WHEN 1 OR 3.             RAISE too_many_errors.
       WHEN 2.                  RAISE too_many_files.
       WHEN 4 OR 5 OR 6 OR 7 OR 70 OR 71.
         RAISE bracket_error_in_filename.
       WHEN 8 OR 9 OR 10 OR 11 OR 74 OR 75.
         RAISE no_such_parameter.
       WHEN 64.                 RAISE no_authority.
       WHEN 65.                 RAISE activity_unknown.
       WHEN 66.                 RAISE not_a_directory.
       WHEN 67.                 RAISE no_media_in_drive.
    ENDCASE.
    endfunction.
    Now you will be able to get the filesize and the file in SDOK format sdokbin.
    Okay.
    You have to build an request and push the content to the user like:
      call method server->response->set_header_field( name = 'Content-Type' value = value ).
      describe field file_content_binary-line length line_length in byte mode.
      bytes_rest = file-size.
      loop at file_content_binaries assigning <file_content_binary>.
        move <file_content_binary>-line to data.
        if bytes_rest <= 0. "mismatch between line values and size
          exit.
        endif.
        if bytes_rest >= line_length.
          call method server->response->append_data( data = data
            length = line_length ).
        else.
          call method server->response->append_data( data = data
            length = bytes_rest ).
        endif.
        bytes_rest = bytes_rest - line_length.
      endloop.
    This will work.
    You can set the header fields like you want. Have also a look at sicf node contentserver
    and its handler: CL_HTTP_EXT_CSIF

  • Error while downloading PDF file from FTP Server

    Hi Friends,
    I have sent a PDF file with data to FTP , Then i want to check that uploaded pdf file , whether that is correct or not?
    for that , i have downloaded that file from FTP and i am trying to open the file . but it is giving this problem .
    "There was an error opening the document . The file is damaged and could not be repaired."
    will you suggest me regarding this.
    thanks in advance.
    balaji.T.

    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
              EXPORTING
           SRC_SPOOLID                    = spoolno
                src_spoolid                    = wa_file-rqident
                no_dialog                      = ' '
          DST_DEVICE                     =
          PDF_DESTINATION                =
              IMPORTING
                pdf_bytecount                  = numbytes
                pdf_spoolid                    = pdfspoolid
          OTF_PAGECOUNT                  =
                btc_jobname                    = jobname
                btc_jobcount                   = jobcount
              TABLES
                pdf                            = pdf
              EXCEPTIONS
                err_no_otf_spooljob            = 1
                err_no_spooljob                = 2
                err_no_permission              = 3
                err_conv_not_possible          = 4
                err_bad_dstdevice              = 5
                user_cancelled                 = 6
                err_spoolerror                 = 7
                err_temseerror                 = 8
                err_btcjob_open_failed         = 9
                err_btcjob_submit_failed       = 10
                err_btcjob_close_failed        = 11.
    because of this one PDF internal table is obtained.
           OPEN DATASET L_FILENAME  FOR OUTPUT in text mode  MESSAGE MSG.
      LOOP AT pdf.
        CONCATENATE pdf-tdformat       "Material group
                     pdf-TDLINE       "Basic Material
               INTO ITEXT-TLINE ..
        APPEND ITEXT.
        TRANSFER ITEXT TO L_FILENAME.
      ENDLOOP.

  • Print PDF file from app.server

    Hello,
    I need to print a PDF file from the application server without any dialog for the user.
    Is it possible? and if so- how?
    Is it also possible to do the same with office file (DOC,XLS)?
    Thanks
    Moshe

    Hi,
    CV150_RPINT_DOC for frontend execution.
    FM SAP_PDF_VIEWER_DEMO- foreground only.
    using fm SXPG_COMMAND_EXECUTE in background.
    thanks & regards.

  • 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.

  • 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

  • How to download a pdf file from the server from an strut application?

    Hi,
    I wan to download a pdf file from the server side to local system. Please help me how i use the down load option.

    Read up on the Struts download action [1].
    And next time, please post in the relevant forum, one of the web-tier ones [2].
    [1] http://wiki.apache.org/struts/StrutsFileDownload
    [2] http://forum.java.sun.com/category.jspa?categoryID=20
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • 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 installation files from app store to make a bootable USB

    Hi,
    I just got a new mac mini with OS X Server 10.8.2. I want to replace the original hard drive with an SSD, but I have problems downloading installation files from app store to make a bootable USB stick.
    When i click the Purchases button it tells me that OS X Server is already installed, and I'm not able to download the files.
    I have tried all the diffrent forms of Option key clicks but nothing works.
    Anyone out there who have a solution?
    Is it possible to get the installation media in some other way?
    By the way. Is it possible to install the non server version on a computer thats bought with the server version pre installed.
    I thought so. But I read something about firmware problems on a forum page?
    BR
    Daniel

    You cannot download Mountain Lion or Mountain Lion Server from the App Store if it was pre-installed on the computer.
    You can call Contacting Apple for support and service - this includes international calling numbers. They may be willing to arrange a download for you. Or you can reinstall via Internet Recovery: OS X (Lion/Mountain Lion)- About OS X Recovery.
    No, you can purchase and download Mountain Lion from the App Store on the computer you want to install it if it now has Snow Leopard or Lion running.

  • 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

  • How to download a file from application server to presentation server

    Hi experts,
    I want to download a file from application server to presentaion server, file contaims three fields customer name, customer email id and status..
    help me out i m new into sap.

    Dear Aditya,
    Please check below thread
    http://scn.sap.com/thread/1010164
    it will help you.
    BR
    Atul

  • Download text file from application server to client server.

    Hi all,
    I am facing a format issue while downloading text file from application server to the client machine.
    The issue is that, say I have 6 to 10 lines in my text file in application server. but when i store it on the hard drive,
    it shoes all the data in a single line. Where as i need to download data in same format as in application server.
    Awaiting for your responses.
    Regards,
    Jose

    Hi,
    If we want to upload file data from the application server to the internal table, there is no function module or class static method which we can use, we must wirte the code by ourselves.
    1. For the file data which has no seperator between field columns.
    PARAMETERS p_file  TYPE dxfile-filename.
    START-OF-SELECTION.
    OPEN DATASET p_file IN TEXT MODE ENCODING DEFAULT FOR INPUT.
      DO.
        READ DATASET p_file INTO gds_data.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        APPEND gds_data TO gdt_data.
      ENDDO.
    CLOSE DATASET p_file.2. For the file data which has tab separator between field columns.
    DATA: gds_field_split type gts_data.
    FIELD-SYMBOLS: <fs_field> TYPE gts_data.
    PARAMETERS p_file  TYPE dxfile-filename.
    START-OF-SELECTION.
    OPEN DATASET prf_file IN TEXT MODE ENCODING DEFAULT FOR INPUT.
      DO.
        READ DATASET p_file INTO gds_field.
        SPLIT gds_field  AT cl_abap_char_utilities=>horizontal_tab
             INTO TABLE gdt_field_split.
       LOOP AT gdt_field_split  into gds_field_split.
           gdf_index = gdf_index + 1.
           ASSIGN COMPONENT gdf_index OF STRUCTURE
                 gds_data to <fs_field>.
          IF sy-subrc = 0.
              <fs_field> = gds_field_split.
          ENDIF.
       ENDLOOP.
        APPEND gds_data TO gdt_data.
      ENDDO.
    CLOSE DATASET p_file.
    Thanks & regards,
    ShreeMohan

  • HELP111 Unable to download PDF files from website

    I can download PDF files from my emails but I can not download (or open I guess you might call it)PDF files from a website. Can anyone help? I have reader 9 with vista home and use norton 360.
    Thanks,
    Greg

    I had vers 8 and upgraded to 9 without removing the previous version. When I click on the PDF icon to open the document the little window comes, the circle goes round and round but the file never downloads.
    Help!!!
    Greg

Maybe you are looking for