Uploading a bytearray to server

I'm trying to upload a file as a bytearray to the server. The
Bytearray seems to be ok, size is something like 13kb. The problem
is when I upload it, when it's recived on the server, the
content-length of the http post is only 31...
To exclude any problems on the server I implemented a version
using the FileReference class, and everything works perfectly, the
file is recived and saved as supposed.
Someone help, please?
Børre

Hi,
Try this.
  DATA: file type dxfile-filename value 'C\:myfile.txt'.
  FIELD-SYMBOLS: <fs> TYPE gts_data
  open dataset  file for output in text mode.
loop at itab assigning <ls>
      transfer itab  to file.
  endloop.
  close dataset e_file.
reg
Ikshula

Similar Messages

  • Upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy

    Hi All,
    upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy button.
    This is the issue which I am facing while working with SharePoint 2010. In a sharePoint 2010 document library I am having an excel file and I am trying to open it from Windows 7 and is office 2010.
    I cam e across few suggestion as mentined below but unable to find the location where to do
    Go to Resource Policies > Web >
    Rewriting > Custom Headers > (if 'Custom Headers' is not visible, click
    Customize on the right top to enable the view).
    Create a new policy with the Resource as <fully qualified domain name of the SharePoint server:*/*> (for example https://sharepoint.juniper.net:*/* ).
    Create the action as Allow Custom Headers.
    Apply the settings to the required roles.
    Please suggest.

    Hi rkarteek
    All things you have to do is as follows:
    1. Open regedit.exe
    2. Naviagate to following key:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Common\Internet]
    3. Click Edit Menu -> New -> DWORD with name of "FSSHTTPOff"
    (without quotes)
    4. Click on "FSSHTTPOff" and enter value of 1
    5.
    Close any Office Applications and browser sessions
    6. Try to reopen your document (no more read only or failure to upload)
    have a nice day!

  • How to Upload Smartforms from Application Server

    Hi Guys,
            I have to upload the SMARTFORMS in to the System.That can be done as follows:
    1- Tcode  - Smartforms
    2- Utilities -> Upload form
    3- Give form Name
    4- Give path of Form on presentation server and upload.
    But I have to give the path of Form from the Application Server. As i have all the forms to be uploaed in New system on the Application Server.
    I will be writing the program to program to read XML file(smartform) from application server to internal table and then upload it in the System.
    Please let me know if it is possible to upload Smartforms from Application Server?
    Regards
    Sandeep

    Vinod,
         Thanks for the reply.
    But Actually I want to Automate this process of Uploading the Smartforms.
    So I want to directly upload it from Application server.
    As it is not possible to upload the Smartforms from Presentation Server Automatically.
    In this human Intervention will be required.

  • How to upload logo from application server

    Hi all,
    Plz show me the way how to upload logo from application server into sap script.
    What is NGT.
    Thanks in advance
    Venkat

    Hi
    You have to import your logo in SAP by SE78 before using it in a SAPSCRIPT.
    So have you done it?
    If yes, it depends on how you have imported the logo:
    - As std text:
    INCLUDE <LOGO TEXT> OBJECT TEXT ID ST LANGUAGE <LANGUAGE>
    - As graphic:
    BITMAP <LOGO GRAPHIC> OBJECT GRAPHICS ID BMAP TYPE BCOL
    Max

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • How do I create a slide where users can upload a file to server or email a file?

    Could anyone guide me in how I could go about creating a slide where users can either email a file or upload it to my server?
    Any help would be greatly appriciated...
    Steve

    Hello,
    Welcome to Adobe Forums.
    I am not sure how you can Upload a file, you might need a Javascript.
    You can create a slide and a button of that slide can call the default Email client (MS Outlook, Outlook Express....)
    1) On  you Slide insert a button (Insert -> Standard Object -> Button
    2) Double Click on that button and select "Open URL or file" for On Success (Under Properties Inspector)
    3) Write "mailto:[email protected]" in the URL box (For Example : [email protected])
    4) Publish the result, when you click on the button, it will call the default mail client.
    Screenshot :
    Note : This might not work if you have a Network Security which do not allow calling Mail Client through a Script (Clicking of Button calls the script)
    Thanks,
    Vikram

  • Uploading a file to server using servlet (Without using Jakarta Commons)

    Hi,
    I was trying to upload a file to server using servlet, but i need to do that without the help of anyother API packages like Jakarta Commons Upload. If any class for retrieval is necessary, how can i write my own code to upload from client machine?.
    From
    Velu

    <p>Why put such a restriction on the solution? Whats wrong about using that library?
    The uploading bit is easy - you put a <input type="file"> component on the form, and set it to be method="post" and enctype="multipart/form-data"
    Reading the input stream at the other end - thats harder - which is why they wrote a library for it. </p>
    why i gave the restriction is that, i have a question that <code>'can't we implement the same upload'</code>
    I was with the view that the same can be implemented by our own code right?

  • Tcode to upload file to SRM Server.

    Hi,
    We have a requirement to upload file into application server and then read the data into internal table.
    In ECC we can use the tcode CG3Y/CG3Z but this Tcode is not available in SRM Server,
    Can anyone suggest corresponding tcode in SRM server to upload data into application server.
    Thanks in advance,
    Jerin

    Jerin,
    Please go throgh the below link which will help for upload the contracts.
    http://help.sap.com/saphelp_srm40/helpdata/en/e5/2c85403e1b6e1de10000000a1550b0/content.htm
    Best Regards,
    NMK

  • Upload Flatfile to application server

    Hi All,
    I am uploading Flatfile to Application server using FM ARCHIVFILE_CLIENT_TO_SERVER. I am entering right path for src file and dest folder but I am getting an error that
    Error in Opening file d:\ab\sap
    cd for writting (Permissions denied).
    I spoke with basis person but they are not able to figure out what is the problem. Kindly reply with what are the possibilities of this error.
    Also, Let me know if there is any other way to upload file to the application server.

    just go through these
    Note 484704 - ARCHIV_INSERT_CONNECTION_BATCH cannot be updated
    Note 604286 - ArchiveLink: File storage from the front end
    Note 350511 - Corruption of document size
    Note 655045 - ARCHIVFILE_CLIENT_* function modules
    Hope it helps
    Regards
    Bala

  • Uploading file in application server to a transaction

    Hi All,
    I have a requirment where in i want to upload the transaction FF_5 using the file in the application server. Is there any way to do this. I dont want to download the file to presentation server and then upload the file in FF_5  transaction. According to the requirement i have to directly upload the application server file in the tcode FF_5. Pls let me know how to do this.
    Thanks,
    Raju

    Hi,
    You cannot upload the data from the applcation server. You have to upload from the presentation server.
    If you have data on the application server then you need to save it to presentation server and upload to FF_5.

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • Can't upload reports to crystal server

    Hello guys,
    First is the system info:
    Crystal Server XI R2 with SP3
    OS: Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
    Database: Oracle DB 10g
    This issue shall be divided into two parts.
    Parts one:
    Before the server is reinstalled we can upload some reports. But there is some limitation. When one report is changed, we can't upload it to the server directly. This report should be renamed to a different name then it can be uploaded. If we don't do so it fails with an error message says 'An unexpected error has occurred'. So every time we need to rename reports and then upload them. This workaround is OK for some reports but not all of them. No matter how we reboot the machine or restart the crystal server.
    Part two:
    One day the machine crashed and we reinstalled the crystal server. But this time it won't accept any report at all. Still it accepts other file such as *.Doc, *.PDF Etc. Every time we try to upload a report and we get an error message says 'An unexpected error has occurred'. If we use CMC to upload a report we get something more detail says 'There was an error while retrieving data from the server: Unknown exception occurred when calling into the plugin'.
    BTW, all reports are tested in report designer. They are 100% OK. All services of the crystal server are up and running.
    And one more thing, how can I attach file in this forum. I want to give dear you the log files to refer to.
    Thanks a lot.

    Hi
    It would be easier if you would keep this all in the same topic.
    As suggested in you other thread ([Can't upload reports to crystal |Can't upload reports to crystal server]), this is very likely to be a permission problem.
    Caroline

  • Uploading zip file to server

    Hi,
    I want to upload a zip file in some server location,till now i have below code,but not able to get any clue how to upload zip file to server when user press Begin button.
    Can someone please help me?
    >
    JSP code:
    <af:inputFile label="Upload:"
    valueChangeListener="#{ifarm.fileUploaded}"/>
    <af:commandButton text="Begin"/>
    Bean code :
    public void fileUploaded(ValueChangeEvent valueChangeEvent) {
    UploadedFile file = (UploadedFile) valueChangeEvent.getNewValue();
    if (file != null)
    System.out.println("************** "+file.getFilename().toString());
    >>

    All you need to do is to get hold of the input stream of the upload file and copy it to an file on your server (which you can create).
        public static int copy(InputStream input, OutputStream output)
                throws IOException {
            byte[] buffer = new byte[1024 * 4];
            int count = 0;
            int n = 0;
            while (-1 != (n = input.read(buffer))) {
                output.write(buffer, 0, n);
                count += n;
            return count;
        public void fileUploaded(ValueChangeEvent valueChangeEvent) {
            UploadedFile file = (UploadedFile)valueChangeEvent.getNewValue();
            if (file != null) {
                File ff;
                try {
                    // create a temporary file on the host server
                    ff = File.createTempFile("xx", "yy");
                    FileOutputStream os = new FileOutputStream(ff);
                    IOUtils.copy(file.getInputStream(), os);
                } catch (IOException e) {
                    e.printStackTrace();
                System.out.println("************** " +
                                   file.getFilename().toString());
        }Timo

  • Broken links after uploading web site to server

    We created our office's web site using Dreamweaver CS4, and uploaded it to the server of our ISP.  Prior to uploading, we tested the site in both IE7 and Firefox, and everything worked fine.  After uploading, however, all images are lost and several of our links are broken.  Any suggestions on where to start looking and how to fix are very appreciated.

    Your code is whacked. Your page can't find the Spry files. Your code is like this:
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    That dot-dot part (../) means the page needs to back up to the parent folder, then enter the SpryAssets folder. Same for your images and links:
    <h1><a href="../Images/larger-logo.jpg"><img src="../Images/larger-logo.jpg" alt="logo" width="300" height="150" border="0" align="left" /></a></h1>
    Looks like you used a Dreamweaver template and somehow your links/references got messed up. It has nothing to do with uploading to a server. The problem is most likely caused by [a] Dreamweaver site not properly configured, or [b] improper use of a Dreamweaver template. You'll need to either manually fix all the bad code or try to recreate a page based on the template - or even recreate the template.
    First thing first - you need to understand the problem. Do you understand - looking at your code - what the problem is? Why those ../ are breaking things? Do you understand the concept of paths? You need to understand that before you can understand how to fix this.

  • URGENT HELP UPLOADED .SWF TO REMOTE SERVER BUT DOESNT SHOW

    Hi have uploaded my images and the .swf file which was
    created with those images as an Image Viewer feature in
    dreamweaver. Now before i started uploading everything to the
    server everything was working perfectly. This makes me think some
    how the source files or something are not right. I need urgent help
    please

    Did you upload the Scripts folder that DW creates in your
    local site when
    you insert Flash? If you did, or if you are not using DW8.0.2
    or greater,
    then please post a link to the page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "keaneodog" <[email protected]> wrote in
    message
    news:fgnbhf$f1u$[email protected]..
    > Hi have uploaded my images and the .swf file which was
    created with those
    > images as an Image Viewer feature in dreamweaver. Now
    before i started
    > uploading everything to the server everything was
    working perfectly. This
    > makes
    > me think some how the source files or something are not
    right. I need
    > urgent
    > help please
    >

Maybe you are looking for