Zip file uploaded by CF can't be unzipped by CF or Java

I'm having a WTF moment right now trying to track down this
problem. I am creating a monitoring tool for our merge email
system. What I would like to do is submit a job zip file through
our upload form, in which case I just need to upload a zip file
with cfhttp to the action page.
What I'm running into is a problem unzipping the file when it
is on the server. However if I go to the server the received file
opens fine with WinRAR or Windows Explorer. If I manually go to our
form and upload the exact same file it works fine. Really odd. I
can only find very basic information about uploading files with
cfhttp and tried all of the attributes that seemed logical.
Attached is very basic example of the problem. It may end up
being a bug in CF or something.
The code does the following
1. creates a text file
2. creates a zip file with the text file
3. tries to unzip the file to make sure it is fine
4. uploads the file (processed by a <cfelse> block at
the bottom)
5. tries to unzip the file uploaded
The error occurs in step 5. CF just can't unzip the uploaded
file, but I can unzip it using other tools.
================

danielmroberts,
I tested it and received the same error. Using
GetHttpRequestData() I did notice the size of the received file is
usually 2b bigger than original. Though I do not know if that
matters at all.
The strange thing is if you add another parameter after the
zip file (an empty text file or a form field), it suddenly works.
<cfhttp url="
http://#cgi.http_host##cgi.script_name#?upload"
method="post" result="jobSubmitResult">
<cfhttpparam name="zipfile" type="file"
file="#path#temp.zip" />
<cfhttpparam name="placeholder" type="FormField"
value="Empty Field">
</cfhttp>

