Method to download a file through browser

Hello,
What is the ABAP method to download a file on desktop when the control comes in from the browser window?
I have tried with "cl_gui_frontend_services=>gui_download" method but this does not work and gives unknown error exception.
Is there an alternate method to achieve the download functionality?
Best Regards,
Pankaj

Hi Tamás,
No, I am using a WAD template and there is a button on the WAD report. When I click on button, the selection binding parameters are passed to my customised class through a planning function. Within the implementation of class method, I try to call the GUI_DOWNLOAD method, where it does not work.
Is there any alternative to this?
Best Regards,
Pankaj

Similar Messages

  • Launch pdf file through browser window.

    I tried this.String cmd="iexplore.exe http://subash/doc/help.pdf";
    try{
    Process p = Runtime.getRuntime().exec(cmd);
    }catch(Exception e)
    System.out.println("Error -- "+e);
    }I am getting Error --
    java.io.IOException: CreateProcess: iexplore.exe http://subash/doc/help.pdf error=2please give me a suggestion.
    Otherwise so any other way to launch pdf file through browser window.

    Hi,
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram
    PT_SEQ_NO     1     1     N     NUMBER (10)          Yes
    SM_SERVICE_ID     2          N     VARCHAR2 (15 Byte)          Yes
    PT_FILE_PATH     3          Y     VARCHAR2 (100 Byte)          Yes
    PT_FILE_SERVER_PATH     4          N     VARCHAR2 (200 Byte)          Yes
    NO, I'm not storing that file in Blob. i'm not storing it in database. i'm just transfering it from client location to server location . That's it.
    But i'm storing both the path from where i picked the file and where i uploaded. That's client path in PT_FILE_PATH field and server path in PT_FILE_SERVER_PATH.
    now i want to get that file from server location and show it only on Browser.. Not storing in database, justing putiing in folder at server location.
    thanks
    kammy

  • Adobe Reader 9.0 has delay when downloading PDF file through proxy server

    There is an issue with the Adobe Reader (and Acrobat) 9.0 PDF Link Helper ActiveX control for Internet Explorer (6 or 7) on Windows computers with respect to proxy servers. Due to this issue, there is a 2 minute delay for any Internet Explorer web browser on the Deere network before any PDF file will open from the Internet within the IE web browser if In-Place activation (Display PDF in Browser) is enabled in Adobe Reader 9. This problem does not affect Adobe Reader 8.
    What we are seeing is that when someone on the Deere network clicks on a links to a PDF file in the Internet, the PDF file downloads immediately. But then, after the PDF file is downloaded, the Adobe Reader 9 PDF Link Helper ActiveX control tries to talk directly to the Internet web site. The Adobe Reader 9 PDF Link Helper ActiveX control does not know how to negotiate our proxy server. So after a minute or two, the Adobe Reader 9 PDF Link Helper ActiveX control times out (gives up) and allows the IE browser to display the downloaded PDF file in the IE browser.
    We work around this issue by disabling In Place Activation for PDF files in IE (uncheck Display PDF in Browser). But we would like a fix for the PDF Link Helper ActiveX control.
    [HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\Originals]
    "bBrowserIntegration"=dword:00000000
    [HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\Originals]
    "bBrowserIntegration"=dword:00000000
    Here's what our proxy people see when they do a trace of a PDF file download through their proxy server with IE 7 and Adobe Reader 9 with Display PDF in Browser checked.
    The browser tells the proxy to download the pdf, it does and sends it to the browser. Before the browser opens it something in Acrobat ( or I.E. ? ) tries to make a connection back to the content server that hosted the pdf. Unfortunately this agent does not ask the proxy to make the request for it, but rather asks local DNS to resolve the Internet server name. This request dies because our internal private network does not know anything about the Internet. Only the DNS used by the proxy can resolve Interent names. After two unsuccessful DNS queries into the private network, the agent tries to resolve the same Internet name with NBNS ( netbios name service) queries again into the private network, with the same results. These requests persists for more than two minutes ( over 200 unresolved queries ). Then for whatever reason the agent gives up and the already downloaded pdf file loads into the browser.
    I have a TCP capture file if you want it.

    Hi,
    I have the same problem with some specific PDF files. For more than 90% it hangs when opening the file, but sometimes it works (with the same file).
    The workflows where it sometimes worked:
    a) Loading the PDF, the reader is started the first time and displays license dialog.
    b) The reader was already runing and file is loaded with Drag&Drop or File/Open in the Reader
    But most times it does not load.
    I could not find out which file is missing or trying to be opened. So I tried with the CP949.TXT.
    I found no CP949.TXT in Reader 8 installation, so I took it from the link, pasted into notepad and stored in the respective directory
    C:\Program Files (x86)\Adobe\Reader 9.0\Resource\TypeSupport\Unicode\Mappings\win\
    Now it seems to work fine, opening PDFs with double click from exporer.
    But why did Adobe Reader 8 not have the TypeSupport directory at all?
    Even when having found a fix (hack?), I think I did not understand the cause of this problem.
    Regards,
    TheLastReader

  • Downloading the file through transaction F110.

    Hi all,
           My requirement is to generate a payment file in EFT format(comma separated format) and to download that file to a PC location using the transaction F110. The EFT file needs to generated automatically after the payment run. So I am copying the standard program RFFONZ_T which is the payment medium program and adding my code to generate the EFT file there. After the program execution, the file needs to displayed in  the F110 transaction. But it is not coming in F110.

    Hello,
    Can you please confirm that the program name is maintained in FBZP?
    Goto FBZP --> Pymt Methods in Country --> Give the Payment Method name --> In the Pymt Medium tab, Select the "Use Classic pymt medium programs" & give your program name there.
    In F110, you can view the EFT through:
    Environment --> Pymt Medium --> DME Administration
    BR,
    Suhas
    Edited by: Suhas Saha on Feb 17, 2009 12:48 PM

  • System tries to download .jnlp file through SSL

    Using Tomcat5 on Windows when running HTTPS, when I click the link to Launch my .jnlp file it just tries to download it to my file system. When I disable SSL and run nomally with HTTP, it works fine. Why won't JWS pick it up through HTTPS???
    THANKS!

    Check the mime-types... generally download errors happen if the mime-type is not properly delivered by the server. I fear it may be Tomcat does this.
    To check the mime-type, try to see inside the download-manager of the browser, or something such.
    paul

  • Downloading the file through http.

    Had anyone tried to download the zip file through http. If anyone had, please help to approach this.Thanks in advance.
    Also the way to unzip the downloaded file.

    Thank u for reply.I am trying to download the content of the xml file and download using NSUrl and parse it using NSXmlParser.I would like to know is there any way to handle the huge amount to be downloaded.

  • Download multiple files without browse

    Hi,
    I need to automate a download process in an app I am
    currently writing. I need to take a bunch of files from a folder on
    my server (
    http://www.somesite.com/folder/)
    and download them to a specific location on my local disk
    (C:\server_files\).
    Because I don't want the user to have to specify each file
    individually from a browse window I don't think I can use the
    standard fileReference.download() method to perform the operation.
    I have been trying to find out some information about using
    URLStream but I am not sure if this is the easiest or even correct
    path to peruse?
    Any help or advise on this issue would be greatly
    appreciated.
    Regards
    Adam

    Hey Lebedinsky,
    Sadly the only solution I've come across is to zip the files
    so that they are all packaged together but this is not a viable
    solution for me. From what I can see the operating system will
    always prompt the user for a location to save each file as a means
    of security.
    Please keep me posted if you find out anything, and I mean
    anything, about this issue?
    Rgds
    Adam

  • Why does the Downloads Save files to Browse button do nothing when pressed?

    I'm trying to download a couple of different files from a couple of different web sites. I see the "Opening {filename}" dialog box with the "Would you like to save this file?" question and the Save File button, but nothing happens when I click on the Save File button except that the dialog box closes.
    When I go into Tools/Options General tab, I select the "Save files to" button, and when I click on the Browse button to choose a directory, nothing happens.
    It appears I can no longer download files.

    Please disregard. My "My Documents" folder is mapped to a file server on the network, and for some reason the last time I logged in, I was denied access to that network resource. I logged out and logged back in again, and I am able to download successfully.
    D'oh.

  • Viewing xsql files through browser

    Hi all,
    a basic question regarding creating xsql files using jDeveloper...
    Once created if I hit run, a Netscape browser pops up, accessing ...myhtml/WebAppRunner.html
    this in turn pops up a new Internet explorer browser with the results of the database query as a temp xml file.
    My question is that if I access the <file>.xsql through either browser directly (not using run in jdev) then I just get the textual contents of the file, I thought the database query would be automatically run and only the results shown?
    I want to do simple queries, and be able to enter the filename (and ?paramters) in to the location bar within the browser but currently this doesnt seem to work. Do I have to change any properties or plug-ins for the browser?
    All info gratefully received, regards from an Oracle developer having his first look at this funky xml-world!
    Julian

    The query executes when you "run" the XSQL page through a Web server (JDeveloper includes a simple one-person Web server for development and testing) that invokes the underlying Java code. When you access the same XSQL page through the file system, the code doesn't execute, and, as you have seen, the browser displays the contents of the file.
    To do the kind of testing you describe, you need a Web server, for example, the Web-to-Go server that comes with the XSQL Servlet, or Apache (it's free). OTN has some sample apps that show how to do this. See
    [list][*]WebStore B2B Exchange
    [*]XML Flight Finder[list]
    for more information.
    Regards,
    -rh
    null

  • Can't reach files through browser

    I have a web app project deployed on an application server, through an SSH terminal I can see and open the files. They are soft linked to another folder on another machine. The problem is that I can't open them in a browser (files like images) anymore, this happened suddenly. I don't know what have happened. Anyone have any idea what might be the cause?
    Regards,
    Mike R.

    allowLink=true

  • To download a file through JSP

    I have a JSP page on which there is a Button, when clicking this button it must open a new browser window with "save file as" dialog.
    How can i do this in JSP. Note that the user cant see or find the diretory in which files are stored.
    I have seen that in ASP it is possible . is it possible in JSP .
    renjith

    Many file types are causing a download by simply linking them: http://..../sample.exe Others may be saved by "save as".

  • Download Excel file through Web dynpro with no windows open?

    Can we have a web dynpro application that just returns an Excel file in the response with no open windows? Similar to a java servlet that is used to download a Excel file?
    This basically means that I cannot use wdComponentAPI.getWindowManager().createNonModalExternalWindow()
    Java Servlet Code
    HttpSession session = request.getSession();      // get a handle on the session id
    response.setContentType("application/download");
    response.setHeader("Content-Disposition", "filename=RTIS_Report.xls");
    PrintWriter out = null;
    out = response.getWriter();
    String report = request.getParameter("REPORT");
    JCO.Table lines = download(request, session, report);
    for (int i = 0; i < lines.getNumRows(); i++) {
         lines.setRow(i);
         String content = lines.getString("LINES") + "\n";
         out.write(content);
         out.flush();
    out.flush();
    out.close();

    Hi,
    I think you can use IWD Cached Web Resource to achieve this..
    See the below code FYI..
    public void downloadToExcel( )
        String fileName = "Customer" + ".xls";
         IWDCachedWebResource cachedExcelResource = null;
         try
              File f = new File("Customer.xls");
              WritableWorkbook workbook =   Workbook.createWorkbook(f);
              WritableFont black = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.BOLD,false,UnderlineStyle.SINGLE,Colour.BLACK);
              WritableCellFormat blackFormat = new WritableCellFormat(black);
              WritableFont blue = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.NO_BOLD,false,UnderlineStyle.NO_UNDERLINE,Colour.BLUE);
              WritableCellFormat blueFormat = new WritableCellFormat(blue);
              WritableSheet sheet = workbook.createSheet("Customer", 0);
                   Label label;
                   String[] header={"Corporate Code","Batch ID"};
                   for (int i=0;i<2;i++)
                        label = new Label(i,0,header<i>.toString(),blackFormat);
                        sheet.addCell(label);
                   WritableCellFormat integerFormat = new WritableCellFormat(NumberFormats.INTEGER);
                   jxl.write.Number number;
                   // Reading the contents
                   for(int i=0;i<wdContext.nodeVn_DownloadToExcel().size();i++)
                        String strCorpName = wdContext.currentContextElement().getVa_CorpCode();
                        String strBatchID =     wdContext.nodeVn_DownloadToExcel().getVn_DownloadToExcelElementAt(i).getVa_BatchID();
                        label = new Label(0,i+1,strCorpName,blueFormat);
                        sheet.addCell(label);
                        label = new Label(1,i+1,strBatchID,blueFormat);
                        sheet.addCell(label);
                   workbook.setColourRGB(Colour.LIME, 0xff, 0, 0);
                   workbook.write();
                   FileInputStream excelCSVFile = new FileInputStream(f);
                   IWDCachedWebResource cachedWebResource = null;
                   if (excelCSVFile!= null)
                        cachedWebResource = WDWebResource.getWebResource(excelCSVFile, WDWebResourceType.getWebResourceType("xls","application/ms-excel"));
                   cachedWebResource.setResourceName(fileName);
              cachedExcelResource = cachedWebResource;
              wdContext.currentContextElement().setVa_DownloadToExcel(cachedExcelResource.getURL());
              workbook.close();
         catch (Exception ex)
              wdComponentAPI.getMessageManager().reportException("Error in Excel Download"+ex.getMessage(),false);
    Regards,
    Vijay

  • Two different methods for downloading a file using URL...

    I was just wondering if someone could shed some light on whether I should be downloading files using java.net.URL or java.net.URLConnection
    Here are two ways that I have found to work (and yes I realize that one is outputting to a stream and the other is getting put into a StringBuffer):
          InputStream in = url.openStream();
          byte[] b = new byte[buffSize];
          fileOutStream = new FileOutputStream(fileToBeCreated);
          while ((bytesRead = in.read(b)) != -1){
            totalFileSize+=bytesRead;
            fileOutStream.write(b, 0, bytesRead);
          }and
          URLConnection _con = url.openConnection();
          in = new BufferedReader(new InputStreamReader(_con.getInputStream()));
          String inputLine;
          while ((inputLine = in.readLine()) != null){
              webPageStringBuff.append(inputLine+"\r\n");
          }In both of the above cases url is just a URL object that has already been instantiated with a valid URL.
    So, just to re-iterate, I realize that the output portion of this code is doing something different (i.e. writing to a stream as opposed to appending to a StringBuffer) but I would like to know whether there is any reason to choose using the URLConnection to get the stream as opposed to using the URL to get the stream.
    Thanks,
    Tim

    hi,
    try out the following code
    // Program: copyURL.java
    // Author: Anil Hemrajani ([email protected])
    // Purpose: Utility for copying files from the Internet to local disk
    // Example: 1. java copyURL http://www.patriot.net/users/anil/resume/resume.gif
    // 2. java copyURL http://www.ibm.com/index.html abcd.html
    import java.net.*;
    import java.io.*;
    import java.util.Date;
    import java.util.StringTokenizer;
    class copyURL
    public static void main(String args[])
    if (args.length < 1)
    System.err.println
    ("usage: java copyURL URL [LocalFile]");
    System.exit(1);
    try
    URL url = new URL(args[0]);
    System.out.println("Opening connection to " + args[0] + "...");
    URLConnection urlC = url.openConnection();
    // Copy resource to local file, use remote file
    // if no local file name specified
    InputStream is = url.openStream();
    // Print info about resource
    System.out.print("Copying resource (type: " +
    urlC.getContentType());
    Date date=new Date(urlC.getLastModified());
    System.out.println(", modified on: " +
    date.toLocaleString() + ")...");
    System.out.flush();
    FileOutputStream fos=null;
    if (args.length < 2)
    String localFile=null;
    // Get only file name
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
    localFile=st.nextToken();
    fos = new FileOutputStream(localFile);
    else
    fos = new FileOutputStream(args[1]);
    int oneChar, count=0;
    while ((oneChar=is.read()) != -1)
    fos.write(oneChar);
    count++;
    is.close();
    fos.close();
    System.out.println(count + " byte(s) copied");
    catch (MalformedURLException e)
    { System.err.println(e.toString()); }
    catch (IOException e)
    { System.err.println(e.toString()); }
    ok

  • Download a file through Struts

    Hey,
    I would like to provide an excel file download feature in my Struts application. How should i go about it. I know how to do it in regualr JSP/servlets but in struts i am little bit confused.
    here is what shoudl happen. In one of the Front end screens the user clicks on a button and the server should send a excel file( which is also generated dynamically at the server side) to the client. How do i go about it in struts.
    Thanks
    KM

    Pretty much exactly the same way you would in regular
    JSP/Servlets. What is different about it?
    Your Action can do anything that a servlet can do.
    Write to the output stream yourself, and then just
    return null, from the action to inform struts you have
    already taken care of the response.
    Cheers,
    evnafetsIt works... Thanks a lot for ur help evnafets

  • Upload and Download file through RFC called by java

    We are trying to download/upload file through rfc function called by java(JCO),In the rfc function,we use WS_DOWNLOAD,but it does not work.
    Any one know about this,Please help ,thanks very much.
    Message was edited by: gw gw

    Hi gw,
    This question looks a little confusing to me.
    WS_DOWNLOAD is used to download files from SAP to the presentation server (your PC).  It will not work through RFC.
    BUT, also if you want to access a function module via RFC is must be RFC enabled (as Anand pointed out).
    AND WS_DOWNLOAD uses a PUSH approach.  It pushes a file to the PC from ABAP.  So even if the two points above weren't a problem it still would not be suitable for what you are doing.
    Perhaps you could explain a little what you are trying to achieve.
    Cheers,
    Brad

Maybe you are looking for

  • Document Access via Custom Authentication Source?

    I don't know if this should be under the 'Content Services' forum or this one, so I'll start here. I have a custom content crawler that crawls documents stored in a database. That works fine, but now I want to integrate access control into the equati

  • How to delete a calendar on the iphone ???

    When the mobile me services were upgraded a few days ago, the calendar imported from entourage and synced to the iphone via iCal was suddenly duplicated. syncing works just fine, but it is impossible to get rid of the old calendar on the iPhone. even

  • Employee Data Transfer From Recruitment to PA

    Hi All, I have a query pertaining to employee data transfer from recruitment (PBA7) to PA. Here the client uses recruitment module only for data maintenance and then  transfer the data to PA module. Is it possible if we skip the data transfer from Re

  • Dead pixels on 2011 iMac?

    Hey everyone, I have a mid 2011 iMac 21.5 with an i7 processor.  For the most part it's worked great for me but recently I started noticing what looks like dead pixels on my screen after start ups and coming out of sleep mode.  I took a picture of my

  • Unexpected end of SIP message

    Hi, In WLSS 2.2.0, we are getting this error "unexpected end of SIP message". What I have to do? Please clarify the same. Regards, Janakiraman. N