Query on downloading to XLS file

Hi ,
     Iam facing some problem in downloading into xls format .
Here is an example of the query ,
data : OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE
OBJBIN = 'ABC'.
APPEND OBJBIN.
OBJBIN = 'XYZ'.
APPEND OBJBIN.
OBJBIN = 'LMNO'.
APPEND OBJBIN.
using the fm SO_NEW_DOCUMENT_ATT_SEND_API1 iam trying to send the file as an attachtment .
but in the attachtment file all the three values displaying on a single cell .but need to be displayed in different cells.
can some one give a solution for this
Thanks ,
vinay .

Hi
Have you taken care ( passed ) of all these table parameter's properly . please check.
PACKING_LIST
This table requires information on how the data from tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT should be distributed to the document and its attachments. The first line stands for the document and each of the following lines for one attachment.
TRANSF_BIN
If this flag is set ('X'), the table entry indicates an object stored in binary format. The corresponding object contents are located in table CONTENTS_BIN. If the flag is not set, the object contents are located in table CONTENTS_TXT in ASCII format.
HEAD_START
Requires the starting line of table OBJECT_HEADER, starting from which the specific header data of the object is stored.
HEAD_NUM
Requires the number of lines in table OBJECT_HEADER which are used for the specific header data of the object. The lines involved are arranged in a block and uniquely defined together with the specification in HEAD_START.
BODY_START
Requires the starting lines of the tables dependent on the flag TRANSF_BIN, starting from which the object contents are stored.
BODY_NUM
Requires the number of lines of the table dependent on flag TRANSF_BIN which are used to store the object contents. The lines involved are arranged in a block and uniquely defined together with the specification in HEAD_START.
DOC_TYPE
Attachment type. This field is not used in the first line of the table.
OBJ_NAME
Attachment name. This field is not used in the first line of the table.
OBJ_DESCR
Title (short description) of the attachment. This field is not used in the first line of the table.
OBJ_LANGU
Attachment language. This field is not used in the first line of the table.
DOC_SIZE
Size of the attachment in bytes. The size of PC object files should be entered here, and the size of RAW and SCR objects is calculated by "length of last line" + "number of remaining lines multiplied by 255". This field is not used in the first line of the table.
MESS_TYPE
This field is not used.
OBJECT_HEADER
This table must contain the summarized data dependent on the respective object type. SAPscript objects save here, for example, information about layout sets, styles, and Excel Listviewer objects, including the number of lines and columns and the original file names of PC objects.
LINE
Requires the type-dependent data of the object for each line. Which section belongs to which object is determined by the fields HEAD_START and HEAD_NUM in table PACKING_LIST.
CONTENTS_BIN
This table must contain the summarized contents of objects flagged as binary objects.
LINE
Requires the contents of the objects for each line. Which section belongs to which object is determined by the fields BODY_START and BODY_NUM in table PACKING_LIST.
CONTENTS_TXT
This table must contain the summarized contents of the objects flagged as ASCII objects.
LINE
Requires the contents of the objects for each line. Which section belongs to which object is determined by the fields BODY_START and BODY_NUM in table PACKING_LIST.
OBJECT_PARA
This table is only needed if the document to be sent should be processed. It must contain the SET/GET parameters which are passed on to the processing element during processing.
It is not possible to assign processing parameters to attachments to documents.
NAME
Name of the SET/GET parameter. Only the first three characters are used.
OPTION
This field is not used.
LOW
Contains the value of the parameter in NAME.
HIGH
This field is not used.
OBJECT_PARB
This table is only needed if the document to be sent is assigned to a specific processing type. Its meaning changes depending on the type. If the processing element is a report or transaction which passes values to the global memory, then the table contents are interpreted as a quantity of parameters with corresponding values and transported to the memory ID listed on the first line. If the processing element is a function or dialog module, then the table is passed to these as table parameter MSGDIAL.
It is not possible to pass processing parameters to the attachments to documents.
NAME
If the processing element is a report or transaction which passes values to the global memory, then the field in the first table line must contain the name of the memory ID used for exporting. The fields in the remaining lines are used for the names of the parameters. If the processing element is a function or dialog module, then the fields must be filled accordingly.
VALUE
If the processing element is a report or transaction which passes values to the global memory, then the field in the first table line must remain empty. The fields in the remaining lines are used for parameter values belonging to NAME. If the processing element is a function or dialog module, then the fields must be filled accordingly.
RECEIVERS
This table must contain the recipients of the document.
RECEIVER
Name of the recipient.
The following entry types are possible:
the SAP user name of the recipient
the SAPoffice name of the recipient
a shared distribution list
a fax number in form of the structure SADRFD
an Internet address in form of the structure SADRUD
a remote SAP name in form of the structure SADR7D
an X.400 address in form of the structure SADR8D
ADR_TYPE
Type of RECEIVER entry.
The following values are allowed:
'B' : SAP user name
' ' : SAPoffice name
'C' : shared distribution list
'F' : fax number
'U' : Internet address
'R' : remote SAP name
'X' : X.400 address
REC_ID
If the recipient is a SAPoffice user, then the ID of the user can be entered in this field instead of the recipient name in RECEIVER.
REPLY_DOC
If this field is filled, then the document sent represents a reply to the folder entry flagged with the ID specified. A correspondence history is automatically created and maintained.
REC_DATE
Date on which the document should reach the recipient. No guarantee can be made that the date will be met for external recipients, as this depends on the performance of the products involved.
PROXY_ID
If the document recipient has the automatic forwarding function active, then this field contains the SAP user ID or the address ID of the external address to which this document was sent in the end.
RETRN_CODE
If the document recipient successfully receives the document, then the function module fills this field with the value '0', otherwise a value unequal to '0' is entered.
EXPRESS
If this flag is set ('X'), then the document is sent with the attribute 'Express'. If the recipient is a SAPoffice user who is logged on at the time, then this user immediately receives a message informing him/ her of the express mail.
COPY
If this flag is set ('X'), then the document is sent with the attribute 'Copy'.
BLIND_COPY
IF this flag is set ('X'), then the document is sent with the attribute 'Blind copy'. If the recipient is a SAPoffice user, then the recipient can neither print nor forward the document.
NO_FORWARD
If this flag is set ('X') and the recipient is a SAPoffice user, then the recipient cannot forward the document.
NO_PRINT
If this flag is set ('X') and the recipient is a SAPoffice user, then the recipient cannot print the document.
TO_ANSWER
If this flag is set ('X') and the recipient is a SAPoffice user, then the recipient has to send a reply to the document before he/she can delete it from his/her inbox.
TO_DO_EXPL
If this flag is set ('X') and the recipient is a SAPoffice user, then he/she has to process the document and set its status to 'Done' before it can be deleted from from his/her inbox.
TO_DO_GRP
If this field has a value between '1' and '9', then a SAPoffice user belonging to one of the recipient groups defined by these numbers has to process the document before the affected persons can delete it from their inboxes. If the value '0' is entered, then processing is not required.
COM_TYPE
Communication method with which the document should be sent. This field is only relevant when the recipient is an address number, that is, when the document is being sent via external address management. If the field is not filled in this case, then the standard communication method defined in address management will be used.
The followig values are allowed:
'INT' : Send via Internet
'FAX' : Send as fax
'X40' : Send via X.400
'RML' : Send in another SAP system
LFDNR
Serial number from address management. This field is only relevant when the recipient is an address number, that is, when the document is being sent via external address management. If the field is not filled in this case, then the serial number defined in external address management will be used.
FAX
This field is not used.
COUNTRY
This field is not used.
SPOOL_ID
This field is not used.
NOTIF_DEL
If this flag is set ('X'), then the sender receives confirmation as soon as the document is delivered to the recipient. The sender also receives a message if the document could not be delivered. It is only logical to set this flag when sending externally because the internal send process runs synchronously. Confirmation, however, is only supported by a few mail systems, including X.400 and SAP SAP.
NOTIF_READ
If this flag is set ('X'), then the sender is informed as soon as the recipient reads the document. Setting this flag is only logical when sending externally because the internal send process runs synchronously. The read confirmation, however, is only supported by a few mail systems, including X.400 and SAP SAP.
NOTIF_NDEL
If this flag is set ('X'), then the sender receives a message if the document could not be sent to a recipient. It is only logical to set this flag when sending externally because the internal send process runs synchronously. The message, however, is only supported by a few mail systems, including X.400 and SAP SAP.
SAP_BODY
If this flag is set ('X'), then the SAP specific data is included with the document in an external body part when sending via X.400. This is only logical when the target system is an SAP system.
Exceptions

