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.

Similar Messages

  • Download(xls) file fm ABAP using background job

    Hi,
    My request is how to download(xls) file fm ABAP using background job. ( Daily 3 times download )
    Pls advise...

    Hello Rajesh,
    Actually it is not the function module WRITE_DATASET but command OPEN DATASET. Check this link for more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/content.htm
    Also for this please contact your ABAP collegues. It is their job and they should have the expertise.
    Regards.
    Ruchit.

  • 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.

  • Issues to use GUI_LOAD to download xls file

    Hi Guru's, we are using the fm GUI_DOWNLOAD for downloading xls files to the physical system.  We are facing  following issues.
    1. File contains the currency fields. When downloaded the file to desktop or any location  after decimal zero's are not printing in currency field.
    how to get zero's after decimals in the currency fields. Please let us know the solution if any.
    2. If we click the open option under file tab on the opened xls file which is downloaded from SAP then one wizard popup is coming and prompting the user to click the 'FINISH' button.
    Please let me know how to avoid this wizard popup.
    Thanks in advance.
    Regards,
    j.p

    Myself

  • "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.

  • Problem downloading .xls file

    Hi All,
    Im getting problem when trying to export a spread sheet. Initially teh filename was hardcoded and so it was working fine in IE. The code then was
    response.setHeader("Content-disposition", "attachment; filename=Details.xls");     
    outStream.write(Results.toString().getBytes());
    outStream.close();
    later the reqmt changed to some new naming conventions for the file and so i modified the code like
    SimpleDateFormat formatter = new SimpleDateFormat ("MM/dd/yyyy HH:mm:ss");
    java.util.Date currentDate = new java.util.Date();
    String dateString = formatter.format(currentDate);
    String fileName = dateString+".xls";
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-disposition", "attachment; filename="+fileName);
    the problem im facing now is the in the pop up for download the file name is my servlet name appended with some unknown string which includes numbers and characters. the file type shown is html.If you click save open then a new html page is been displayed with all the values.
    Please help me with this issue.
    Thanks
    Noufal

    Thank you so much Shanu. Its working now. It was my carelesness or rather my ignorance which caused this prob.
    But Im still having a query, the excel sheet is having a [1] appended to the file name for ex 19-Jun-2006 06-46-05[1] and the client is not happy with that.
    What is the reason for that square bracket and is there any way we can cut that off? your help will be greatly appreciated.
    Thanks
    Noufal

  • 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

  • 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

  • How to convert spool object to XLS file in background job? (please..urgent)

    Hello all.
    My requirment is to convert a spool object to an XLS file in the background (and send it via mail).
    Is it possible?
    If so, please help!
    please attach a code sample if you have one...
    Thanks allot.
    Barak.

    hi ,
    this might healp you ought
    TABLES: TBTCP, T024D.
    *PARAMETERS TEST(5).
    DATA: TJOBNAME LIKE TBTCP-JOBNAME VALUE 'REJ_COMP_MAIL_TO_MRP',
          SPOOLID LIKE TSP01-RQIDENT,
         V_LGORT LIKE MSEG-LGORT,
          V_DISPO LIKE T024D-DISPO,
          V_REPORT TYPE RSVAR-REPORT,
          V_VARIANT TYPE RSVAR-VARIANT.
    DATA: BEGIN OF VVALUES OCCURS 0.
            INCLUDE STRUCTURE RSPARAMS.
    DATA END OF VVALUES.
    DATA : BEGIN OF T_RECEIVERS OCCURS 0.
            INCLUDE STRUCTURE SOMLRECI1.
    DATA END OF T_RECEIVERS.
    DATA: BEGIN OF T_TBTCP,
         jobname like tbtcp-jobname,
         jobcount like tbtcp-jobcount,
          LISTIDENT LIKE TBTCP-LISTIDENT,
          SDLDATE LIKE TBTCP-SDLDATE,
          SDLTIME LIKE TBTCP-SDLTIME,
          VARIANT LIKE TBTCP-VARIANT,
          END OF T_TBTCP,
          ITAB_SPOOL LIKE STANDARD TABLE OF T_TBTCP,
          WA_SPOOL LIKE T_TBTCP.
    DATA: PLIST LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: DOCUMENT_DATA LIKE SODOCCHGI1.
    DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: SO_ALI LIKE SOLI OCCURS 100 WITH HEADER LINE,
          REAL_TYPE LIKE SOODK-OBJTP,
          SP_LANG LIKE TST01-DLANG, LINE_SIZE TYPE I VALUE 255,
          V_NAME LIKE SOEXTRECI1-RECEIVER.
    DATA: GD_EVENTID LIKE TBTCM-EVENTID,
          GD_EVENTPARM LIKE TBTCM-EVENTPARM,
          GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
          GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
          GD_JOBNAME LIKE TBTCM-JOBNAME,
          GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
          GD_ERROR    TYPE SY-SUBRC,
          GD_RECIEVER TYPE SY-SUBRC.
    START-OF-SELECTION.
      PERFORM GET_SPOOL_REQNUMBER USING TJOBNAME. " CHANGING SPOOLID.
      PERFORM SEND_MAIL.
    PERFORM REMOVE_BLANK_SPOOLS.
    *&      Form  GET_SPOOL_REQNUMBER
          text
         -->P_0111   text                                                *
         <--P_UU  text                                                   *
    FORM GET_SPOOL_REQNUMBER USING P_0111.
      SELECT ALISTIDENT BSTRTDATE BSTRTTIME AVARIANT
       FROM TBTCP AS A INNER JOIN TBTCO AS B
            ON AJOBNAME EQ BJOBNAME AND
               AJOBCOUNT EQ BJOBCOUNT AND
               ASTEPCOUNT EQ BSTEPCOUNT
       INTO TABLE ITAB_SPOOL
          WHERE AJOBNAME = P_0111 AND BSTRTDATE EQ SY-DATUM.
    ENDFORM.                    " GET_SPOOL_REQNUMBER
    *&      Form  send_mail
          text
    -->  p1        text
    <--  p2        text
    FORM SEND_MAIL .
    Get the spool data.
      LOOP AT ITAB_SPOOL INTO WA_SPOOL.
        REFRESH : SO_ALI, PLIST, T_RECEIVERS.
        CLEAR : SO_ALI, PLIST, V_NAME, DOCUMENT_DATA, T_RECEIVERS, SPOOLID,
                V_REPORT, V_VARIANT, V_DISPO.
        IF WA_SPOOL-LISTIDENT <> '0'.
          MOVE WA_SPOOL-LISTIDENT TO SPOOLID.
          CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
            EXPORTING
              RQIDENT              = SPOOLID
              FIRST_LINE           = 1
              LAST_LINE            = 0
              DESIRED_TYPE         = ' '
            IMPORTING
              REAL_TYPE            = REAL_TYPE
              SP_LANG              = SP_LANG
            TABLES
              BUFFER               = SO_ALI
            EXCEPTIONS
              NO_SUCH_JOB          = 1
              JOB_CONTAINS_NO_DATA = 2
              SELECTION_EMPTY      = 3
              NO_PERMISSION        = 4
              CAN_NOT_ACCESS       = 5
              READ_ERROR           = 6
              TYPE_NO_MATCH        = 7
              OTHERS               = 8.
    Check the return code.
          IF SY-SUBRC <> 0.
            MESSAGE S208(00) WITH 'Error'.
            LEAVE LIST-PROCESSING.
          ENDIF.
    DATA : DATE LIKE SY-DATUM,
           DATE1(10) TYPE C.
    Prepare the data.
    CLEAR OBJTXT.
    REFRESH OBJTXT.
    DATE = SY-DATUM - 1.
    CONCATENATE DATE6(2) '-' DATE4(2) '-' DATE+0(4) INTO DATE1.
    CONCATENATE 'PLEASE CHECK THE LIST OF REJECTED MATERIALS POSTED ON :' DATE1 INTO OBJTXT.
    APPEND OBJTXT.
    SELECT SINGLE DSNAM FROM T024D INTO T024D-DSNAM WHERE WERKS = '1000' AND DISPO = WA_SPOOL-VARIANT.
    CONCATENATE 'MRP CONTROLLER :' WA_SPOOL-VARIANT '-' T024D-DSNAM INTO OBJTXT.
    APPEND OBJTXT.
    OBJTXT = ''.
    APPEND OBJTXT.
    CLEAR PLIST.
    REFRESH PLIST.
    PLIST-TRANSF_BIN = SPACE.
    PLIST-HEAD_START = 1.
    PLIST-HEAD_NUM = 0.
    PLIST-BODY_START = 1.
    DESCRIBE TABLE OBJTXT LINES PLIST-BODY_NUM.
    PLIST-DOC_TYPE = 'RAW'.
    APPEND PLIST.
    CLEAR PLIST.
         PLIST-TRANSF_BIN = 'X'.
         PLIST-HEAD_START = 0.
         PLIST-HEAD_NUM = 0.
         PLIST-BODY_START = 0.
         PLIST-BODY_NUM = 0.
         PLIST-DOC_TYPE = 'RAW'.
          PLIST-OBJ_DESCR = WA_SPOOL-VARIANT.
         APPEND PLIST.
          PLIST-TRANSF_BIN = 'X'.
          PLIST-HEAD_START = 0.
          PLIST-HEAD_NUM = 0.
          PLIST-BODY_START = 1.
          DESCRIBE TABLE SO_ALI LINES PLIST-BODY_NUM.
          PLIST-DOC_TYPE = REAL_TYPE.
    Get the size.
          READ TABLE SO_ALI INDEX PLIST-BODY_NUM.
          PLIST-DOC_SIZE = ( PLIST-BODY_NUM - 1 ) * LINE_SIZE + STRLEN( SO_ALI ).
          APPEND PLIST.
    ***get the values of the variant
          MOVE : WA_SPOOL-VARIANT TO V_VARIANT.
          SELECT * FROM TBTCP WHERE JOBNAME EQ TJOBNAME ORDER BY SDLDATE.
            MOVE TBTCP-PROGNAME TO V_REPORT.
          ENDSELECT.
          CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA'
            EXPORTING
              REPORT                     = V_REPORT
              VARIANT                    = V_VARIANT
            SEL_TEXT                   = ' '
            MOVE_OR_WRITE              = 'W'
            SORTED                     = ' '
            EXECUTE_DIRECT             =
          IMPORTING
            TECHN_DATA                 =
            TABLES
              VARIANT_VALUES             = VVALUES
           EXCEPTIONS
             VARIANT_NON_EXISTENT       = 1
             VARIANT_OBSOLETE           = 2
             OTHERS                     = 3.
          LOOP AT VVALUES.
            CASE VVALUES-SELNAME.
              WHEN 'S_DISPO'.
               MOVE VVALUES-LOW TO V_LGORT.
                MOVE VVALUES-LOW TO V_DISPO.
            ENDCASE.
          ENDLOOP.
          SELECT SINGLE USRKEY FROM T024D INTO T024D-USRKEY WHERE WERKS EQ '1000' AND DISPO EQ V_DISPO.
          IF SY-SUBRC EQ 0.
            T_RECEIVERS-RECEIVER = T024D-USRKEY.
            T_RECEIVERS-REC_TYPE = 'U'.
            APPEND T_RECEIVERS.
          IF V_DISPO = '3'   OR V_DISPO = '5'   OR
             V_DISPO = '21'  OR V_DISPO = '48'  OR
             V_DISPO = '51'  OR V_DISPO = '231' OR
             V_DISPO = '512' OR V_DISPO = '921'.
            T_RECEIVERS-RECEIVER = 
            T_RECEIVERS-REC_TYPE = 'U'.
            T_RECEIVERS-COPY = 'X'.
            APPEND T_RECEIVERS.
          ENDIF.
          IF V_DISPO = '14'  OR V_DISPO = '86'  OR
             V_DISPO = '515' OR V_DISPO = '704' OR
             V_DISPO = '711' OR V_DISPO = '712' OR
             V_DISPO = '713'.
            T_RECEIVERS-RECEIVER =
            T_RECEIVERS-REC_TYPE = 'U'.
            T_RECEIVERS-COPY = 'X'.
            APPEND T_RECEIVERS.
          ENDIF.
           T_RECEIVERS-RECEIVER = *        T_RECEIVERS-REC_TYPE = 'U'.
           T_RECEIVERS-COPY = 'X'.
           APPEND T_RECEIVERS.
           T_RECEIVERS-RECEIVER = *        T_RECEIVERS-REC_TYPE = 'U'.
           T_RECEIVERS-BLIND_COPY = 'X'.
           APPEND T_RECEIVERS.
          ENDIF.
          IF NOT SP_LANG IS INITIAL.
            DOCUMENT_DATA-OBJ_LANGU = SP_LANG.
          ELSE.
            DOCUMENT_DATA-OBJ_LANGU = SY-LANGU.
          ENDIF.
          V_NAME = SY-UNAME.
    Subject.
    CONCATENATE 'List of Rejected Materials, MRP Controller:' WA_SPOOL-VARIANT
                INTO DOCUMENT_DATA-OBJ_DESCR.
    Send the email.
          CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
            EXPORTING
              DOCUMENT_DATA              = DOCUMENT_DATA
              SENDER_ADDRESS             = V_NAME
              SENDER_ADDRESS_TYPE        = 'B'
            TABLES
              PACKING_LIST               = PLIST
              CONTENTS_BIN               = SO_ALI
              CONTENTS_TXT               = OBJTXT
              RECEIVERS                  = T_RECEIVERS
            EXCEPTIONS
              TOO_MANY_RECEIVERS         = 1
              DOCUMENT_NOT_SENT          = 2
              DOCUMENT_TYPE_NOT_EXIST    = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR            = 5
              X_ERROR                    = 6
              ENQUEUE_ERROR              = 7
              OTHERS                     = 8.
          IF SY-SUBRC <> 0.
            MESSAGE E208(00) WITH 'Error in sending email'.
          ENDIF.
          COMMIT WORK.
    Send the email immediately.
          SUBMIT RSCONN01
          WITH MODE = 'INT'
          AND RETURN.
          IF SY-SUBRC EQ 0.
            WRITE 'To get the spool no'.
            CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
              IMPORTING
                EVENTID                 = GD_EVENTID
                EVENTPARM               = GD_EVENTPARM
                EXTERNAL_PROGRAM_ACTIVE = GD_EXTERNAL_PROGRAM_ACTIVE
                JOBCOUNT                = GD_JOBCOUNT
                JOBNAME                 = GD_JOBNAME
                STEPCOUNT               = GD_STEPCOUNT
              EXCEPTIONS
                NO_RUNTIME_INFO         = 1
                OTHERS                  = 2.
            IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            WRITE : / 'Spool id of the job that is sent', SPOOLID,
                     GD_EVENTID,
                     GD_EVENTPARM,
                     GD_EXTERNAL_PROGRAM_ACTIVE,
                     GD_JOBCOUNT,
                     GD_JOBNAME,
                     GD_STEPCOUNT.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " send_mail
    *&      Form  remove_blank_spools
          text
    -->  p1        text
    <--  p2        text
    *FORM REMOVE_BLANK_SPOOLS .
    LOOP AT ITAB_SPOOL INTO WA_SPOOL.
       MOVE WA_SPOOL-LISTIDENT TO SPOOLID.
       CALL FUNCTION 'RSPO_ISELECT_TSP01'
         EXPORTING
           RFCSYSTEM        = SY-SYSID
           RQIDENT          = SPOOLID
      FORUPDATE        = ' '
        IMPORTING
          TSP01_ELEM       = W_INFO
        EXCEPTIONS
          ERROR            = 1
          OTHERS           = 2.
       CALL FUNCTION 'RSPO_IRETURN_RAW_DATA'
         EXPORTING
           RQ                 = W_INFO
         TABLES
          LINE_BUFFER        = W_DATA
       PAGE_INDEX         = W_PAGES
          LINE_BUFFER2       =
        EXCEPTIONS
          ERROR              = 1
          OTHERS             = 2.
       IF W_INFO-RQDOCTYPE = 'LIST'.
         CALL FUNCTION 'RSPO_R_GET_TOC_SPOOLREQ'
           EXPORTING
             RQIDENT = SPOOLID
           TABLES
             TOCDESC = W_TODESC
           EXCEPTIONS
             ERROR   = 1
             OTHERS  = 2.
         CALL FUNCTION 'RSPO_SPOOLDATA_WRITE_INIT'.
         READ TABLE W_DATA WITH KEY DATA_LINE = 'List contains no data'.
         LOOP AT W_DATA.
           IF W_DATA-DATA_LINE CP 'List contains no data'.
           ENDIF.
         ENDLOOP.
       ENDIF.
    ENDLOOP.
    *ENDFORM.                    " remove_blank_spools

  • Trying to download xls file with IE7 but browser tries to download as htm

    Hi!
    I have got a problem with downloading files using a hyperlink.
    I've got a hyperlink and i did set the url property to: /resources/file.xls
    when using IE7 and clicking Save As... the save as dialog appears and suggests file.htm as the filename and the file typ is shown as: HTML Document
    Firefox works fine, it suggests file.xls and the type as: Microsoft Office Excel 97-2003 Worksheet
    Next i typed in the url of the resource folder: http://localhost:29080/myProject/resources/
    The file was shown as file.xls in the directoy listing, but when i tried to download the file from here, both browsers behaved the same way as before.
    gif-files and others worked fine in both browsers.
    Does anyone have an idea?
    greets,
    Remi

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • HOw to download a file in background without user intervention?

    Hello people,
    A few hours ago I asked a couple of guys how to download a file to html. For that I am most thankful, and as mentioned this is a two part question, my other question is about how to proccess downloading the html in background and to automatically send it to a folder or other path. Without any user intervention.
    Example, I run a long report to be downloaded in background. The lets say the next day, I can get the file in a folder. Thanks guys take care!

    Hello guys thanks for your help so far. I have been off again on again with this task because its more for future purposes than anything.
    So far I have searched the net and stuff and decided that I will use WWW_LIST_TO_HTML since I want to download it the way it is. I am also going to use open/close dataset as many of you have mentioned.
    SO far Im just trying it out with a simple report program to see its funcitonalities. My code goes like this.
    <b>REPORT ZCCYT_COOL2 NO STANDARD PAGE HEADING LINE-COUNT 100 .
    DATA: IFIELDS TYPE TABLE OF W3FIELDS WITH HEADER LINE.
    *DATA: ihtml   TYPE TABLE OF w3html   WITH HEADER LINE.
    DATA: IHTML   TYPE TABLE OF W3_HTML  WITH HEADER LINE.
    DATA: BEGIN OF I_TAB OCCURS 0,
            MATNR LIKE MAKT-MATNR,
            MAKTX LIKE MAKT-MAKTX,
          END OF I_TAB.
    SELECT-OPTIONS: SO_MATNR FOR I_TAB-MATNR.
    SELECT MATNR MAKTX
      FROM MAKT
      INTO TABLE I_TAB
      WHERE MATNR IN SO_MATNR..
    LOOP AT I_TAB.
      WRITE: / I_TAB-MATNR,
               I_TAB-MAKTX.
    ENDLOOP.
    CALL FUNCTION 'WWW_LIST_TO_HTML'
       EXPORTING
           list_index = sy-lsind
         TABLES
              HTML       = IHTML.
    DATA: FILE TYPE LOCALFILE.
    FILE = '/usr/test.html'.
    OPEN DATASET FILE FOR OUTPUT IN BINARY MODE.
    LOOP AT IHTML.
      TRANSFER IHTML TO FILE.
    ENDLOOP.
    CLOSE DATASET FILE.</b>
    NOw the problem now though is that the file isnt downloading or saving at all. I cant seem to get what is wrong since the path does exist and the this seems the universal way to implement the program. Im guessing the problem lies in the file name, because everything seems to work fine. Hope to hear again soon sorry for not visiting this place sooner cuz I was buzy elsewhere.

  • Downloading .xls file with multiple rows and Columns

    Hi ALL,
    I need to genarate .xls file with multiple rows and and Columns and sent as an email.Since our customer having Problem with .CSV files need to genarate .XLS file.
    Please do the needful.
    Thanks
    Madhu

    Hi Madhu,
    You might also consider using Excel Spreadsheet XML as the target structure (namespace is urn:schemas-microsoft-com:office:spreadsheet).  When you double-click the resulting xml on a PC it automatically opens with Excel. So, users don't see a difference.  It will open up a lot of options with formatting including creating multiple worksheets if you wanted to.  Best of all you can stick with XML.
    See my response in this thread:
    Re: Convert XML data into XLS 
    Thanks,
    -Russ

  • Weird..  New IMac when downloading XLS files changes the file type to XLT

    On my wife's IMac, when she downloads an excel file (attachment in an email) in the download folder the file name has been changed to XXX.xls.xlt. My desktop Mac does not do this.
    What's happening and what is the fix?
    Thanks for any direction.
    Joe

    You can try "Reset Download Actions": http://kb.mozillazine.org/File_types_and_download_actions
    You can also try to check the application/octet-stream key in the registry and the .zip key.
    HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/octet-stream
    HKEY_CLASSES_ROOT\.zip

  • Doubt in downloading the file in background in production

    Hi ,
    we are facing the problem in one report which is used for downloading the data in a file........but this report is working in QA for both back ground and fore ground and giving the file.......but in Production if we run the same programe we r getting the downloaded file through foreground only if we run that in Back ground in Production file is not downloading in the path..........we r strugling a lot ......because of this problem.......
    so please help me in this problem.......
    Thanks in advance....

    HI
    I think it is not recognizing where to send the file as it not able to get the free space in the application server .
    So it is throwing it to the different application server.
    Ask your basis person to check the folder is working in the production or not?
    Then if it is working then define it in target server.
    Manoj Shakya.
    <b>Reminder : Points should be given on answers.</b>

  • When I download .xls files they are always damaged I don't have this with Opara Has Anyone a solution ?

    I think this happende sinds Firefox 8.0 and now I use Firefox 10 but still have this problem
    I use windows 7.0

    Blookers,
    if those Web sites are using password validation techniques which are only supported by Internet Explorer, or which aren’t supported in Safari, then that could be one possible explanation. Try using the same browser (not the same executable) on both plaforms, e.g. Firefox or Opera, to see if it’s a browser-related issue or not.

Maybe you are looking for

  • Using dvd player as a pc player?

    I just got harry potter and the order of the Phoenix on dvd and there is a special feature that allows you to access the digital copy of the movie and download it to your hard drive. This is a very cool feature but dvd player acts just like a dvd pla

  • There needs to be a way to require all search terms to be found

    The forum search hasn't been particularly productive for me due to the inability to restrict results to only those which have all of the search terms I enter. Please add a way to only include posts which contain all of the entered terms and not just

  • JSF Pages from entity class

    I am new to NB5.5. However, when I create a 'web application' project then I get the option to create 'JSF Pages from entity class' in the persistence category but not while creating a 'visual web application' project. Is there a way of getting this

  • Servlet write object error!

    "I have a applet communicate with servlet case and sending objects back and forth. when running at appletviewer everything looks fine, however, if i run through browser the servlet will generate this kind of error:           <Jul 10, 2002 5:25:54 PM

  • Accessing IVI-COM Driver through TestStand ActiveX Steps

    Hello I need to control a Agilent 6691 PowerSupply with TestStand. For this PowerSupply only an IVI-COM Driver exists, no IVI-C Driver. I tried to access it with the ActiveX Adapter Step. But when I try to create a IAgilent66xx object it produces an