Similar Messages

  • File upload problem. Can't write to server

    Hi guys,
    I am currently trying to upload some images to the server I am using but I can't succeed.
    I am using a form consisting of 3 text fields 1 textarea and an upload form.
    The whole thing is working fine on my localhost . All the items are being inserted to the database and the files saved to the path.
    But when I try to upload to the commercial server even though the text field are being read and inserted to database the files just can't!!
    my tree structure is
    /home/domain/www-domain/webapps
    and that's what I am getting when using
    getServletContext().getRealPaththe full line for getting the real path is
    FileWriter fw2 = new FileWriter(getServletContext().getRealPath("//upload"+fileName+".jsp")); I am using tomcat 4.0 and all the other servlets are working just fine
    as this one apart from the FileWriting thing?
    am I doing something wrong with the getServletContext thing?
    And if so, why is it working just fine on my pc?
    I am only suspecting that I am not getting the path correctly
    I want to store the images under
    webapps/upload/images
    but it doesn't work even when I am trying to store under webapps (root directory)
    Is there any way that I am not getting permission to write to the server??
    Any help is highly appreciated!!
    cheers

    the thing is that I am not getting any exception back to my browser> some of the values are inserted into the database (the ones that are not referring to any uploded items). i guess i have to do a print.stacktrace but I am not sure at which point...
    ok I am posting the full code to give you an idea. Your interest is much appreciated , thank you
    import java.sql.*;
    import java.text.ParsePosition;
    import java.text.SimpleDateFormat;
    import java.util.*;
    import java.util.Date;
    import gr.cretasport.util.*;
    import org.apache.commons.fileupload.*;
    import java.awt.Image;
    import java.io.*;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    * @author myron.veligradis
    * 17/09/2005
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class InsertArticle extends HttpServlet{
      * global variables
    String fieldName;
    Image imageIn;
    Resize rsImg = new Resize();
    Mirror mrImg = new Mirror();
    //ImageProcess ImPr = new ImageProcess();
    Date curDate;
    String datecur;
    String inputtext;
    BufferedWriter bw;
    String aRString ;
    String photoPath;
    File savedFile;
    String txtPath;
    String txtPathFullText;
    String author;
    String eidos;
    String kathgoriaID;
    String title;
    String rating;
    String kathgoria;
    String keimeno;
    String keimenoRest;
    String fullKeimeno;
    String hmeromhniaD;
    final String jspPrefix="<%@ page contentType=\"text/html; charset=iso-8859-7\" language=\"java\"  errorPage=\"\" %>";
    Connection con=null;
    Statement statement = null;
    ResultSet rs, rs1 = null;
    int kathgoriaIDInt;
    int ratingInt;
    public void init(ServletConfig conf) throws ServletException  {
      super.init(conf);
    public void doPost (HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException, UnsupportedEncodingException {
    //  try {
    //   req.setCharacterEncoding("iso-8859-7");
    //   catch (UnsupportedEncodingException uee)
      boolean isMultipart = FileUpload.isMultipartContent(req);
      HttpSession session = req.getSession();
      ServletContext sc = getServletContext();
       * GET THE FILE NAME
      curDate=new Date();
      datecur = curDate.toString ();
        String fileName = datecur.replaceAll("\\W","_");
        String strDate = curDate.toString();
        SimpleDateFormat formatter= new SimpleDateFormat ("EEE MMM dd hh:mm:ss zzz yyyy");
      Date date = formatter.parse(strDate,new ParsePosition(0));
      hmeromhniaD = new SimpleDateFormat("yyyy-MM-dd").format(date);
       *  GET THE PARAMETERS
       *  FILE UPLOAD *******************************************************
      System.out.println(isMultipart);
      DiskFileUpload upload = new DiskFileUpload();
      try {
       req.setCharacterEncoding("iso-8859-7");
       List items = upload.parseRequest(req);
       Iterator itr = items.iterator();
       while(itr.hasNext()) {
        FileItem item = (FileItem) itr.next();
    //    String articleTitle = new String(req.getParameter("articleTitle").getBytes("iso-8859-1"),"iso-8859-7");
       // check if the current item is a form field or an uploaded file
         if(item.isFormField()) {
         // get the name of the field
         // if it is name, we can set it in request to thank the user
         if (item.getFieldName().equals("author")) {
                author = new String(item.getString().getBytes("iso-8859-1"),"iso-8859-7");
         if (item.getFieldName().equals("eidos")) {
                eidos = new String( item.getString().getBytes("iso-8859-1"),"iso-8859-7");
         if (item.getFieldName().equals("keimeno")) {
                keimeno =item.getString();
                FileWriter fw1 = new FileWriter(getServletContext().getRealPath("webapps//upload"+"pro_"+fileName +".jsp"));
           fw1.write(jspPrefix+"<html><body>"+keimeno+"</body></html>");
           fw1.close();
           txtPath = ("upload/text/"+"pro_"+fileName+".jsp");
         if (item.getFieldName().equals("keimenorest")) {
                keimenoRest =item.getString();
                FileWriter fw2 = new FileWriter(getServletContext().getRealPath("//upload"+fileName+".jsp"));
           fw2.write(jspPrefix+"<html><body>"+keimeno+" "+keimenoRest+"</body></html>");
           fw2.close();
           txtPathFullText = ("upload/text/fulltext/"+fileName+".jsp");
         if (item.getFieldName().equals("title")) {
               // title = new String(item.getString().getBytes("iso-8859-1"),"iso-8859-7");
                System.out.println ("titlos "+title);
                title=getServletContext().getRealPath("webapps//upload");
         if (item.getFieldName().equals("rating")) {
                rating = item.getString();
         if (item.getFieldName().equals("kathgoriaID")) {
                kathgoriaID = item.getString();
       else {
        // the item must be an uploaded file save it to disk. Note that there
        // seems to be a bug in item.getName() as it returns the full path on
        // the client's machine for the uploaded file name, instead of the file
        // name only. To overcome that, I have used a workaround using
        // fullFile.getName().
        File fullFile  = new File(item.getName()); 
        //check if input file is actually an image
        if ( item.getName().toLowerCase().endsWith(".jpg") ||
        item.getName().toLowerCase().endsWith(".gif") ||
        item.getName().toLowerCase().endsWith(".bmp"))
         File temp = new File(getServletContext().getRealPath("webapps//upload")," temp.jpg");
         item.write(temp);
         //to class Resize pernei 2 inputs, to file kai to path string
         rsImg.resizeImage(temp,getServletContext().getRealPath("webapps//upload"+fileName+".jpg"));
         //to class Mirror pernei kai ayto 2 inputs, to file poy exei dhmiourgithei apo panw
         //pou to kanei overwrite epeidh pernoun to idio onoma me to time stamp
         Mirror.mirrorImage(new File(getServletContext().getRealPath("webapps"+fileName+".jpg")),
           getServletContext().getRealPath("webapps//upload"+fileName+".jpg"));
         System.out.println("upload/images/"+fileName+".jpg");
      kathgoriaIDInt= new Integer(kathgoriaID).intValue();
      ratingInt   = new Integer(rating).intValue();
       * HTML UPLOAD
      catch (Exception fe) {
      //get the string names to insert to database
      photoPath="upload/images/"+fileName+".jpg";
       * INSERT THE DATA INTO THE DATABASE
      InsertToDatabase();
      String url="/insertarticle.jsp";
      RequestDispatcher rd = sc.getRequestDispatcher(url);
      rd.forward(req,res);
    //res.sendRedirect( res.encodeRedirectURL( "indextest.jsp "));
    public void InsertToDatabase() {
      try {
       con=null;
       statement = con.createStatement();
       String insertprefix = "insert into articles(eidos,photopath,textpath,textpathfull,title,author,dateen,rating, kathgoriaID) VALUES"
         + "('" + eidos.trim() +"','" + photoPath.trim()  + "','"   +
         txtPath + "','" + txtPathFullText + "','" +title + "','"+ author + "','"+ hmeromhniaD + "','"+ ratingInt+ "','"
         +kathgoriaIDInt + "')";
       statement.execute(insertprefix);
       statement.close();
       con.close();
       catch (Exception e)
    }

  • Zip file upload to content area

    Has anyone tried zipping up a huge folder on the filesystem, say around a 100 files and uploaded the zip to a content ara folder? I could successfully upload the zip file but and then used the unzip link next to the uploaded content. It unzips as well, but when I click on the folder to view the unzipped files, before it could show me the 100 odd files, the server times out. I believe it is due to the number of files in a single folder. If I do the same thing with a hierarchy of folders and sub-folders containing only 10s' of files it works and displays the page to me with all links working.
    I hope you must have tried this, and pls. help me and provide me an alternative.

    check out this OSS Note No. 925327
    <a href="http://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=925327">HTTP error: 411 Length Required in upload to content server</a>
    Regards
    Raja

  • ZIP Files upload

    Hi Everyone,
    I need to upload zip files into the KM repository and i am able to upload these files. but i am not able to access them.
    Now the catch is when i try to access them from IE8 i fail at the task but when i try from google chrome i am able to access the file.
    Could anyone get me the reason!
    Best Regards,
    Simran Matharu

    Hi Simran,
    Please check the IE8 browser settings and make changes accordingly. Also check the IE8 compatibitly for your server in service market place. http://service.sap.com/pam
    Best Regards
    Arun Jaiswal

  • I only have the exported .zip file for a project, can I import to captivate and make a .cptx source file?

    I am working on a multi-person team with Captivate 7. The CPTX source file cannot be located for one module. We have the exported .zip files in our Version Control system. Can I take these files and recreate the .cptx file. I don't mind having to recreate a little functionality, but am hoping to avoid starting from the beginning with this file.
    I know this can be done for RoboHelp files, was hoping some script existed for Captivate as well.

    You might be able to save a bit of headache by extracting the content of the zip. Likely a SWF will be inside along with other files. You could then play the SWF and capture the screens. Might save a tiny bit of effort.
    Cheers... Rick

  • Zip file upload

    When I do a bulk upload of .pdf files from an NT Server to Portal, some of the files are not showing up, without a corresponding error message in the log file ... do you know why?

    Thanks, Frank :)
    Yes, I did run "unzip in background" - are you saying that it works for you if you do not "run unzip in background?
    Hi Catherine,
    Did you run Unzip "Run Unzip In Background"?
    Uncheched works for me!
    Regards, Frank
    When I do a bulk upload of .pdf files from an NT Server to Portal, some of the files are not showing up, without a corresponding error message in the log file ... do you know why?

  • I need help with this zip file so that I can let Dreamweaver do what it do.

    I need help. I bought a web design from a company called Envato. And file is zip, I heard that you use Abobe Illustrator to unzip the file, but I've tried that and got nothing. I've just download Dreamweaver with hopes that would work and again nothing. I NEED HELP!!!!

    To unZip a folder of files, you need to use a decompression utility such as WinZip, StuffIt or 7-UP.  Do you have either of those on your system?  If not get one & install it now.
    Open ZIP in your utility and EXTRACT all contents to your DW Local Site Folder.  If you have not defined a Local Site Folder in DW yet, do that now by going to Site > New Site.
    Nancy O.

  • Zip files in j2ee/cluster/server0/log/archive,  Can somebody explain these?

    Our file system is filling up on our PI system, I see allot of .ZIP files in this directory,  can I just delete them?
    j2ee/cluster/server0/log/archive

    Hi David,
    as you can read [here|http://help.sap.com/saphelp_sem60ep1/helpdata/EN/f6/7d814282cfc153e10000000a1550b0/frameset.htm] the ZIP files contain old log files so you can delete them to free up space.
    Hope this helps,
    Robert

  • How can I install attachments for SAP notes with zip-files ???

    How can I install attachments for SAP notes with zip-files ???

    Can you elaborate on your question? How exactly is your question related to SAP NetWeaver Portal: Application Integration? If you are really asking how to install attachments contained in SAP notes, there is no automatic/general way and you should ask your question in the Software Support and Maintenance space to begin with. What SAP note(s) are you looking at installing?

  • How to exreact multiple pdf files from a zip files from application server to presentation server

    Hello exprts,
    I am passing one pdf file and one text file to zip file in apllication server through my custom program and then downloading it using standard function module to my desktop. its working fine. Then I added  another pdf file to my zip file. But only single pdf file is getting download . So can you please help me regardiong this issue? 

    Dear Experts ,
    I finded out the way to extrcat pdf files in presentation server. But now my problem is that I am not able to add multiple pdf files in a zip file. When I am adding new pdf file then older one is not coming in read data set. So please kindly tell me how can I add multiple pdf file in my zip file and again I can get all the pdf files from here.

  • File Upload Concept Problem

    Hi, I am writing a WAS4 webapp which will allow users to upload files to the WAS machine. I've written and deployed apps on WAS4 before and I create a war file and deploy it via the admin console. But something I don't quite understand is that if I create a folder, say 'upload' underneath my context root such that the path is /contextRoot/upload and this folder is inside the war file, can a user upload into this folder?
    If not, then where must I place the folder in order to perform uploads and how can I reference this folder from my java code? Do I give it absolute machine paths, or some other sort of context relative path?

    Did you try using Jakarta FileUpload? It will answer all your questions.
    http://jakarta.apache.org/commons/fileupload/using.html

  • Calendar & File Upload Components - Threadinar6

    Hi All,
    This is the sixth in the "Threadinar" series , please see Threadinar5 at
    http://swforum.sun.com/jive/thread.jspa?threadID=99473 for details
    In this Threadinar we will focus on the
    "Calendar" and "File Upload" Components
    Let us begin our discussion with the Calendar Component.
    Calendar Component
    You can drag the Calendar component "calendar component icon" from the Palette's Basic category to a page open in the Visual Designer to create an entry field with an integrated calendar pop-up to help the user pick dates for the field.
    You can also drop the calendar on a container component, like a table cell or group box.
    After dragging the component to the Visual Designer, you can work with the following useful properties of the Calendar Component:-
    General
    * id. Type: String
    The name of the Calendar component in the page bean and the JSP file.
    Appearance
    * columns. Type: int
    The number of character columns used to render the component. The default value is 20.
    * dateFormatPattern. Type: String
    The format of the date to be entered by the user. It is not usually necessary to set this property because a pattern is chosen automatically based on the locale.
    If you prefer to specify a date format, click the ellipsis button (...) to the right of the property and select a predefined date format from the property editor's list. You can also add your own formats. If you add a format, the values you can enter are limited to some combination of yyyy for the year, MM for the month, and dd for the day separated by separator characters. Typical separator characters are / (slash), . (period), and - (dash). For example, the following date formats are acceptable:
    o MM/dd/yyyy
    o yyyy.MM.dd
    o MM-dd-yyyy
    * dateFormatPatternHelp. Type: text
    Text that appears below the date entry field and shows the format pattern that the date entry field accepts. If you have not set the dateFormatPattern property, the help text is chosen automatically for you. If you have set the dateFormatPattern property, you should bind the dateFormatPatternHelp property to a localized string that matches the setting for each locale you want to support.
    * label. Type: String
    A label that appears next to the text entry field, typically describing what the user is supposed to enter.
    o Note: The label property is not as flexible as the Label component. You can use the Label component if you want more control over the label's appearance, such as positioning of the label relative to the component.
    * labelLevel. Type: int
    A number that affects the appearance of the label. 1 (Strong) is larger and bold. 2 (Medium), the default, is smaller and bold. 3 (Weak) is smaller and normal (not bold). This property takes effect only if the label property is set.
    * style. Type: String
    Cascading Style Sheet rules (CSS level 2) to be applied to the component. For example:
    position: absolute; left: 288px; top: 312px
    You can enter values directly or click the ellipsis (...) button to use the Style Editor.
    o Note: This property overrides any settings in the theme or the project CSS file for this component. If a style specified in this property does not appear to take effect, it is because an area of the component is obscured by a child component that has different style settings.
    For a list of CSS2 style attributes, see the web page at
    http://www.w3.org/TR/REC-CSS2/propidx.html
    * styleClass. Type: String
    A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet or in the theme's CSS file. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
    o Note: See the note above under the style property description for an explanation of why a class added to this property might appear to have no effect on the component.
    o Note: If you add a CSS style class from the current theme to your project CSS file and you redefine the style class, the change affects all components that use this style class. However, you can add your own style classes to the project CSS file that redefine the default style classes, and then when you add them to this property, the changes affect only this instance of this component.
    For the defaulttheme.jar CSS style classes for this component, see Calendar Component CSS Classes.
    Data
    * maxDate. Type: java.util.Date
    The last date that the user can select. The default value is four years from the date set in the minDate property, for a total span of five years.
    * minDate. Type: java.util.Date
    The earliest date that the user can select. The default value is the value of the selectedDate property, which defaults to the current date if that property is not set.
    * required. Type: boolean
    If selected, the user must enter a value for the calendar before the page can be submitted. If you add a Message component to the page and link its for property to this component, an error message will be displayed if the user tries to submit the page without entering a value.
    * selectedDate. Type: Date
    A java.util.Date object representing the calendar date selected by the user. If you right-click the component and choose Bind to Data, you can bind this property to a data provider or object that can process the user entered value on the server.
    When the component displays initially, if this property is not set, its value defaults to the current date. If you provide values for minDate and maxDate, you can also provide a value for this property that initially displays a date in that range.
    * validator. Type: MethodBinding
    Indicates the JavaServer Faces validator that is called when the value is submitted. A validator ensures that the correct value is entered by a user. Choose a validator from the drop-down list. If you choose (null), no validator is called. If you choose a validator, also select the required property to ensure that the validator is used. For descriptions of JavaServer Faces validators, see the list of topics at List of Validators.
    o Note: If you define your own validate method, for example, by right-clicking the component and choosing Edit Event Handler > validate, any value you might have set in this property is overridden.
    File Upload Component
    You can drag the File Upload component "file upload component icon" from the Palette's Basic category to the Visual Designer to create an entry field and a browse button that opens a file chooser dialog on the local system, enabling the user either to select a file or to type a file name into the entry field. When the page is submitted, a copy of the file's contents is sent to the web application.
    The component is similar to an HTML <input type="file"> element.
    * Note: This component is neither supported by nor available in portlet projects due to security reasons.
    * Note: The size of the component in the Visual Designer might not match the size of the component when it is rendered in a web browser, making the component appear to line up correctly in the Visual Designer, but not when the page is rendered in the user's web browser. Also, the rendering of this component can differ depending on the web browser. Be sure to test the component in the web browsers that you expect your users to use. For example, if you add a width setting to the style property that is smaller than the setting in the columns property, Internet Explorer observes only the width setting, while the Mozilla browser ignores it and sets the width according to the number of characters in the columns property.
    The File upload component uses a filter, a com.sun.rave.web.ui.util.UploadFilter object that is configured for you in the web application's deployment descriptor. The UploadFilter uses the Apache commons fileupload package. You might need to change these settings in the following two cases:
    * The server holds the uploaded file in memory unless it exceeds 4096 bytes; otherwise, the server holds the file contents in a temporary file. You can change this threshold by modifying the sizeThreshold parameter for the UploadFilter filter entry in the web application's web.xml file.
    * By default, the File Upload component can handle files up to one megabyte in size. You can change the maximum file size by modifying the maxSize parameter for the UploadFilter filter entry in the application's web.xml file.
    o
    A negative value for the maxSize parameter indicates that there is no file size limit. Setting the parameter to a negative value is not recommended for security reasons. For example, if you allow unlimited file sizes, a malicious user could mount a denial of service attack on your site by using extremely large files
    * To change the settings for the UploadFilter object in the web.xml file:
    1. In the Files window, expand project-name > web > WEB-INF.
    2. Double-click the web.xml node to open the file in the XML editor.
    3. Click the Filters toolbar button.
    4. In the UploadFilter section under Initialization Parameters, you can change the values for the maxSize and sizeThreshold parameters.
    The contents of the uploaded file, together with some information about it, are stored in an instance of com.sun.rave.web.ui.model.UploadedFile. By using this object, you can get the content of the file as a String or write the contents to disk, as well as get properties such as the name and the size of the file. In the interest of conserving memory, the contents and file data are only available during the HTTP request in which the file was uploaded. To access the contents of the uploaded file, bind the uploadedFile property to a bean property of type com.sun.rave.web.ui.model.UploadedFile. Have the setter or an action method process the file.
    The UploadedFile interface has methods for getting the name and size of the file, determining the file's MIME type (such as text/plain or image/jpeg), getting the file's contents as bytes or as a String, and writing the contents to disk. To learn more, in the Java editor, right-click on UploadedFile in a declaration statement and choose Show JavaDoc from the pop-up menu.
    * To set the component's properties, select the component and edit its properties in the File Upload Properties Window.
    * Right-click the component and choose one of the following pop-up menu items:
    o Edit validate Event Handler. Opens the Java Editor with the cursor positioned in the component's validate method so you can insert code to validate the value of the component.
    o Set Initial Focus. Gives this component focus when the user opens the page.
    o Auto-submit on Change. Causes the form to be automatically submitted if the value of the component changes. Sets the component's JavaScript onclick property to common_timeoutSubmitForm(this.form, 'component-id');. At runtime, this code causes the form to be automatically submitted if the user changes the component value. Once the form is submitted, conversion and validation occur on the server and any value change listener methods execute, and then the page is redisplayed.
    A component configured to Auto-submit on Change can use virtual forms to limit the input fields that are processed when the form is submitted. If the auto-submit component is defined to submit a virtual form, only the participants in that virtual form will be processed when the auto-submit occurs.
    o Bind to Data. Bind the component's text property to an object or to a data provider. For more information, see Bind to Data Dialog Box.
    o Property Bindings. Bind any of the component's properties to an object or data provider, such as the uploadedFile property to a bean property of type com.sun.rave.web.ui.model.UploadedFile.
    o Configure Virtual Forms. Enables you to add the component to a virtual form.
    For more details on using the "File Upload Component" Please see this tutorial
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/file_upload.html
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    Of interest relating to file upload component to users : "Saving Uploaded Files Uploaded by the File Upload Component " Check the blog:
    http://blogs.sun.com/roller/page/divas

  • Creation of zip file inside another one.

    Hi,
    I have a problem  with the zip file creation.
    I have created the zip file but now i can' t
    create another zip file inside the first one.
    can you suggest me how can i do it ?
    thanks  Laura.

    Hi,
    try this Fm..
    ISM_GENERATE_ZIP_FILE_NAME
    Arunima

  • Sending HR-File as email by the ABAP program as password protected ZIP file

    Hi All,
    My requiremet is to directly email the SAP-HR files to the users as the password protected ZIP file on UNIX.
    Can anyone help me out how to implement this in my ABAP program.
    Regards,
    Saumik

    hi,
    To populate data in different column you may use the below code.
    DATA : filename TYPE string VALUE  "Path
    DATA :BEGIN OF wa_string,
                   data TYPE string,
              END OF wa_string.
    DATA : it_data LIKE STANDARD TABLE OF wa_string,
               data  TYPE string.
    DATA: v_tab TYPE char1.
    v_tab = cl_abap_char_utilities=>horizontal_tab.
    CONCATENATE 'happy' 'new year'  INTO wa_string-data SEPARATED BY v_tab.
    APPEND wa_string TO it_data .
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = filename
      TABLES
        data_tab              = it_data.
    IF sy-subrc <> 0.
    ENDIF.

  • File Adapter to read Zip file and send it as input to another webservice

    Hi,
    I have the below requirement:
    1. A service will generate 3 attachments and place it in a particular directory.
    2. SOA service has to pick those 3 files and send those files as input to another custom application which will email.
    Design :
    1. First SOA will create an archive file of those 3 attachements and then file adapter will poll for that zip file in that location and send that file as a whole to the custom application.
    Query:
    Now my question, is the above design feasible? If so, how to configure the file adapter to pass the file as input to that custom application?
    Kindly do the needful
    Thanks,
    Priya

    You can accomplish this via java embedding activity...Create a java embedding, which will create a zip file.. this java code is easy to implement..
    You can also do away with un-necessary polling file adapter.. and you can use "Synchronous File Read" operation of File Adapter.. For Sync Read, you'll have to pass the zip file name, which you can easily fetch from java embedding activity..
    Let me know, if this doesn't work.

Maybe you are looking for

  • Error while Creating SAP Transactional iView

    Hi I am trying to create an SAP Transaction iview to connect with SAP CRM system, i selected property WebHTML but i coule notable to connect to that TCode iview. For this i created a System with User Credentials that will map to the back end system.

  • Capital One 5 day hold on payments.

    I was using my capital one card like normal running somewhat of high balances and then paying them right off. I always pay on time and I always pay before the statement closing date. However, paying the card off in full before the statement closing d

  • Adober Reader 11.0.2 printing problems

    Our students cann not choose another printer than Adobe pdf from printing dialog in Adobe Reader 11.0.2. The default printer is a network printer from HP connected to our print server and all other programs are using this default printer without any

  • Frm-41380 error - cannot set the blocks query data source

    Fairly new forms so bare with me. I am creating a form based on one table. This table has one column that is a nested table. table name: szrtime table columns: szrtime_code, szrtime_styp_list szrtime_styp_list is a table of varchar2(1). main block is

  • Data Services result as a .txt file

    I am trying to output the results of a JOB in data services to a .txt tab delimited file. Is there a way to wrie out at a .txt file. The job is currently outputting as a template table and would like for it to be txt instead Please help, Travis