Download File Server Behavior

I've successfully implemented the upload file server behavior.  The file uploads, it is in the directory, if I delete the record through DW it also deletes the file in the directory so I know DW knows where the file is stored.
My problem is with the download file server behavior, I can't seem to configure it to make it work.  It seems rather straight forward.  My dynamic display list displays the records (rows) with the file names but they do not show as links, I cannot click on them.  When I apply the download behavior, I see a generated "download" word added next to the display field on the page but this disappears when the page is actually displayed in a browser.
Any ideas?

please provide us a complete vision of your script or what ever your are doing.
because you miss many things in your question such as what comes before this error or after it... thank you

Similar Messages

  • Download File Server Behaviour

    I have never used the server behaviour and thought the documentation was a bit lacking of information. Are there any tutorials that I could watch or read that shows how to set it up and use it correctly. Is it suitable for controlling pdf ebook downloads by users?

    Did you ever find the answer to this? I am getting the same error message.

  • [Verifying Downloads] Java-Downloaded file not same filesize as on server

    This is in the security forum, but really involves a few details:
    1.) My program downloads files from a server
    2.) I have precalculated hash md5 values and file sizes in a .cfg file in the server which is also downloaded
    3.) The md5 is calculated of the downloaded files
    4.) The filesize is checked and the md5s are checked
    I have 4 client windows computers I've tested this on. It worked on 3. The fourth has a strange behavior: About every other file would have ~ 8 additional bytes in the filesize. I have no idea where those bytes are coming from, everytime it redownloads, same filesize, albeit 8 bytes too big. Therefore, the Md5 is screwed up.
    Here's my downloading from server code:
    OutputStream out = null;
              InputStream  in = null;
              try {
                   URLConnection dat = online.openConnection();
                   local.getParentFile().mkdirs();
                   out = new FileOutputStream(local);
                   while(true){
                        try {
                             in = dat.getInputStream();
                             break;
                        } catch (ConnectException e){
                             System.err.println("Couldn't contact server!");
                   byte[] buffer = new byte[1024];
                   int numRead;
                   tsecago = System.nanoTime();
                   readbytessecAgo = -1;
                   while ((numRead = in.read(buffer)) != -1) {
                        out.write(buffer, 0, numRead);
                        readbytes += numRead;
              } catch (Exception e){
                   e.printStackTrace();
              } finally {
                   try {
                        if (in != null) {
                             in.close();
                        if (out != null) {
                             out.close();
                   } catch (IOException ioe) {
              }SO, my solution was as follows:
    1.) Download file once and check md5 & filesize
    2.) If failed, download file AGAIN and check md5 & filesize
    3.) If failed 2x, download file for last time and check filesize - if the filesize is within 40 bytes of the actual file, allow it.
    This now works on all 4 computers, and as far as I can tell the downloaded files are wholly correct.
    But this is really annoying! Why is the above download code producing 8 extra bytes?!

    Thanks for your reply, Timo, and John, the same file downloading is working fine with my Integrated weblogic server, but the same application when i deployed in my DEV server i am getting the error.
    Code which i am trying to download file is
    public void downloadCardInserts(FacesContext facesContext,
    OutputStream outputStream) throws FileNotFoundException,
    IOException {
    // Add event code here...
    UploadedFile filename=(UploadedFile)browseFile.getValue();
    String fname=filename.getFilename();
    String fname1="//bwi-wfp-v01/Apps/SCII/TEST/LOG/Cards/RENEWAL/"+fname;
    System.out.println("file name11111:"+fname1);
    FileInputStream in = new FileInputStream(new File(fname1));
    byte[] buffer = new byte[1024];
    int bytes = in.read(buffer);
    while (bytes >= 0) {
    outputStream.write(buffer, 0, bytes);
    bytes = in.read(buffer);
    }

  • Problem with downloading file from FTP server

    Hello all
    I have uploaded a file from an application i developed and i want to download this file from another application. The code is
    public static void FTPcon() throws FtpException{
       String hostname = "my.ftp.server";
       String username = "myusername";
       String password = "mypass";
       Ftp ftp = new Ftp(hostname,username,password);
       ftp.setHostname(hostname);
            ftp.setUsername(username);
            ftp.setPassword(password);
            ftp.connect();
            ftp.setBinary();
            ftp.download("file.dat");
            ftp.disconnect();
    }The error i receive is java.io.FileNotFoundException: public.dat (The system cannot find the file specified) but the file is on the server.
    Thanks in advance for any help

    Cotton thank you for your reply
    Any other sugestions please?The server disagrees. So...
    - the file does not existThe file exists.I checked it with an FTP client program.
    - the file has a different nameThe file name is correct
    - you are connected to the wrong serverI am connecting to the correct server
    - you are in the wrong ftp directoryThe file is placed in the home directory
    - the ftp library you are using is broken (less
    likely)I am using the library from jscape.I dont think is broken because i can upload the file from the first application.
    >
    FTP isn't somehow broken in Java. I use it all the
    time. The problem is something listed above. I would
    check all of the first four if I were you because
    that's most likely where the problem is.Message was edited by:
    flightcaptain

  • [HELP] Download file from FTP server

    hi,
    I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
    import java.io.*;
    import java.net.*;
    public class FTPUpload {
    private static final int CTRLPORT = 21;
    private static Socket ctrlSocket;
    private static PrintWriter ctrlOutput;
    private static BufferedReader ctrlInput;
    private static byte[] localHostAddress;
    public final static String DIR = "C:\\zip\\";
    public static void main(String[] args) {
    try {
    String host = "192.168.1.1";
    String loginName = "testuser";
    String password = "password";
    String dirName = "/home/testuser";
    String fileName = "hello.zip";
    ctrlSocket = new Socket(host, CTRLPORT);
    localHostAddress = ctrlSocket.getLocalAddress().getAddress();
    ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
    ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
    ctrlOutput.println("USER " + loginName);
    ctrlOutput.flush();
    ctrlOutput.println("PASS " + password);
    ctrlOutput.flush();
    ctrlOutput.println("CWD " + dirName);
    ctrlOutput.flush();
    ctrlOutput.println("TYPE I");
    ctrlOutput.flush();
    FileInputStream fis = new FileInputStream(DIR + fileName);
    Socket dataSocket = dataConnection("STOR " + fileName);
    OutputStream outstr = dataSocket.getOutputStream();
    int n;
    byte[] buff = new byte[1024];
    while ((n = fis.read(buff)) > 0) {
    outstr.write(buff,0,n);
    dataSocket.close();
    fis.close();
    ctrlOutput.close();
    ctrlInput.close();
    ctrlSocket.close();
    }catch (Exception e) {
    e.printStackTrace();
    private static Socket dataConnection(String ctrlcmd)
    throws IOException,UnknownHostException {
    String cmd = "PORT ";
    ServerSocket serverDataSocket = new ServerSocket(0,1);
    for (int i=0;i<4;i++) {
    cmd = cmd + (localHostAddress[i] & 0xff) + ",";
    cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
    + ","
    + (serverDataSocket.getLocalPort() & 0xff);
    ctrlOutput.println(cmd);
    ctrlOutput.flush();
    ctrlOutput.println(ctrlcmd);
    ctrlOutput.flush();
    Socket dataSocket = serverDataSocket.accept();
    serverDataSocket.close();
    return dataSocket;
    }

    Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...

  • Download file from ftp server

    Can I download files from an ftp server by simply using the ip address or https:// url?    I've only gotten this to work by using the "ftp//:" address in previous projects and I'm not getting this to work in many different attempts. 
    Here is one...
     # FTP Config
    $FTPHost =
    "10.10.10.5"
    $Username =
    "admin"
    $Password =
    "12345678"
    $FTPFile =
    "test.log"
    # FTP Log File Url
    $FTPFileUrl =
    "ftp://" +
    $FTPHost +
    "/" +
    $FTPFile
    # Create FTP Connection
    $FTPRequest =
    [System.Net.FtpWebRequest]::Create("$FTPFileUrl")
    $FTPRequest.Credentials
    = New-Object System.Net.NetworkCredential($Username,
    $Password)
    $FTPRequest.Method =
    [System.Net.WebRequestMethods+Ftp]::DownloadFile
    $FTPRequest.UsePassive
    = $false
    $FTPRequest.UseBinary
    = $true
    $FTPRequest.KeepAlive
    = $false
    # Get FTP File
    $FTPResponse =
    $FTPRequest.GetResponse()
    $ResponseStream =
    $FTPResponse.GetResponseStream()
    $FTPReader =
    New-Object System.IO.Streamreader
    -ArgumentList $ResponseStream
    do
    Write-Host
    $FTPReader.ReadLine()
    while ($FTPReader.ReadLine()
    -ne $null)
    $FTPReader.Close()
    # Create FTP Connection
    $FTPRequest =
    [System.Net.FtpWebRequest]::Create("$FTPFileUrl")
    $FTPRequest.Credentials
    = New-Object System.Net.NetworkCredential($Username,
    $Password)
    $FTPRequest.Method =
    [System.Net.WebRequestMethods+Ftp]::DownloadFile
    $FTPRequest.UsePassive
    = $false
    $FTPRequest.UseBinary
    = $true
    $FTPRequest.KeepAlive
    = $false
    # Get FTP File
    $FTPResponse =
    $FTPRequest.GetResponse()
    $ResponseStream =
    $FTPResponse.GetResponseStream()
    $FTPReader =
    New-Object System.IO.Streamreader
    -ArgumentList $ResponseStream
    do
    Write-Host
    $FTPReader.ReadLine()
    while ($FTPReader.ReadLine()
    -ne $null)
    $FTPReader.Close()

    Hi!
    You don't need to specifically use an IP address. E.g can use
    $FTPHost = "myrandomserver.mycompany.com"
    $Username = "admin"
    $Password = "12345678"
    $FTPFile = "test.log"
    # FTP Log File Url
    $FTPFileUrl = "ftp://" + $FTPHost + "/" + $FTPFile

  • Webutil download file from app server

    i am calling a report from forms. report uses text_io to write delimited data to app server disk. report info also displays in browser using web.show_document. when i call report from forms i run report, use web.show_document to display in browser and then call webutil to download file to client form appserver. sequence would be in a manner as below:
    run_report_object (report_id);
    when report = finished then
    web.show_document;
    end if;
    webutil.download_file (filename);
    the problem is this: the web.show_document code runs but while this is running the webutil code also is running. but the report has not completed yet so when webutil runs looking for the file the report is supposed to write it cannot find it since the report has not completed. web.show_document fires off a browser session and then immediately runs the webutil code. but i dont want the webutil code to run until the report has successfully completed. does anyone know how to integrate these two functions into one step instead of running the report and allowing it to complete and then executing a separate step to download the file.
    thank you

    You might want to try this code snippet....
    --- code to set parameters, declare variables etc...
    l_report_return := run_report_object(l_report_id);
    l_report_status := report_object_status(l_report_return);
    WHILE l_report_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
         l_report_status := report_object_status(l_report_return);
    END LOOP;
    IF l_report_status = 'FINISHED' THEN
         /*Display report in the browser*/
         web.show_document(......);
    ELSE
         message('Error when running report ');
    END IF;

  • How to download files from Application Server of Unix o.s to local director

    Hi All,
    I am trying to download files from Apllication server of Unix operating Systems to local file in excel sheet format using a z-program.but whenever I am trying to use OPEN dataset ........
    it is showing sy-subrc = 8.
    Can I have any clew please.
    Thanks in advance,
    Regards,
    AMEER.

    Hi Sreekanth,
    Thanks a lot for quick reply.I have to download that files from z-program only. I am giving you my code below.
    *& Report  ZTRAK_DOWNLOAD                                         *
    REPORT  ZTRAK_DOWNLOAD  MESSAGE-ID ZCT                   .
    SELECTION-SCREEN BEGIN OF BLOCK DOWNLOAD WITH FRAME TITLE TEXT1.
      PARAMETERS :
           SERDIR LIKE RLGRAP-FILENAME DEFAULT '/usr/trak',
           LOCDIR LIKE RLGRAP-FILENAME DEFAULT 'C:\Trak'.
    SELECTION-SCREEN END OF BLOCK DOWNLOAD .
    SELECTION-SCREEN BEGIN OF BLOCK INFO2 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT2.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT3.
    SELECTION-SCREEN END OF BLOCK INFO2 .
    SELECTION-SCREEN BEGIN OF BLOCK INFO3 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT4.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT5.
            SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT6.
           SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT7.
           SELECTION-SCREEN SKIP 2.
           SELECTION-SCREEN COMMENT 1(79) TEXT8.
    SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT9.
    SELECTION-SCREEN END OF BLOCK INFO3.
    *- Internal Table to output data in Excel
    DATA: BEGIN OF tab_excel OCCURS 0,
            col1(50),
            col2(132),
            col3(255),
            col4(100),
            col5(100),
            col6(50),
            COL7(60),
            col8(30),
            col9(30),
            col10(30),
            col11(20),
            col12(15),
            col13(15),
          END OF tab_excel.
    DATA: FILE LIKE RLGRAP-FILENAME .
    DATA: W_DATASET(80).
    INITIALIZATION.
      TEXT1  = 'Download Reports'.
      TEXT2 = 'The Program downloads the reports generated by Trak'.
      TEXT3 = 'Utility from Server to Local PC.'.
      TEXT4 = 'Check the following before executing the Program.'.
      TEXT5 = '     1. A valid Server path is provided.'.
      TEXT6 = '     2. A valid Local PC path is provided.'.
      TEXT7 = '     3. Local PC has 10 MB free space.'.
      TEXT8 = 'The report can be executed in the forground.'.
    TEXT9 =
    'The report should be executed after execution of Transaction TRAK'.
    AT SELECTION-SCREEN.
    IF SERDIR EQ ''.
    MESSAGE E001(ZCT).
    ENDIF.
    IF LOCDIR EQ ''.
    MESSAGE E002(ZCT).
    ENDIF.
    START-OF-SELECTION.
    Download ABAP Development Summary Report
    FILE =  '\ABAP_Report_Developments.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAP_Report_Developments.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download BDC Development Report
    FILE =  '\BDC_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/BDC_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Development Summary Report
    FILE = '\Developments_Summary_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Developments_Summary_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Enhancement Development Report
    FILE =  '\Enhancement_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Enhancement_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download field exit Development Report
    FILE =  '\Field_Exit_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Field_Exit_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Frequency & Purpose Report
    FILE =  '\Frequency_And_Purpose_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Frequency_And_Purpose_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Group Developments Report
    FILE =  '\FunctionGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Module Developments Report
    FILE = '\FunctionModule_Developments_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionModule_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    FILE =  '\Include_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Include_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download UserGroup Developments Report
    FILE =  '\UserGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Modified_Standard_SAP_Objects_Report
    FILE = '\Modified_Standard_SAP_Objects_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Modified_Standard_SAP_Objects_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    *FILE =  '\Include_Developments_Report.XLS'.
    *CONCATENATE LOCDIR FILE INTO FILE.
    *W_DATASET = '/Include_Developments_Report.dat'.
    *CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    *PERFORM INIT.
    Download SAP Script Developments Report
    FILE =  '\SAP_Scipt_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/SAP_Scipt_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Transaction Developments Report
    FILE =  '\Transaction_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Transaction_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download User Exits Developments Report
    FILE =  '\UserExits_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserExits_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download ABAP Query Developments Report
    FILE =  '\ABAPQuery_Developments_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAPQuery_Developments_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Functional Area Developments Report
    FILE =  '\FunctionalArea_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionalArea_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    MESSAGE S003(ZCT) WITH LOCDIR.
    END-OF-SELECTION.
    This routine checks whether file exists if yes downloads it to
    the Local PC
    FORM INIT.
    OPEN DATASET W_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    DO.
       IF SY-SUBRC <> 0.
          EXIT.
       ENDIF.
       READ DATASET W_DATASET INTO  tab_excel.
       APPEND tab_excel.
       CLEAR tab_excel.
    ENDDO.
         PERFORM DOWNLOAD_FILE.
    ENDFORM.
    This routine downloads the data in an XL format on local PC
    FORM Download_File .
      CALL FUNCTION 'WS_DOWNLOAD'
                EXPORTING
                     FILENAME                = FILE
                     FILETYPE                = 'DAT'
                TABLES
                     DATA_TAB                = tab_excel
                EXCEPTIONS
                     FILE_OPEN_ERROR         = 1
                     FILE_WRITE_ERROR        = 2
                     INVALID_FILESIZE        = 3
                     INVALID_TYPE            = 4
                     NO_BATCH                = 5
                     UNKNOWN_ERROR           = 6
                     INVALID_TABLE_WIDTH     = 7
                     GUI_REFUSE_FILETRANSFER = 8
                     CUSTOMER_ERROR          = 9
                     OTHERS                  = 10.
        IF sy-subrc <> 0.
         message ''.       " Error in file transfer
        ELSE.
          CLEAR TAB_EXCEL.
          REFRESH TAB_EXCEL.
          FILE = ''.
          W_DATASET = ''.
        ENDIF.
    ENDFORM.
    I have created those files in Application Server running in another z-program in background mode.Then I am trying to download those files using above the program.I am creating those trak/Trak files manually and I can able to see those files in A.S level.But when downloading the same files I am facing the problem.
    regards,
    Ameer

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

  • File download from server

    Hi All,
    I have written a code that downloads a file from server using the following link given by Frank,
    File download from server
    I am able to get a open/save/cancel dialog with help of this. But issue is that applications of kind .doc/.xls/.ppt gets opened (If user clicks open) right in the internet explorer window instead of getting opened in a new office application....
    However .pdf runs fine.
    Can any thing be done for this???
    Any help....
    Regards,
    Amitt

    Hi,
    what do you have for the content disposition header?
    Try this:
             response.setHeader("Cache-Control", "max-age=0");
             response.setHeader("Content-Disposition", "attachment; filename=\"" + fname + "\"");
             response.setContentType("application/x-download");Brenden

  • I have an external server that stores all my movies and music, is there a way to stream it to my apple tv? If not is there a way I can link the folders to itunes (without downloading files to computer) and will that make them view-able for the apple TV?

    I have an external server that stores all my movies and music, is there a way to stream it to my apple tv?
    If not is there a way I can link the folders to itunes (without downloading files to computer) that will make them view-able for the apple TV?
    If none of that works is there a way to get it working alternativly?
    Additional Information:
    Everything is linked via ethernet cable.
    I'm using a PC to set it up.
    If you have any other questions feel free to ask and I'll help where I can.
    Thank you for any help

    (I think the daughter got he better end of the deal!)   I believe if you change the password and user id one of the devices it will stop that from occurring. But I'm not the one to tell you how to do it; someone like "Illaass" (Illaass seems to know how to correct / fix almost anything!) will know how if you don't. Just look for the "cat" icon.

  • 500 Internal Server Error in Download File

    Help , i am creating one Download file Run Exception!! <BR>
    <HR>
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr bgcolor="#FFFFFF">
    <td align="left" colspan="3" height="48" style="font-size:14pt;color:#666666">500 &nbsp Internal Server Error</td>
    </tr>
    </table>
    <br>
    <div style="font-size:12pt;font-weight:bold">
    Failed to process request. Please contact your system administrator.
    </div>
    <br>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:12pt;font-weight:bold;color:#FFFFFF;background-color:#3F73A3;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Error Summary</td></tr></tbody></table>
    <p>While processing the current request, an exception occured which could not be handled by the application or the framework.
    <p>If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator.
    To facilitate analysis of the problem, keep a copy of this error page.
    Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    <p>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:8pt;font-weight:bold;color:#000000;background-color:#A1A1A1;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Root Cause</td></tr></tbody></table>
    The initial exception that caused the request to fail, was:<br>
    <br>
    <div style="font-size:8pt;color:#FF0000">  
    com.sap.tc.webdynpro.services.exceptions.PDFDocumentCreationException: ../../local/Call_RfcPrintGr/App/~wd_key2_1282096396526/Error+PDF.pdf?sap-wd-download=1&amp;sap-wd-dl_behaviour=1&amp;sap-wd-cltwndid=5e0b24a1aa6b11dfbd1b00215e736cac&amp;sap-wd-appwndid=5e0b24a2aa6b11dfa4c900215e736cac&amp;sap-wd-norefresh=X
    </div>
    <br>
        at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:407)<br>
        at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)<br>
        at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:895)<br>
        at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)<br>
        at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)<br>
        ... 25 more<br>
    <br>
    <p>See <a href="#exceptionchain">full exception chain</a> for details.
    <br>
    <br>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:12pt;font-weight:bold;color:#FFFFFF;background-color:#3F73A3;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Correction Hints</td></tr></tbody></table>

    <p>
    <b>PDF Document Render Exception.</b></br></br>Please check the following:<ul><li>Template file is not corrupted.</li><li>Data being passed is a vaild XML.</li><li>You have configured the web service client proxy properly.</li><li>Adobe Document Service (ADS) is configured properly (follow the configuration guide available at <a href="https://service.sap.com/instguides">SAP service market place</a> to check with all the supported configuration options).</li></ul></br>If the problem still persists, report it to us. We need the following information to investigate the problem further:<ul><li>Click <a href="../../local/Call_RfcPrintGr/App/~wd_key2_1282096396526/Error+PDF.pdf?sap-wd-download=1&sap-wd-dl_behaviour=1&sap-wd-cltwndid=5e0b24a1aa6b11dfbd1b00215e736cac&sap-wd-appwndid=5e0b24a2aa6b11dfa4c900215e736cac&sap-wd-norefresh=X"><b>here to download the error pdf</b></a> that has been generated instead of the actual pdf. This is an important document to analyse the problem further.</li><li>Follow the steps below to get the system information where web dynpro is running:<ul><li>Go to : http://host:port/sap/monitoring/SystemInfo</li><li>Log on as Administrator user.</li><li>Click on link <i>all components...</i> there. This will take you to the system information page that lists the version information of all the componenets installaed on your server.</li><li>Save this entire page (containing the version information of all the componenets installed on your server)</li></ul></li><li>Follow SAP notes mentioned below to get the trace files for web dynpro and ADS. Then run your application again. Get the <strong>latest updated</strong> trace files from the server. If webdynpro and ADS are not running on the same server, then you need to turn on the tracer for the respective servers:<ul><li>#742674 to turn on the web dynpro trace on the server where web dynpro is running.</li><li>#846610 to turn on the ADS trace on the server where ADS is running.</li></ul></li>
    <p><i>Note: the above hints are only a guess. They are automatically derived from the exception that occurred
    and therefore can't be guaranteed to address the original problem in all cases.</i>
    <br>
    <br>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:12pt;font-weight:bold;color:#FFFFFF;background-color:#3F73A3;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>System Environment</td></tr></tbody></table>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:8pt;font-weight:bold;color:#000000;background-color:#A1A1A1;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Client</td></tr></tbody></table>
    <table border="0" cellpadding="3" cellspacing="1" style="font-size:8pt;color:#333333;background-color:#DCE3EC;float:left;margin-bottom:2px"><tbody>
    <tbody><tr><td style="background-color:#FFFFFF">Web Dynpro Client Type</td><td style="background-color:#FFFFFF">HTML Client</td></tr>
    <tr><td style="background-color:#FFFFFF">User agent</td><td style="background-color:#FFFFFF">Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.126 Safari/533.4</td></tr>
    <tr><td style="background-color:#FFFFFF">Version</td><td style="background-color:#FFFFFF">null</td></tr>
    <tr><td style="background-color:#FFFFFF">DOM version</td><td style="background-color:#FFFFFF">null</td></tr>
    <tr><td style="background-color:#FFFFFF">Client Type</td><td style="background-color:#FFFFFF">safari</td></tr>
    <tr><td style="background-color:#FFFFFF">Client Type Profile</td><td style="background-color:#FFFFFF">nn7</td></tr>
    <tr><td style="background-color:#FFFFFF">ActiveX</td><td style="background-color:#FFFFFF">disabled</td></tr>
    <tr><td style="background-color:#FFFFFF">Cookies</td><td style="background-color:#FFFFFF">enabled</td></tr>
    <tr><td style="background-color:#FFFFFF">Frames</td><td style="background-color:#FFFFFF">enabled</td></tr>
    <tr><td style="background-color:#FFFFFF">Java Applets</td><td style="background-color:#FFFFFF">enabled</td></tr>
    <tr><td style="background-color:#FFFFFF">JavaScript</td><td style="background-color:#FFFFFF">enabled</td></tr>
    <tr><td style="background-color:#FFFFFF">Tables</td><td style="background-color:#FFFFFF">enabled</td></tr>
    <tr><td style="background-color:#FFFFFF">VB Script</td><td style="background-color:#FFFFFF">enabled</td></tr>
    </tbody></table>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:8pt;font-weight:bold;color:#000000;background-color:#A1A1A1;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Server</td></tr></tbody></table>
    <table border="0" cellpadding="3" cellspacing="1" style="font-size:8pt;color:#333333;background-color:#DCE3EC;float:left;margin-bottom:2px"><tbody>
    <tbody><tr><td style="background-color:#FFFFFF">Web Dynpro Runtime</td><td style="background-color:#FFFFFF">Vendor: SAP, build ID: 7.0104.20090324111057.0000 (release=NW701_04_REL, buildtime=2009-06-12:08:35:57[UTC], changelist=58858, host=pwdfm106), build date: Fri Aug 28 14:10:00 CST 2009</td></tr>
    <tr><td style="background-color:#FFFFFF">J2EE Engine</td><td style="background-color:#FFFFFF">7.01   PatchLevel 58805.</td></tr>
    <tr><td style="background-color:#FFFFFF">Java VM</td><td style="background-color:#FFFFFF">Java HotSpot(TM) 64-Bit Server VM, version:1.4.2_17-b06, vendor: Sun Microsystems Inc.</td></tr>
    <tr><td style="background-color:#FFFFFF">Operating system</td><td style="background-color:#FFFFFF">Windows 2003, version: 5.2, architecture: amd64</td></tr>
    </tbody></table>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:8pt;font-weight:bold;color:#000000;background-color:#A1A1A1;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Session &amp; Other</td></tr></tbody></table>
    <table border="0" cellpadding="3" cellspacing="1" style="font-size:8pt;color:#333333;background-color:#DCE3EC;float:left;margin-bottom:2px"><tbody>
    <tbody><tr><td style="background-color:#FFFFFF">Session Locale</td><td style="background-color:#FFFFFF">zh_TW</td></tr>
    <tr><td style="background-color:#FFFFFF">Time of Failure</td><td style="background-color:#FFFFFF">Wed Aug 18 09:53:16 CST 2010 (Java Time: 1282096396526)</td></tr>
    </tbody></table>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:8pt;font-weight:bold;color:#000000;background-color:#A1A1A1;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Web Dynpro Code Generation Infos</td></tr></tbody></table>
    <table border="0" cellpadding="3" cellspacing="1" style="font-size:8pt;color:#333333;background-color:#DCE3EC;float:left;margin-bottom:2px"><tbody><thead><tr><td colspan="2">local/Call_RfcPrintGr</td></tr></thead>
    <tbody><tr><td style="background-color:#FFFFFF">SapDictionaryGenerationCore</td><td style="background-color:#FFFFFF">7.0017.20061002105236.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:01:31[UTC], changelist=419377, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapDictionaryGenerationTemplates</td><td style="background-color:#FFFFFF">(unknown)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapGenerationFrameworkCore</td><td style="background-color:#FFFFFF">7.0017.20060719095755.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:48:53[UTC], changelist=411255, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapIdeWebDynproCheckLayer</td><td style="background-color:#FFFFFF">7.0017.20080801093115.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:07:06[UTC], changelist=495367, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapMetamodelCommon</td><td style="background-color:#FFFFFF">7.0017.20061002105432.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:49:40[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapMetamodelCore</td><td style="background-color:#FFFFFF">7.0017.20061002105432.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:49:34[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapMetamodelDictionary</td><td style="background-color:#FFFFFF">7.0017.20060719095619.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:58:48[UTC], changelist=411251, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapMetamodelWebDynpro</td><td style="background-color:#FFFFFF">7.0017.20080801093120.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:03:59[UTC], changelist=495368, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapWebDynproGenerationCTemplates</td><td style="background-color:#FFFFFF">7.0017.20080829103545.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:16:41[UTC], changelist=499141, host=pwdfm101)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapWebDynproGenerationCore</td><td style="background-color:#FFFFFF">7.0017.20080801093115.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:07:12[UTC], changelist=495367, host=PWDFM101.wdf.sap.corp)</td></tr>
    <tr><td style="background-color:#FFFFFF">SapWebDynproGenerationTemplates</td><td style="background-color:#FFFFFF">7.0017.20080829103545.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:16:41[UTC], changelist=499141, host=pwdfm101)</td></tr>
    </tbody></table>
    <table border="0" cellpadding="3" cellspacing="1" style="font-size:8pt;color:#333333;background-color:#DCE3EC;float:left;margin-bottom:2px"><tbody><thead><tr><td colspan="2">sap.com/tcwddispwda</td></tr></thead>
    <tbody><tr><td style="background-color:#FFFFFF">No information available</td><td style="background-color:#FFFFFF">null</td></tr>
    </tbody></table>
    <table border="0" cellpadding="3" cellspacing="1" style="font-size:8pt;color:#333333;background-color:#DCE3EC;float:left;margin-bottom:2px"><tbody><thead><tr><td colspan="2">sap.com/tcwdcorecomp</td></tr></thead>
    <tbody><tr><td style="background-color:#FFFFFF">No information available</td><td style="background-color:#FFFFFF">null</td></tr>
    </tbody></table>
    <br>
    <br>
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:12pt;font-weight:bold;color:#FFFFFF;background-color:#3F73A3;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Detailed Error Information</td></tr></tbody></table>
    <a name="exceptionchain">
    <table border="0" cellpadding="3" cellspacing="0" width="100%" style="font-size:8pt;font-weight:bold;color:#000000;background-color:#A1A1A1;padding-left:6px;clear:left;margin-bottom:2px;"><tbody><tr><td>Detailed Exception Chain</td></tr></tbody></table>
    </a>
    <pre>
    com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:420)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:895)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sap.tc.webdynpro.services.exceptions.PDFDocumentCreationException: ../../local/Call_RfcPrintGr/App/~wd_key2_1282096396526/Error+PDF.pdf?sap-wd-download=1&amp;sap-wd-dl_behaviour=1&amp;sap-wd-cltwndid=5e0b24a1aa6b11dfbd1b00215e736cac&amp;sap-wd-appwndid=5e0b24a2aa6b11dfa4c900215e736cac&amp;sap-wd-norefresh=X
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:407)
         ... 29 more
    </pre>
    </div>
    </div>

  • How can i Download file directly to http server (like in cloud server) instead user's pc

    I wan to create a plugin like download manager which download file directly in cloud.
    On Download prompt it ask for login and after user authenticate successfully it will redirects to our website in next tab where download will started.
    But i am unable to get download file url when click on particular file for download .
    I need this download file url and pass it to http server to download there.
    Please help me how can i do this ???
    Urgent help required.
    Thanks in advance.
    Sagar Modi

    Try to ask advice at the MozillaZine Extension Development forum.
    *http://forums.mozillazine.org/viewforum.php?f=19
    You need to register on the MozillaZine forum site in order to post at that forum.

  • Error in PDF Conversion while downloading file from application server

    Hi,
    I am facing a problem in which i have to download file from application server which is a PDF file (output of SAP Script). I am downloading this file using following code in BSP technology:
    * event handler for data retrieval
    EMPCD = REQUEST->GET_FORM_FIELD( 'emp' ).
    MONTH = REQUEST->GET_FORM_FIELD( 'mn' ).
    YEAR  = REQUEST->GET_FORM_FIELD( 'yr' ).
    W_IND = 'N' .
    DATA : wa_zform16 type  zform16.
    DATA : file_path type string.
    DATA : l_pdf_len type string.
    DATA STR TYPE STRING.
    DATA: OUTPUT    TYPE STRING ,
          L_XSTRING TYPE XSTRING ,
          APP_TYPE  TYPE STRING.
    DATA: PDF_TABLE TYPE  RCL_BAG_TLINE.
    DATA PHY_NAME_OUT     TYPE SAPB-SAPPFAD.
    concatenate '/usr/sap/put/form16/' EMPCD '_' YEAR '.PDF'  into file_path
    *PHY_NAME_OUT = '/usr/sap/put/form16/01000200_2007.PDF'.
    PHY_NAME_OUT = file_path.
    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.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      APP_TYPE = 'APPLICATION/PDF'.
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          TEXT     = OUTPUT
                MIMETYPE = 'APPLICATION/PDF'
    *            MIMETYPE = 'APPLICATION/PDF;charset=utf-16le'
        IMPORTING
          BUFFER   = L_XSTRING.
      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.
    Result of this code is : there is a pop up asking to open or save pdf format and process is complete, but i have problem in downloaded file.
    At the time of creation i have put BMP image for signature in PDF file and it is working fine but when i upload that file in Application server and then download it with above used code it save the PDF file but when i open that file so whereever i have used signature that page gives error and could not display that scanned signature.
    Can anyone please help me in this regard.
    or is there any possibility from which i can download that file just like File transfer from BSP.
    Keep in mind that i am using BSP technology so all GUI based function module to download file are not working.
    waiting for your reply.....
    Regards,
    Gagan

    Hi Raja,
    I have standard sap form for TDS Certificate on which i have include an BMP image for digital signature and download that script into pdf format.While i download that PDF looks ok but it is not working in BSP.
    Regards,
    Gagan

  • When i download any file it start in a second but when i pause the downloading file & after some time when i open it amessage flash 'download error' source file could not be read please try again later or contact the server administrator.

    when i download any file it works frequently and downloading start in a second but when i pause the downloading file & after some time when i open it,The downloading not start proper and after some time a message flash 'download error' source file could not be read please try again later or contact the server administrator.

    I downloaded the Microsoft Autoruns package and ran it.  There are no programs in the LSA Providers tab, and Apple's Bonjour is the only program in the Winsock Providers tab.  I also did the "netsh winsock reset" and rebooted.  It didn't fix the problem.  Any more ideas?

Maybe you are looking for