File Download Utility

Hi,
I need to write a utility that would allow a user to input a file name and the utility would then download that file from the server. I was thinking of writing a JSP page to provide UI for client to input the file name. This JSP would talk to Servlet and then generate a response as html with a link for the user document.
However, I am trying to understand if there is any other way to do this, like having an applet talk to POJO on the Server through Socket. If yes, will the pojo be able to server the requested file as a single entity without having to write it as byte stream and having the applet rebuild from that byte stream.
Would appreciate any help.
Thansk!!

Hi,
I need to write a utility that would allow a user to input a file name and the utility would then download that file from the server. I was thinking of writing a JSP page to provide UI for client to input the file name. This JSP would talk to Servlet and then generate a response as html with a link for the user document.
However, I am trying to understand if there is any other way to do this, like having an applet talk to POJO on the Server through Socket. If yes, will the pojo be able to server the requested file as a single entity without having to write it as byte stream and having the applet rebuild from that byte stream.
Would appreciate any help.
Thansk!!

Similar Messages

  • File Download Hell, this is insane!!

    I have been searching for days and cannot believe that the only solution to allow users to download files NOT in the WEB-INF directory is to add a plugin from a third party entity.
    I'm not even sure that suggestion would work as I don't have the option of trying it out.
    I convinced my company to allow me to convert all the old Cold Fusion pages over to JSP, never DREAMING that when it came down to being able to dynamically link to files for download JSP would drop the ball.
    There has GOT to be some way that I can accomplish this without going to some third party tags for a solution.
    I have attempted every trick I've stumbled upon...creating a link to the file(which ends up in the dang /tomcat/bin directory)..setting the content headers in all sorts of configurations..
    No matter what I do the flipping JSP stuffs fileDownload.jsp into the save as name and the results of the download turns out to be the source code for the html result of fileDownload.jsp.
    Downloading third party tags (which seems to be the answer of choice on this site) is NOT an option...does anyone have any other suggestion?? SUN ARE YOU LISTENING???? This is a show stopper for an application that WAS set to deliver in just a few weeks!!

    The latest version of JOT Servlets comes with a file download utility and demonstration app for downloading. You can download the free JOT evaluation and take a look at how it is done and do it yourself. Basically this is just HTTP protocol stuff.
    http://www.jotobjects.com/
    - Paul Copeland

  • File download problem

    I am using the following code to present a file to the client to download when a report is generated. The code does what is suppose to, it presents a dialog box where the user can choose to open, save, or cancel the file download. However, when the file is downloaded it contains the client HTML at the bottom of the saved file. I checked the created file on the server and it does not contain the HTML at the bottom, so it is being added by the following jsp code when the file is presented to the user. Any help would be appreciated. BTW, this running on HP-UX 11i using oracle forms 10G.
       String RPT = request.getParameter("trig");
       String SDATE = request.getParameter("start_date");
       String EDATE = request.getParameter("end_date");
       String PRN = request.getParameter("prn");
    if(RPT != null)
         try {
              Runtime rt1;
              Process proc1;
              String[] doRefresh = {"/usr/bin/sh", "-c", "/usr/local/oracle/sql/st_tags/some_script '" + SDATE + "' '" + EDATE + "' '" + PRN + "'"};
              rt1 = Runtime.getRuntime();
              proc1 = rt1.exec(doRefresh);
              int exitVal = proc1.waitFor();
           String filename="/usr/local/oracle/sql/st_tags/temp/some_file.csv";
           response.setContentType("application/octet-stream");
           String disHeader="Attachment; Filename=some_file.csv";
           response.setHeader("Content-Disposition", disHeader);
           File fileToDownload=new File(filename);
           InputStream in=null;
           ServletOutputStream outs=response.getOutputStream();
           try {
              in=new BufferedInputStream
              (new FileInputStream(fileToDownload));
              int ch;
              while((ch=in.read()) != -1) {
              outs.print((char) ch);
           finally {
              if(in != null) in.close();
           outs.flush();
           outs.close();
           in.close();
         catch (Exception ignored) {}
       }

    Sorry, wasn't sure how important the HTML portion would be. Thanks for the response. Here is the HTML that is before and after the afore mentioned code.
    Before:
    <%@page import="java.lang.*, java.net.*, java.util.*, java.io.*"%>
    <%@page pageEncoding="UTF-8" contentType="text/html;charset=windows-1252"%>
    <%@page language="java" import="mil.uspfo.dpi.*" errorPage="default.jsp" %>
    <jsp:useBean id="AgnosticHostBean" class="mil.uspfo.dpi.AgnosticHostBean"
    scope="session">
    </jsp:useBean>
    <base href="http://<% out.print(AgnosticHostBean.getHostNameProperty() ); %>
    :7779/j2ee/">
    <html>
    <head>
    <title>Master Report</title>
    <link rel="stylesheet" type="text/css" href="styles/uspfo.css">
    </head>
    <body>
    <%@ include file="header.html" %>
    <h1>
    Master Report
    </h1>
    <form name="mstr_form" method="post">
    <p>Start Date:<input type="date" name="start_date">(example: YYYYMMDD)</p>
    <p>End Date  :<input type="date" name="end_date">(example: YYYYMMDD)</p>
    <p>Payroll # :<input type="text" name="prn"></p>
    <input type="SUBMIT" name="Button1" onClick="get_mstr_report()">
    <input type="hidden" name="trig" size="2">
    <br>
    <script type="text/javascript">
    function get_mstr_report() {
       document.mstr_form.trig.value="go";
    </script>AFTER:
    </form>
    <br>
    <%@ include file="footer.html" %>
    </body>
    </html>

  • File download interferes with Quick Time

    Usually, when I download from a website a popup window appears with the option to open, run, and cancel. The title of the window is “File Download – Security Warning”.
    After installing Quick Time, when I try to download from any website, the quick time window appears instead of the Utility window by the WINDOW operating system.I would prefer the Window utility to popup, is there any way I can install quick time in such a way so that quick time window does not pop up for file download.
      Windows XP  

    Hi,
    A tiff file is a picture file. FInd a tiff file on your computer and clik it with the right mouse button. From the list choose the option "open with". You wuill get a few option on which to open the file with, choose something like "Paint" and make sure to select the thick box to always use this program to open these files. From Paint you should have no problem printing.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Although I work for HP my posts and replies are my own
    Please mark the post that solves your problem as "Accepted Solution"

  • Where is the file management utility on my HP Pavilion dv5-1150us Entertainment notebook pc?

    I am trying to hookup a WD My Passport Ultra 2TB external drive for backup on my notebook.  It tells me to check the file management utility to see if the WD File Setup is listed.  How do I go to and find that utility?

    Hi,
    Try the following.
    Download the IDT Audio installer on the link below and save it to your Downloads folder.
    http://ftp.hp.com/pub/softpaq/sp41501-42000/sp41698.exe
    When done, open windows Control Panel, open Device Manager and open up Sound, Video and Game Controllers.  Right click the IDT device and select Uninstall - you should also get a prompt to remove the current driver, tick the box to allow this and then proceed with the uninstall.
    When complete,download and reinstall the Chipset driver on the link below.
    Chipset Driver - Windows Vista.
    When the reinstallation has completed, shut down the notebook, unplug the AC Adapter and then remove the battery.  Hold down the Power button for 30 seconds.  Re-insert the battery and plug in the AC Adapter.
    Tap away at the esc key as you start the notebook to launch the Start-up Menu and then select f10 to enter the bios menu.  Press f5 to load the defaults ( this is sometimes f9, but the menu at the bottom will show the correct key ), use the arrow keys to select 'Yes' and hit enter.  Press f10 to save the setting and again use the arrow keys to select 'Yes' and hit enter.
    Let Windows fully load - it will automatically load an audio driver, but just let this complete.  Then open your Downloads folder, right click on the IDT installer and select 'Run as Administrator' to start the installation.  When this has completed, right click the speaker icon in the Taskbar and select Playback Devices.  Left click 'Speakers and Headphones' once to highlight it and then click the Set Default button - check if you now have audio.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • PDF file downloading from server to client

    Hello,
    I am a newbie to Oralce UCM. Writing a component to merge some PDF files and allow user to save/open it on client side.
    The file downloaded is of 0 bytes and when opened it says -
    Adobe Reader could not open the the file because it is either not a suppported file type or because the file is damaged(It was sent as an email attachment and was not correctly decoded)
    this.m_binder.m_contentType = "application/pdf";
    this.m_binder.m_clientEncoding = "utf-8";
    DataStreamWrapper dataStreamWrapper = this.createNewDownloadStream();
    dataStreamWrapper.m_clientFileName = "MergedPDF";
    dataStreamWrapper.m_inStream = mergedPDF.getDocumentInputStream();
    dataStreamWrapper.m_inStreamActive = true;
    dataStreamWrapper.m_dataType = "application/pdf";
    try {
    this.m_httpImplementor.sendStreamResponse(this.m_binder, dataStreamWrapper);
    } catch (ServiceException e) {
    e.printStackTrace();
    Some clue would really help :)
    Thanks,
    Fauzia

    Hi Jiri,
    I have created and HCSP page where data is being populated dynamically. User may select some of the files from this page through checkbox. Page also has a download button which when clicked will merge all the selected documents and let the user open/save it.
    Information like Native URL, docName is passed on to the content server when the component is called (download button-click).
    Merging the PDFs, I have used a custom utility which takes url as a parameter and returns back the inputstream of merged PDF.
    And last, I have used DataStreamWrapper to send this inputstream back to the client as an attachment which can be read by IE.
    Also, I thought at first to use HTTPHeader where parameters like content-disposition, content-type can be set. But UCM already provides a better way to achieve this i.e. through DataStreamWrapper.
    public class MergePDF extends Service {
         public List<PdfDocumentSource> createPdfDocumentSourceList(
                   String... urlStrings) throws MalformedURLException {
              List<PdfDocumentSource> sourceList = new ArrayList<PdfDocumentSource>(
                        urlStrings.length);
              for (String url : urlStrings) {
                   URL urlDoc = new URL(url);
                   PdfDocumentSource pdfSource = new UrlPdfDocumentSource(urlDoc);
                   try {
                        System.out.println("URL in create method - "+urlDoc);
                        System.out.println("PDFSource input stream - "+pdfSource.getDocumentInputStream().available());
                   } catch (IOException e) {
                        e.printStackTrace();
                   sourceList.add(pdfSource);
              return sourceList;
         public void mergeAll() throws DataException, ServiceException {
              Properties property = this.m_binder.getLocalData();
              String urlStrings = "";
              List<PdfDocumentSource> sourceList;
              PdfDocumentSource mergedPDF = null;
              urlStrings = property.getProperty("webURL");
              String[] urls = urlStrings.split(";");
              try {
                   sourceList = createPdfDocumentSourceList(urls);
                   PdfMerge merge = new PdfMerge(sourceList, true);
                   try {
                        mergedPDF = merge.createMergedPdf();
                        transferToClient(mergedPDF);
                   } catch (PdfProcessingException e) {
                        e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              System.out.println("hello123");
              System.out.println("URLS - "+urlStrings);
         public void transferToClient(PdfDocumentSource mergedPDF){
              this.m_binder.m_contentType = "application/pdf";
              this.m_binder.m_clientEncoding = "utf-8";
              DataStreamWrapper dataStreamWrapper = this.createNewDownloadStream();
              dataStreamWrapper.m_clientFileName = "MergedPDF.pdf";
              dataStreamWrapper.m_inStream = mergedPDF.getDocumentInputStream();
              //dataStreamWrapper.m_inStreamActive = true;
              dataStreamWrapper.m_dataType = "application/pdf";
              try {
                   this.m_httpImplementor.sendStreamResponse(this.m_binder, dataStreamWrapper);
              } catch (ServiceException e) {
                   e.printStackTrace();
              * StringBuffer sb = this.createHttpResponseHeader();
              sb.append("Content-Type: application/pdf");
              sb.append("Content-Disposition: attachment; filename=fname.ext");
              //m_headerStr
              this.m_headerStr = sb.toString();
    }

  • Ifweb60.exe crash when using file upload utility

    Hello,
    I have implemented the file upload utility in my own forms. When using the file upload for the first time in my forms session everything works fine. But when i try to start it again (within the same forms session) i get an ifweb60.exe crash on the server and a FRM-92101 error on the forms client
    Did anybody have the same problem before and how can i solve this?
    I am using iAS9i (release 1.0.2.1.0) with forms patch 10 (Jinitiator 1.3.1.9), Oracle server 8.1.7 on Windows NT 4.
    I included the output of my java console
    Thanks,
    Gerton
    Oracle JInitiator: Version 1.3.1.9
    Using JRE version 1.3.1.9 Java HotSpot(TM) Client VM
    User home directory = C:\WINNT\Profiles\382
    Proxy Configuration: Manual Configuration
    Proxy: MyProxy
    Proxy Overrides: <local>
    JAR cache enabled
    Location: C:\WINNT\Profiles\382\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://80nte/forms60java/f60all_jinit.jar from JAR cache
    Loading http://80nte/forms60java/UploadClient.jar.sig from JAR cache
    Loading http://80nte/forms60java/ctb_icons.jar from JAR cache
    connectMode=HTTP, native.
    Forms Applet version is : 60819
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Start setProperty
    Start setProperty
    Start setProperty
    Opening connection to http://80nte:80/download/907.doc...
    Copying resource (type: application/msword, modified on: Mon Aug 05 11:45:58 CEST 2002)...
    35840 byte(s) copied...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Start setProperty
    Start setProperty
    Start setProperty
    Client OS is Windows NT
    start RunCMD...: cmd.exe /C C:\TEMP\907.doc
    Opening Word document...
    Document has been released C:\TEMP\907.doc
    FileUploader: LoadFile : Named File
    FileUploader: 907.doc
    FileUploader: Dir>C:\TEMP\
    FileUploader: Named File = C:\TEMP\907.doc exists
    FileUploader: <PERFORM UPLOAD>
    FileUploader: Filesize 35840
    FileUploader: Source file size before encoding 35840 Bytes; (Compressed to 8905 Bytes)
    FileUploader: Size of encoded byte array : 12190 (3 Chunks)
    FileUploader: numchunks is 2
    FileUploader: Chunking : 0:4096
    FileUploader: Dispatch Chunk 1
    FileUploader: Chunking : 4096:8192
    FileUploader: Dispatch Chunk 2
    FileUploader: Chunking : 8192:12190
    FileUploader: Dispatch Chunk 3
    FileUploader: </PERFORM UPLOAD>
    Start setProperty
    Start setProperty
    Start setProperty
    Start setProperty
    Opening connection to http://80nte:80/download/907.doc...
    Copying resource (type: application/msword, modified on: Mon Aug 05 11:46:41 CEST 2002)...
    35840 byte(s) copied...
    Start setProperty
    Onbekende setProperty...
    Start setProperty
    Start setProperty
    Start setProperty
    Start setProperty
    Client OS is Windows NT
    start RunCMD...: cmd.exe /C C:\TEMP\907.doc
    Opening Word document...
    Opening Word document...
    Document has been released C:\TEMP\907.doc
    FileUploader: LoadFile : Named File
    FileUploader: 907.doc
    FileUploader: Dir>C:\TEMP\
    FileUploader: Named File = C:\TEMP\907.doc exists
    FileUploader: <PERFORM UPLOAD>
    FileUploader: Filesize 35840
    FileUploader: Source file size before encoding 35840 Bytes; (Compressed to 8917 Bytes)
    FileUploader: Size of encoded byte array : 12206 (3 Chunks)
    FileUploader: numchunks is 2
    FileUploader: Chunking : 0:4096
    FileUploader: Dispatch Chunk 1
    FileUploader: Chunking : 4096:8192
    FileUploader: Dispatch Chunk 2
    FileUploader: Chunking : 8192:12206
    FileUploader: Dispatch Chunk 3
    FileUploader: </PERFORM UPLOAD>
    oracle.forms.net.ConnectionException: Forms session <7> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)

    Problem is solved!

  • Problem with installing Canon File Viewer Utility Updater 1.3.2

    I'm trying to install the Canon File Viewer Utility Updater 1.3.2, which is downloaded from Canon's site, the file named FVXUPD_01030209U02E.sit
    The installer automatically quited right after I hit the "OK" button on the license information window. The background window show a message "int err". I called Canon support, they said they can install the updater fine. So, they have no idea.
    Anyone can help me on how I can install the updater without it force quit by itself? Thank you in advanced!

    Do you have version 1.2 or 1.2.1 installed as the older version? If you scroll down on the Canon download page there's a section called "When unable to install the Updater by the procedures above". If you haven't tried that yet, try updating to 1.2.1 first, then 1.3.2.
    For what it's worth, I was able to install the update on my PowerBook running Tiger. But other than the Adobe Illustrator 11.0 -> 11.0.1 "no-installer update" from a year or so ago, this Canon updater has to be the worst I've ever seen.
    charlie

  • Any Download Utility

    Hello!
    I am generating report via Jasper Report and saving the report as PDF file on the server. (Jasper Report can't save file at client side).
    Now I want to download same file on the client machine and want to delete from the server after download completes.
    Is there any download utility in Java?
    Regards,
    Chetan Parekh

    I have file stored on server and I just want to
    download on client pc.a similar question has been answered before
    http://forum.java.sun.com/thread.jsp?forum=45&thread=555457

  • Make files downloadable from outside tomcat(web) context

    Hi there,
    I made an application on whicht people can upload word/pdf files.
    I put them in a dir called /opt/customer/2342/ , where 2342 is the customer id.
    The files are stored there, because I don't want people to be able to just download the files by using http://www.blahblah.com/customer/2342
    Now I want to create a servlet or jsp file that is able to make the files downloadable for specific users.
    Of course I can find the files using java.util.File. But I don't have a clue how to make them downloadable from this path. Should it be something with a FileStream... ?? And adding the mime-type?
    Can anybody give me some hints on making files downloadable from a specific dir?
    Thanks in advance.
    Jeroen van Hertum

    here is a servlet that is used to load files that are stored on the file system. The user submits the file path releative to a know file path.
    package common.servlet;
    import java.io.*;
    import java.net.*;
    import javax.naming.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.log4j.Logger;
    public class FileResourceServlet extends HttpServlet
        // -------- Static fields ----------------------------------------------
        // Logger
        private static Logger logger = Logger.getLogger(FileResourceServlet.class.getName());
         * Root context for all JNDI lookups
        private static final String ROOT_CONTEXT = "java:comp/env";
         * JNDI lookup name of the binary path value
        private static final String BINARY_PATH_KEY = "binaryPath";
         * Default in case looking it up from the environment fails
        private static final String DEFAULT_FILE_RESOURCE_PATH = "/home/cp/bin";
        // -------- Fields -----------------------------------------------------
        private String fileResourcePath = null;
        // -------- Methods ----------------------------------------------------
         * Initializes the servlet.
        public void init(ServletConfig config) throws ServletException
            super.init(config);
            try
                //Get Norm's info
                Context initCtx = new InitialContext();
                Context envCtx = (Context)initCtx.lookup(ROOT_CONTEXT);
                fileResourcePath = (String)envCtx.lookup(BINARY_PATH_KEY);         
            catch( Exception e )
                logger.error("Error looking up file resource path, going with " +
                             "default value - " + DEFAULT_FILE_RESOURCE_PATH, e);
                this.fileResourcePath = DEFAULT_FILE_RESOURCE_PATH;
            logger.debug("File Resource Path:" + fileResourcePath );
         * Destroys the servlet.
        public void destroy()
         * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request,
                                      HttpServletResponse resp)
                                      throws ServletException, IOException
            ServletContext sc = getServletContext();
            String pathInfo = request.getPathInfo();
            logger.debug("Path Info: " + pathInfo);
            if (pathInfo!=null && !pathInfo.startsWith("/")) pathInfo = "/" + pathInfo;
            String filename = fileResourcePath + pathInfo;       
            logger.debug("Binary Filename:" + filename );
            // Get the MIME type of the image
            String mimeType = sc.getMimeType(filename);
            if (mimeType == null)
                //sc.log("Could not get MIME type of " + filename);
                logger.warn("Could not get MIME type of " + filename);
                resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                return;
            // Set content type
            resp.setContentType(mimeType);
            // Set content size
            File file = new File(filename);
            resp.setContentLength((int)file.length());
            // Open the file and output streams
            FileInputStream in = new FileInputStream(file);
            OutputStream out = resp.getOutputStream();
            // Copy the contents of the file to the output stream
            byte[] buf = new byte[2048];
            int count = 0;
            while ((count = in.read(buf)) >= 0)
                out.write(buf, 0, count);
            in.close();
            out.close();
         * Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request,
                             HttpServletResponse response)
                             throws ServletException, IOException
            processRequest(request, response);
         * Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request,
                              HttpServletResponse response)
                              throws ServletException, IOException
            processRequest(request, response);
         * Returns a short description of the servlet.
        public String getServletInfo()
            return "Short description";
    }

  • GENERATEINg file on utility server process

    hi All
    i need to know abt the zfile process ie using logical file name
    as i am generating a file on utility server
    now in FM i gave as Zfile parameter for the utility server path and rest parthe i define in other parameters
    like /MM/process etch
    but i need to know abt the process as how to define the logical patha in FILe tcode and all the steps and how to take car for Qality and production ...
    regards
    Arora

    > Thanks for the reply. What I understood is ..the script should run of the Non SAP system from where file is coming.
    Depends on where the file is put.
    > Can you provide the details required from SAP side for this.
    > I believe..it should be STARTRFC command...and some function module to change the Idoc status....not sure??
    That depends which function module you're calling.
    We use a script to get data from an FTP server (from the SAP application server); if the server downloads a file it will be uploaded to the SAP IDOC inbox using startrfc, yes.
    What you have call and how you find out whether there's a file or not must be decided at your side, we call it like
    $PROGRAM -balanced -3 -d $DEST -u $USER -p $PASSWORD -c $CLIENT \
                -I $LANG -s $DEST -F $FUNCTION -g $LOGONGROUP \
                -h $MSGSERVER -E PATHNAME=$i -E PORT=$PORT
    where $PROGRAM is 'startrfc' and $FUNCTION = 'EDI_DATA_INCOMING'.
    Markus
    Markus

  • Best file compression utility?

    What is the best file compression utility for the mac, and i mean the one that will compress the file the most.
    I want to compress a disk image to make it smaller. I remember downloading a file one time that compressed a dmg even further, but can't remember it.

    yeah i do realize a disk image (dmg) is already compressed, but i swore i found a dmg that was zipped into another format one time that compressed it even further.
    Do you know if the new Stuffit 12 STANDARD does the same compression as DELUXE? i really don't need all the extras deluxe offers for $80....

  • AW File Repair Utility 1.0

    One more time, Please. Is there any value to downloading the AW File Repair Utility 1.0?
    John

    The note at the download site seems pretty unambiguous...
    "About AppleWorks File Repair Utility
    This utility is designed to fix AppleWorks documents that have become damaged when the documents are saved from AppleWorks 6 running on a Mac OS X 10.2.x client to an AppleShare or compatible file server."

  • APEX 4.0: error while opening a XLS file downloaded from interactive report

    Hi,
    I'm getting below error while opening a XLS file downloaded from an interactive report (APEX 4.0).
    "The file you trying to open, 'customer_2.xls', is in a different format than specified by the file extension.
    Verify that the is not corrupted and is from a trusted source before opening file. Do you want to open file."
    Yes No Help
    May be this one Apex 4.0 issue.
    please help me.
    Thanks
    Mukesh

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • TAx Reporter Temse Files Download Automation

    Hi,
    I have a reuiqrement to download the Temse files generated in Tax Reporter. I have completed the code and it works fine if we run the program in foreground. But when I run the same program in background some Temse files downloaded have junk characters. If I download the same Temse file in foreground it works fine.
    There seems to be some issue with the FM when I run my progam in background.
    I have searched SDN and SAP Notes for any clues but did not get any.
    REPORT  ZPHOP_TEMSE  NO STANDARD PAGE HEADING
                      LINE-SIZE 1023
                      LINE-COUNT 65
                      MESSAGE-ID zz.
    DATA: BEGIN OF tape OCCURS 1,
             DATA(2000),
          END OF tape.
    DATA: force_ascii type c VALUE 'T'.
    DATA:  BEGIN OF int_msgs2 OCCURS 10,
             errnum(2) TYPE c,
             text1(8) TYPE c,
             text2(60) TYPE c,
           END OF int_msgs2.
    DATA: BEGIN OF g_int_temse OCCURS 0,
             dname    LIKE TST01-dname,
             dpart    LIKE TST01-dpart,
             dcretime LIKE TST01-DCRETIME,
             dcreater LIKE TST01-DCREATER,
          END OF g_int_temse.
    DATA: record_length  TYPE i VALUE 275,
           data_length    TYPE i,
           convert_to_ebcdic,
           filesize TYPE i,
           number_of_records TYPE i VALUE 1,
           filetype(3) VALUE 'BIN',
           conv TYPE REF TO cl_abap_conv_out_ce,
           dline TYPE REF TO data,
           dtab TYPE REF TO data,
           p_compid(4),
           p_pswd(8),
           g_str(2000),
           uc_filename TYPE string.
    DATA: l_nm_fixed_record.
    CONSTANTS: c_lpath TYPE pathintern VALUE 'ZOUT'.
    TABLES: TST01, ZPHOPFLS, ZTEMSE_LOG, V_5UXY_A.
    FIELD-SYMBOLS: <dtab> TYPE STANDARD TABLE,
                   <dline> TYPE ANY.
    INCLUDE: dbpnpcom.           " No logical database        Do not modify!
    INCLUDE: zphoptop,           " Top Include                Do not modify!
             zphopfil.           " File inlcude               Do not modify!
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-T01.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) text-001.
    SELECT-OPTIONS  s_temse FOR TST01-dname NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE text-T02.
    SELECT-OPTIONS  s_cai   FOR TST01-DCREATER NO INTERVALS.
    SELECT-OPTIONS  s_date  FOR sy-datum.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-T03.
    PARAMETERS: p_ifid   LIKE t9aoa-if_id MODIF ID DIS ,
                p_fileid LIKE t9aoa-file_id MODIF ID DIS,
                p_unixf(60)  LOWER CASE MODIF ID DIS,
                p_uxdir  TYPE pathextern LOWER CASE MODIF ID DIS,
                p_dstfil(45) LOWER CASE MODIF ID DIS.
    SELECTION-SCREEN END OF BLOCK B3.
    PARAMETERS: p_skip AS CHECKBOX.
    DATA: ws_unixr LIKE p_unixf,
          ws_trans LIKE p_unixf.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'DIS'.
          screen-output = '1'.
          screen-input  = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    INITIALIZATION.
      p_ifid = 'PAYFLS'.
      p_compid = 'HR00'.
      p_fileid = '01'.
      p_unixf = 'AFS'.
      p_pswd = 'chevr123'.
      p_skip = 'X'.
    -End of Initialization--
      PERFORM get_physical_path.
      FORMAT COLOR COL_HEADING.
      WRITE: /01 text-t04,
              10 sy-pagno,
              41 text-t05,
             110 text-t06,
             123 sy-datum.
      WRITE: /01 text-t08,
              14 sy-repid,
             110 text-t07,
             125 sy-uzeit.
      FORMAT COLOR OFF.
      SKIP.
      WRITE: /(20) text-T21       CENTERED COLOR COL_HEADING,
              (15) text-T22       CENTERED COLOR COL_HEADING,
              (20) text-T23       CENTERED COLOR COL_HEADING,
              (15) text-T24       CENTERED COLOR COL_HEADING,
              (40) text-T25       CENTERED COLOR COL_HEADING.
    START-OF-SELECTION.
    *Do not allow background processing
    *Check if the Temse file and CAI both are entered
    IF NOT S_TEMSE IS INITIAL AND NOT S_CAI IS INITIAL.
       MESSAGE W999 WITH TEXT-E01.
    ELSEIF S_TEMSE IS INITIAL AND S_CAI IS INITIAL.
       MESSAGE W999 WITH TEXT-E02.
    ENDIF.
    Collect all temse filenames from TST01 into an internal table.
    IF NOT s_temse IS INITIAL.
       SELECT dname dpart dcretime dcreater FROM TST01 INTO TABLE g_int_temse
              WHERE dname in s_temse
              AND   dpart EQ '1'.
    ELSE.
       SELECT * FROM TST01
              WHERE DCREATER in s_cai
              AND   DPART EQ '1'.
         IF TST01-DCRETIME(8) GE s_date-low
             AND TST01-DCRETIME(8) LE s_date-high.
            MOVE-CORRESPONDING TST01 TO g_int_temse.
            APPEND g_int_temse.
         ENDIF.
       ENDSELECT.
    ENDIF.
    SORT g_int_temse BY DNAME DPART DCRETIME.
    LOOP AT g_int_temse.
    Check if the temse file is already processed in ZTEMSE_LOG table.
      SELECT SINGLE * FROM ZTEMSE_LOG
             WHERE DNAME = g_int_temse-dname.
      IF sy-subrc EQ 0.
    error. Temse already processed
         CONTINUE.
      ENDIF.
    Check if the temse file bieng processed is the eligible temse file
      SELECT SINGLE * FROM V_5UXY_A
             WHERE TSOBJ = g_int_temse-dname.
      IF sy-subrc EQ 0.
         SELECT SINGLE * FROM ZPHOPFLS
             WHERE TAXAU = V_5UXY_A-TAXAU
             AND   TXFRM = V_5UXY_A-TXFRM.
         IF sy-subrc EQ 0.
    Generate the filename for the target destination
            CONCATENATE ZPHOPFLS-FILENAME '.' sy-datum '.' sy-uzeit INTO p_dstfil.
         ELSE.
    error. Script not maintained in ZPHOPFLS table
            CONTINUE.
         ENDIF.
      ELSE.
    error. Temse file is not the latest processed file.
         CONTINUE.
      ENDIF.
      CALL FUNCTION 'RP_TS_OPEN'
        EXPORTING
          tsobj = g_int_temse-dname
         versn = g_int_temse-dpart
          empfg = 'RPUTSVUM'.
      COMMIT WORK.
      REFRESH tape.
      CLEAR   tape.
    Einlesen von der TemSe
      CALL FUNCTION 'RSTS_READ'
        EXPORTING
           PARTS1BY1 = 'X'
        TABLES
          datatab = tape.
      CALL FUNCTION 'RSTS_CLOSE'.
    Read the 1st line which is supposed to contains info important for
    the downloading procedure. The syntax of the line is :
      SAPxxxnnnyyyy  - the 1st 3 char 'SAP' indicates this line contains
    download related info. xxx can either be 'ASC' (for ASCII) or 'EBC'
    (for EBCDIC). nnn is the length of each record, e.g. 128 for SSA disk
    format, 275 for SSA tape format etc. yyyy can either be 'CRLF' (each
    record is delimited by CRLF) or blank (no CRLF).
    After processing the 1st line, the line is deleted from the internal
    table. Downloading begins on the 2nd line.
      READ TABLE tape INDEX 1.
      IF tape-data(3) EQ 'SAP'.
        IF tape-data+3(3) EQ 'EBC'.
          convert_to_ebcdic = 'x'.
        ELSEIF tape-data+3(3) EQ 'ASC'
              AND force_ascii EQ 'T'.
          filetype = 'ASC'.
        ENDIF.
        IF tape-data+6(3) NA '*'.
          record_length = tape-data+6(3).
        ELSE.
          record_length = tape-data+13(4).
        ENDIF.
        IF tape-data+9(4) EQ 'CRLF'.
          data_length = record_length + 2.
        ELSE.
          data_length = record_length.
        ENDIF.
        DELETE tape INDEX 1.
      ELSE.
        data_length = record_length.
      ENDIF.
    Transfer the Temse file data to Unix file.
          PERFORM transfer_file.
    Update the Log table with the temse details.
          ZTEMSE_LOG-dname = g_int_temse-dname.
          ZTEMSE_LOG-txcmp = V_5UXY_A-taxau.
          ZTEMSE_LOG-txfrm = V_5UXY_A-txfrm.
          ZTEMSE_LOG-filename = ws_unixr.
          ZTEMSE_LOG-DCREATER = g_int_temse-dcreater.
          INSERT ZTEMSE_LOG.
        WRITE: /(20) ZTEMSE_LOG-dname,
                (15) ZTEMSE_LOG-txcmp,
                (20) ZTEMSE_LOG-txfrm,
                (15) ZTEMSE_LOG-dcreater,
                (40) ZTEMSE_LOG-filename.
    ENDLOOP.
    *&      Form  get_physical_path
          Get Physical directory name for the given logical path name
    FORM get_physical_path .
      CALL FUNCTION 'ZFILE_GET_PATH_NAME'
        EXPORTING
          LOGICAL_PATH               = c_lpath
        IMPORTING
          FILE_NAME_PATH             = p_uxdir
        EXCEPTIONS
          PATH_NOT_FOUND             = 1
          MISSING_PARAMETER          = 2
          OPERATING_SYSTEM_NOT_FOUND = 3
          FILE_SYSTEM_NOT_FOUND      = 4
          OTHERS                     = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " get_physical_path
    *&      Form  TRANSFER_FILE
    FORM transfer_file.
      p_unixf = 'AFS'.
    Concatenate Date with Unix File name
      CONCATENATE p_unixf '.' p_compid '.' p_ifid  '.' sy-datum '.' sy-uzeit INTO ws_unixr.
    Concatenate Unix Directory with Unix File for Outbound
      CONCATENATE p_uxdir ws_unixr INTO p_unixf.
      PERFORM open_files USING p_unixf.
    LOOP AT tape.
         g_str = tape-data(record_length).
        TRANSFER g_str TO p_unixf LENGTH record_length.
        IF sy-subrc <> 0.
          MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
           ' Error Transferring to: ' p_unixf.
        ENDIF.
    ENDLOOP.
      PERFORM close_files USING p_unixf.
    ENDFORM.                    " TRANSFER_FILE
    Can anyone please check and tell me what I need to overcome this problem.

    Hi Bhaskar,
    I also have the same requirement to upload TemSe files in to application server.
    In FDTA tcode after we enter company code and click on enter.
    In the second screen checking and line item and go to edit and click on download button.
    Here we see a popup with default file name, and when we say ok the file will get downloaded into C:\.....
    Here our req is to upload the file automatically pick up via batch job and place it in the in to the application server and from there it should be placed in the Netwrok server (UNIX).
    Pls provide me with suitable code so that i can finish it off.I tried a lot but did not work.
    Thanks.

Maybe you are looking for