Similar Messages

  • Eror downloading a XLS file on the portal hosted struts/j2EE application

    guys,
    1st of all please bare with for writing such a huge mail but to explain the scenario i had to do this.
    i am trying to download a XLS file from the web application (struts/J2EE) hosted on the portlet.
    on my portlet i have few text boxes and a button.
    onlcik of the buton there are few validation javascripts and if the valdatin is thrugh then the form is submitted.
    there are 2 ways i can submit the form to the struts action class.
    both approaches have some problem or the other.
    Apporach 1
    var postUrl = document.getElementById('getReportURL_$$PORTLET_ID$$').innerHTML;
    var post = new PTHTTPPOSTRequest(postUrl, form, handleInlinePostResponse_$$PORTLET_ID$$);
    post.invoke();
    this is like a AJAX request post where the response comes back in the function handleInlinePostResponse_$$PORTLET_ID$$ which can be then handled.
    Problems
    1. as from action class i am trying to send a XLS file, i am writing the byte stream of the XLS file on the output stream of the response. when the response reaches the function handleInlinePostResponse_$$PORTLET_ID$$ on portlet jsp it gives me an javascript exception 'End of file reached in invalid state for current encoding' but while sending the response i am encoding the byte stream.
    the code snippet from the action class is as below
    response.reset();
    response.resetBuffer();     
    response.setHeader("Content-disposition", "attachment; filename=" + reportData.getFilename());
    response.setCharacterEncoding("UTF-8");
    response.setContentType("application/vnd.ms-excel");
    response.getOutputStream().write(reportData.getContent()); //byte[] form of the XLS file
    return null; //as we write on the response out stream the response is already commited hence the return null has no significance.
    2. in case of the any exception on server side this approach is helpful as the error content jsp is rendered in to the portlet from where the action was fired.
    Approach 2
    form.action = "<pt:url xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' pt:href='downloadCommercialXLSReport.do'/>" ;
    form.submit();
    This approach is normal for submitting any struts from bean to the struts action class (i know this is not a aprropriate way to submit d form through portlet as it submits whole page inclusding all the portlet data)
    Problems
    1. here in case of the sucess the XLS file is returned to the browser which openes a browser specific dialogue box having 'Save' 'Open' and 'Cancel' buttons to save/open the XLS file. (please note no javascript exception occurs here as approach one as the byte streeam content is returned to the browser directly and not to any post response handler function as handleInlinePostResponse_$$PORTLET_ID$$)
    2. But here the problem is in case of any sever side exception the error jsp is rendered on whole browser page and not in portlet which is kinda goofy.
    so now i am in a catch 22 scenario each approach has 1 problem either in success or in failure flow.
    can sombody suggest me a way out from this as i desperately need to download a XLS file.
    lemme kno if anybody has done a similar download stuf through portal server.
    regards,
    Sush

    i have done this before although it was in .net. try the first approach but first pop to a new window....the xls response has to be the only response to the browser or else the browser will take the other bytes returned as garbage and call the stream corrupt. let me know how this goes for you.
    if you still have problems i can post the code that worked for me. it is in c# but looks very similar.

  • Hi i am trying to download a .xls file from server but i cant

    I am using Tomcat 5.0, Where i am trying to download a .xls file.. which was uploaded by me.. when i try to download the file using line.. the content of the jsp file is there in the .xls file, i cant get the original .xls file
    here my code.. i am request this page by a button click...
    browser ask me to save download.jsp file....
    how to download a .xls file from the server... the file was uploaded by me to a folder temp
    <%@ page
    contentType="application/vnd.msexcel; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    %>
    <jsp:include page="http://localhost:9999/temp/B.xls"/>

    Help me please, I have this:
    File ficheroXLS = new File(strPathXLS);
    FacesContext ctx = FacesContext.getCurrentInstance();
    if (!ctx.getResponseComplete()) {
    String fileName = ficheroXLS.getName();
    String contentType = "application/vnd.msexcel";
    HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
    response.setContentType(contentType);
    response.setHeader("Content-Disposition", "attachment;filename=\"" + fileName + "\"");
    ServletOutputStream out = response.getOutputStream();
    out.write({color:#ff0000}ficheroXLS.toString().getBytes(){color});
    out.flush();
    out.close();
    ctx.responseComplete();
    My
    problem is marked with red color, I have a file. XLS and I want to
    download it, but to put what this red just showed me the PATH ...
    How can I do to make the contents of this file?
    What type of object must be the xlsReport?
    thanks greetings

  • Problem downloading .doc, .xls file using servlet

    i have a servlet which downloads the files to client(browser). It works file for .txt file but .doc, .xls files are opend but they contain garbage.
    plz letr me know if u know problem!!!!!
    -amit

    Probably because you output them using the Writer you got from getWriter instead of using the OutputStream you can get from getOutputStream.

  • Downloading xls file

    i want to download the .xls file into the application server they give me
    this path  :- /USER/REPORTS/MM
    i  hv used  "ws_download " function.
    but the errot  is that " Error in Downloading the file "
    plz this prob argently ?

    Hi,
    for that you have to use dataset.
      Refer this code.
    *-- Concatenate the file path retrived from the  function module
      with additonal directory 'mm/ptpi006/in/' and pass it to a
      variable.
      CONCATENATE lv_fname c_const INTO pv_input_file.
      CONCATENATE lv_fname c_const pv_flext INTO lv_file.
      lv_dsn = lv_file.
    *-- Open Dataset
      OPEN DATASET lv_dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
    File not found
        MESSAGE e503.
      ELSE.
      Read each line from the dataset and append to an internal table.
        DO.
          IF sy-subrc NE 0.
    No records found in the file.
            MESSAGE e504.
          ENDIF.
    *-- Read dataset and pass it to an internal table.
          READ DATASET lv_dsn INTO lv_line.
          CLEAR wa_eord.
          wa_eord-matnr = lv_line+0(18).
          wa_eord-werks = lv_line+18(4).
          wa_eord-vdatu = lv_line+22(8).
          wa_eord-bdatu = lv_line+30(8).
          wa_eord-lifnr = lv_line+38(10).
          wa_eord-ekorg = lv_line+48(4).
          wa_eord-meins = lv_line+52(3).
          wa_eord-autet = lv_line+55(1).
          wa_eord-feskz = lv_line+56(1).
          IF NOT wa_eord IS INITIAL.
            APPEND wa_eord TO pr_eord.
          ENDIF.
        ENDDO.
    *-- Close Dataset .
        CLOSE DATASET lv_dsn.
      ENDIF.
    Regards,
    Prashant

  • Excel 2013 doesn't display .xls file downloaded from Wells Fargo (Inconsistent)

    I have two computers exhibiting the same problem but not every time.
    Windows 7 Pro 64-bit
    Office 2013 64-bit
    Download an .xls file through Chrome or IE.
    Download is fine
    Attempt to click to open.
    Excel Launches, appears in the taskbar, file never opens... Excel is unresponsive.
    Right Click Task Bar icon, program will close.  You can open other files just fine.
    I noticed when you double click the file to open, two excel.exe processes open in Task Manager... not sure if that is normal.  When you close excel, they both disappear.
    Thoughts?

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Did this issue only occur with the .xls files downloaded from Wells Fargo website? Have you tried from other website, such as OneDrive?
    Have you tried to download some .xlsx files to test from Wells Fargo website?
    Please do some tests to narrow down the issue.
    1) Try to convert the .xls files to .xlsx files, if we can open the .xlsx correctly, this issue may be caused by the compatibility issue between Office 2013 and Office 97-2003 format. Thus, I recommend you convert the file to Excel 2013
    format.
    2) Open the Excel program first=>Click Open=>Navigate to the file=>Then open it. If it also can be opened correctly, this issue may be caused by the Dynamic Data Exchange. Please try to turn off the "Ignore other applications that use
    Dynamic Data Exchange (DDE)“ setting.
    Steps:
    1.Click the File tab, and then click Options.
    2.Click Advanced, scroll down to the General section, and then clear the Ignore other applications that use Dynamic Data Exchange (DDE) check box in the General area.
    3.Click OK.
    If you have any update, please feel free let me know.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Problem with GUI_DOWNLOAD XLS File

    Hi Experts,
    I have used GUI_DOWNLOAD function to download my internal tables in .xls file in local system.  I have used 'ASC' as file type.
    File has been successfully created as .xls. But when you open that file in our local system and update some entries and try to save it, but it has not saving and its giving error. I am not able to update/change that file.
    Is there any other FM which I will use to download a .xls file perfectly...
    Regards,
    Ramesh.

    USe Function Like this:
    data : if_intern type  kcde_cells occurs 0 with header line.
    For calling File
    call function 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          program_name = syst-repid
        CHANGING
          file_name    = p_file1.
    For Excel data upload
    call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename    = p_filename
          i_begin_col = vf_start_col
          i_begin_row = p_brow2
          i_end_col   = vf_end_col
          i_end_row   = p_erow2
        TABLES
          intern      = if_intern.
    if if_intern[] is initial.
        p_text = 'No Data Uploaded'.
    endif.
    Edited by: shelly Malik on Aug 18, 2009 12:34 PM

  • Regarding download to text file

    Dear ABAP Gurus,
    I have requirement to download internal table to text file and put it on a strorade via ftp.
    The problem is, when i try to write long text into the file, i cannot write euro currency character 'u20AC', the 'u20AC' replaced by other character like 'ä.¬'
    But if I download to xls file (using GUI_DOWNLOAD to local storage), it works fine.
    Is there any solution on this matter?
    Are there other character that would replaced by characters just like euro currency character?
    Thanks in advance.
    Rgds.
    -g-

    Try this :
    - cl_abap_char_utilities=>horizontal_tab  is tab delimited, it's depent what is your separator
    - itab is your internal table, below is just sample
    DATA :  filenamex TYPE char50,
    DATA : l_string TYPE string.
    filenamex = '/itf/zsmart/test.txt
      OPEN DATASET filenamex FOR INPUT IN TEXT MODE
                   ENCODING DEFAULT.
      IF sy-subrc = 0.
        DO.
          CLEAR : l_string.
          READ DATASET filenamex INTO l_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab
            INTO itab-key itab-otyp itab-sorg itab-dchl itab-div itab-soff
                 itab-cust itab-pon itab-podt itab-docdt itab-pymtr
                 itab-inco1 itab-inco2 itab-matnr itab-qty itab-batch
                 itab-plant itab-sloc itab-shppt itab-promo itab-sprom
                 itab-mpgrp itab-obtyp itab-objno.
            APPEND itab.
            CLEAR itab.
          ENDIF.
        ENDDO.
      ELSE.
        MESSAGE e000(zelog) WITH 'Error Reading File'.
      ENDIF.

  • 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

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • GUI_DOWNLOAD binary file download as XLS

    All,
    Using the following code i am generating a binary file and downloading as XLS using GUI_DOWNLOAD. But Everything working fine. But the problem is in the excel I am getting blank row and Blank column in the sheet.
    ie First row and First column in the are coming as blank. I like to avoid this blank column and row
    Any Info ?
    data : lv_heading(50)     type c.
      data:  lv_index(5)        type c.
      data:  lv_string          type string.
      data:  lv_string1         type string.
      data:  lv_xstring         type xstring.
      data:  lt_textab          type truxs_t_text_data.
      data:  ls_textab          like line of lt_textab.
      constants:
      c_tab  type c value cl_abap_char_utilities=>horizontal_tab,
      c_cret type c value cl_abap_char_utilities=>cr_lf.
      " Create Heading
      do.
        write sy-index to lv_index no-zero.
        concatenate 'CTXT_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        concatenate 'CVAL_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        if sy-index eq gv_no_col.
          concatenate c_cret c_tab lv_string into lv_string.
          exit.
        endif.
      enddo.
      call function 'SAP_CONVERT_TO_TEX_FORMAT'
        exporting
          i_field_seperator    = c_tab
        tables
          i_tab_sap_data       = <fs_table>
        changing
          i_tab_converted_data = lt_textab
        exceptions
          conversion_failed    = 1
          others               = 2.
    " Records for XLS
      loop at lt_textab into ls_textab.
        wa_out-text = ls_textab.
        lv_string1 = wa_out-text.
        concatenate lv_string c_cret c_tab lv_string1 into lv_string.
      endloop.
      clear: lv_xstring .
      call function 'SCMS_STRING_TO_XSTRING'
        exporting
          text   = lv_string
        importing
          buffer = lv_xstring.
      refresh it_binary_content .
      call function 'SCMS_XSTRING_TO_BINARY'
        exporting
          buffer     = lv_xstring
        tables
          binary_tab = it_binary_content.
    endform.                    " F_generate_output_data.

    Resolved..
    Issue is in the code
      do.
        write sy-index to lv_index no-zero.
        concatenate 'CTXT_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        concatenate 'CVAL_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        if sy-index eq gv_no_col.
          " concatenate c_cret c_tab lv_string into lv_string. "<< to be commented
          exit.
        endif.
      enddo.
    and
      loop at lt_textab into ls_textab.
        wa_out-text = ls_textab.
        lv_string1 = wa_out-text.
        concatenate lv_string c_cret lv_string1 into lv_string. " This line tab is removed
      endloop.

  • "Unable to read file" error in Excel 2010 when downloading .xls file from IE11

    We have lots of reports that have links for our users to be able to download report results in Excel format. We accomplish this by using the Excel mime type in our .asp pages. Sporadically, we are seeing "Unable to read file" errors in Excel 2010
    after choosing Open from the IE11 save dialog. Choosing Save/Save As and the file will open just fine.
    Also, we can sometimes cause the error to occur more frequently by switching windows during the time when the file is downloading.
    If the file is opened directly from /Temporary Internet Files then it opens just fine.
    Window 7 64-bit
    Thanks in advance!

    Hi,
    I found you replied in a similar thread, did you try the workaround (Reset the IE) that provided there? Did you change a browser to test?
    Then, I suggest we use Process Monitor to do further troubleshooting. Please collect all the actions of IE.exe and Excel.exe, and check the if there are some
    error message/code during you open XLS file from IE 11.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Can't download pdf and xls file

    Hi, I want to download an attachment from my gmail .When I clicked to download, it will go to icloud.com and displayed like this."Your file will begin downloading automatically.Don't see it? Try again>
    The attachment contains both pdf and xls files.
    I have tried many times.
    Please help me.

    Hi amusa123,
    I don't get it. So let me try to explain again what you are describing:
    - You open a mail in Gmail (I guess Gmail in the browser, right?)
    - This email has an attachment (a excel sheet, right?)
    - You try to open the file, which immediately starts downloading the file to your Mac (usually the file gets downloaded into the Downloads folder)
    What I don't get, where do you receive a message regarding icloud.com?
    With kind regards,
    David

  • Download .XLS-File in Background

    Hallo
    I should download data from an internal table into a real .XLS-file. It should run as a job in background (without upcoming pop-ups). At the end a real .xls-file should be saved on my harddisk and/or on a Windows NT-server.
    Excel and file don't need to be openend during runtime of job.
    I'm trying with FM 'MS_EXCEL_OLE_STANDARD_DAT' , but I have following problems (code of testreport is below):
    1. Doesn't run in the background.
    2. .xls-file stays open, when running in the foreground.
    3. Strange formatted fields in .xls-file.
    I have nearly no knowledges object-oriented development. System is R/3 Release 4.6C.
    Can anybody help me?
    Thanks, Martin.
    Code:
    REPORT yr_0001_test .
    TYPES: BEGIN OF t_excel,
           fld1(20) TYPE c,
           fld2(20) TYPE c,
           fld3(20) TYPE c,
           END OF t_excel.
    DATA: it001 TYPE TABLE OF t001.
    DATA: xt001 TYPE t001.
    DATA: iexcel TYPE TABLE OF t_excel.
    DATA: flditab TYPE TABLE OF t_excel.
    DATA: xexcel TYPE t_excel.
    xexcel-fld1 = 1000.
    xexcel-fld2 = 'testtext1'.
    xexcel-fld3 = 'testplace1'.
    APPEND xexcel TO iexcel.
    xexcel-fld1 = 2000.
    xexcel-fld2 = 'testtext2'.
    xexcel-fld3 = 'testplace2'.
    APPEND xexcel TO iexcel.
    xexcel-fld1 = 'BUKRS'.
    APPEND xexcel TO flditab.
    xexcel-fld1 = 'BUTXT'.
    APPEND xexcel TO flditab.
    xexcel-fld1 = 'ORT'.
    APPEND xexcel TO flditab.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
      EXPORTING
        file_name                       = 'C:TEMPSAPWORKDIRTEST'
    *   CREATE_PIVOT                    = 0
        data_sheet_name                 = 'SHEET1'
    *   PIVOT_SHEET_NAME                = ' '
    *   PASSWORD                        = ' '
    *   PASSWORD_OPTION                 = 0
      TABLES
    *   PIVOT_FIELD_TAB                 =
        data_tab                        = iexcel
        fieldnames                      = flditab
      EXCEPTIONS
        FILE_NOT_EXIST                  = 1
        FILENAME_EXPECTED               = 2
        COMMUNICATION_ERROR             = 3
        OLE_OBJECT_METHOD_ERROR         = 4
        OLE_OBJECT_PROPERTY_ERROR       = 5
        INVALID_FILENAME                = 6
        INVALID_PIVOT_FIELDS            = 7
        DOWNLOAD_PROBLEM                = 8
        OTHERS                          = 9
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR: iexcel,flditab.
    REFRESH: iexcel,flditab.

    If you are downloading a true xls file, then you cannot avoid the pop-ups and you will not be able to create it in the background as the EXCEL interface is not available to the backend. Your only option is to download it as tab or comma delimited.
    Imagine it this way, excel is a user driven application that runs on the user's desktop and requires inputs from the user. The current mechanism of creating an excel file from SAP works on the same principle of user interaction. In the background, since there is no user interaction, it will not be possible.

  • Need to Add Field Name to the Downloaded XLS file

    Im using the function SAP_CONVERT_TO_TXT_FORMAT
    and downloading the contents by sending them as attachements in email.
    I need to add field names(column name) to excel fields.
    So that when fields are displayed in excel file they are displayed by their column names..
    How do I do this.? Any ideas.
    Answers will be rewarded with points..

    Hi
    You can manually insert the column names as the first row in your internal table to have them in .xls file as headers.
    Regards,
    Raj

Maybe you are looking for

  • Safari will not open. I keep getting a error message.

    This is my mother computers. So I can't really give any back story to what was happening before hand. The only solution I can suggest to her is to download the OS again from scratch. But I thought I'd give it a shot here. Basically ever time she trie

  • How to use icloud with iphone

    I am very confused on how to sync or use my cloud on my Mac with my new IPhone 5S.  I have all the settings on the phone correct.  On the Mac, under Preferences, there is no "cloud" item for me to choose to set up, only mobile me and I get error if c

  • Pre order

    Why do I need the money on my card for the album I had pre- ordered? Without it, now I cannot download the album I ALREADYpurchased

  • Decreasing contrast: taking the bright out of white background

    I recently got a new app called Maple 12 whose window background is bright white, and there are no options for changing its color. Some other native Mac apps, such as Finder, have the same thing, also without apparent provision for modification. Sinc

  • Struts-JSP : how to use session variable?

    Hi, i'm new to both struts and JSP and have a doubt here - I'm creating a web application in which a user logs in. I need to access this user's userid (id name with which he logs in) in my action classes. how can i do this ? please help ! Thanks in a