Download excel from spool.

hi experts,
      i have a classical report which should be executed in background.
the o/p is coming ok but when from spool i m downloading it to spread sheet each column is shifted towards left.
what is the reason behind this?
the o/p is coming well in spread sheet when executed in foreground mode.
regards
pankaj

I am not an expert at all, but I will give it a try:
what do you mean with downloading the spool? Just going to SP01 and save the list to a local file of the type Spread sheet? If that is the case, then the issue is probably caused by the fact that Excel automatically removes leading spaces! You should download it unconverted to your local file system (txt format), open excel and from within excel you open the file and use the wizard to open it. At the step where you can choose the types of the columns, you should select all columns and let them use type Text. Now the leading spaces should remain!

Similar Messages

  • How to download data from spool to excel file

    Hi,
    I have requirement like....i need to download data from spool to excel file.
    Please let me know the process how to download...
    <removed by moderator>
    <removed by moderator>
    Thanks,
    Khasimsa
    Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward
    locked by: Thomas Zloch on Sep 8, 2010 1:18 PM

    Hi try this way..
    *FM called that returns the Spool Request Number data into and internal table
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = p_spool                     "Spool Request Number
          first_line           = 1
        TABLES
          buffer               = it_spool_xls                            "Internal table that will have the Spool Request No data
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          OTHERS               = 8.
    *To convert the spool data into excel format
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = it_spool_xls               "Internal table having spool data
          objcont_new = it_xls_spool.           "Int table having Excel format data converted from Spool data
    "call GUI down Load by passing  it_xls_spool
    Prabhudas

  • Problm download excel from ALV

    Hi Experts,
             I am facing a problem when downloading data from alv into a excel file. all the datas written in english are coming correctly but the japaneese or other chars are replaced by '#'. I am using FM 'GUI_DOWNLOAD'. How can I solve the problem?

    Hi Mini,
               kindly explain your requirement, why you have output in combination of two languages.
              if you are talking about individual runs, kindly give value to sy-langu of the resepective language.
               if not solved , pls let me know.
    Thanks,
    Pavan

  • How to download the values to excel from spool sap abap

    Dear All,
    I am facing  a problem in downloading the Zreport to excel file ( where it consists of 95 fields) ,
    1.if am running the report in foreground and downlaod to excel file , the all 95 fields are upadting in excel file .
    2.if i am schecduling the programe in background and saving inspool, then form spool , i am download to excel file , at that time some of the fields are overllapning ,
    for this i want to download t o excel file without overlapping fields,
    can any one suggest , how to do same procedue.
    regards,
    manoranjan

    Hi,
    whenever you click on Excel download option select spreadsheet instead of unconverted
    There is a possibility of download the spool file as txt-file. .
    Use Tranx SP01 - select the spool entry -->"spool request --> forward as text . You will find the file in your SAP work directory as <sid><spool#>.
    or use fm RSPO_DOWNLOAD_SPOOLJOB.
      Download in Background in Excel Format
    How to download the data in excel format directly while executing in background mode? 
    If you will execute it in bacground with ws_download or download, it will be aoutomatically cancel. so what is the procedure to do this.  How is can directly read the spool from program?
    Download from background is possible, if you could setup the environment
    1. create a custom table first
        Table  : Y001
        Displayed fields:   4 of   4  Fixed columns:
           MANDT BNAME       Y_SITE    Y_PATH
           010      <userid>     <site>      cd <novell_path>
    2. rewrite ws_download to z_download (light modification required, see attachment)
    3. ask your basis team to make a copy of command FTP and CHMOD to ZFTP and ZCHMOD resp., make the setting according to your environment.
    Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code
    Hope this will will helps you,
    Thanks and Regards,
    Manjunath M
    Edited by: manjunath4sap on Dec 23, 2010 6:20 PM
    Edited by: Rob Burbank on Dec 23, 2010 9:02 PM

  • Issue in downloading excel from SM37

    Hi Experts,
    I am facing a weird behavior in SM37, I am not able to download all pages of a particular program in excel format on the other side I am able to download 100-500 pages of spool of another programs. In that program's spool, when I am downloading other formats except spreadsheet, all pages are downloading without any error. There is an issue in spreadsheet downloading only.
    I have also created a program for that particular program spool's. But facing the same issue.
    Below is my code:
    REPORT ZSPOOL_DOWNLOAD_XLS.
    *  TYPE POOLS                                                                *
    TYPE-POOLS:TRUXS.
    *  SELECTION SCREEN                                                          *
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_SPOOL TYPE RSPOID,
                 P_FILE  TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN: END OF BLOCK B1.
    *  DATA DECLARATION                                                          *
    DATA: IT_SPOOL_XLS TYPE TABLE OF CHAR4000,
           LVAR_FILE    TYPE STRING,
           IT_XLS_SPOOL TYPE TABLE OF CHAR4000,
           WA_SPOOL_XLS TYPE CHAR4000.
    *  AT SELECTION-SECREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
       PERFORM FILE_SELECTION.
    *  START-OF-SELECTION
    START-OF-SELECTION.
       PERFORM SPOOL_DATA.
       PERFORM SPOOL_DOWNLOAD.
    *&      Form  FILE_SELECTION
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FILE_SELECTION .
       CALL FUNCTION 'F4_FILENAME'
         EXPORTING
           PROGRAM_NAME  = SYST-CPROG
           DYNPRO_NUMBER = SYST-DYNNR
           FIELD_NAME    = ' '
         IMPORTING
           FILE_NAME     = P_FILE.
    ENDFORM.                    " FILE_SELECTION
    *&      Form  SPOOL_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM SPOOL_DATA .
       CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
         EXPORTING
           RQIDENT              = P_SPOOL
           FIRST_LINE           = 1
         TABLES
           BUFFER               = IT_SPOOL_XLS
         EXCEPTIONS
           NO_SUCH_JOB          = 1
           NOT_ABAP_LIST        = 2
           JOB_CONTAINS_NO_DATA = 3
           SELECTION_EMPTY      = 4
           NO_PERMISSION        = 5
           CAN_NOT_ACCESS       = 6
           READ_ERROR           = 7
           OTHERS               = 8.
       IF SY-SUBRC <> 0.
    * Implement suitable error handling here
       ENDIF.
       LOOP AT IT_SPOOL_XLS INTO WA_SPOOL_XLS..
         REPLACE ALL OCCURRENCES OF '|' IN WA_SPOOL_XLS WITH CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
         APPEND WA_SPOOL_XLS TO IT_XLS_SPOOL.
       ENDLOOP.
    ENDFORM.                    " SPOOL_DATA
    *&      Form  SPOOL_DOWNLOAD
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM SPOOL_DOWNLOAD .
       LVAR_FILE = P_FILE.
       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
           FILENAME                  = LVAR_FILE
           FILETYPE                  = 'ASC'
         TABLES
           DATA_TAB                  = IT_XLS_SPOOL
         EXCEPTIONS
           FILE_WRITE_ERROR          = 1
           NO_BATCH                  = 2
           GUI_REFUSE_FILETRANSFER   = 3
           INVALID_TYPE              = 4
           NO_AUTHORITY              = 5
           UNKNOWN_ERROR             = 6
           HEADER_NOT_ALLOWED        = 7
           SEPARATOR_NOT_ALLOWED     = 8
           FILESIZE_NOT_ALLOWED      = 9
           HEADER_TOO_LONG           = 10
           DP_ERROR_CREATE           = 11
           DP_ERROR_SEND             = 12
           DP_ERROR_WRITE            = 13
           UNKNOWN_DP_ERROR          = 14
           ACCESS_DENIED             = 15
           DP_OUT_OF_MEMORY          = 16
           DISK_FULL                 = 17
           DP_TIMEOUT                = 18
           FILE_NOT_FOUND            = 19
           DATAPROVIDER_EXCEPTION    = 20
           CONTROL_FLUSH_ERROR       = 21
           OTHERS                    = 22.
       IF SY-SUBRC <> 0.
    * Implement suitable error handling here
       ENDIF.
    ENDFORM.                    " SPOOL_DOWNLOAD
    Please suggest me asap.
    Thanks & Regards
    Shubhanshu Agrawal.

    Hello Shubhanshu,
    where in your report is something transformed in XLS file? I canot see that. You got your spool number and with help of function RSPO_RETURN_ABAP_SPOOLJOB, your spool list will be transformed into internal table. This internal table will be saved as ASCII then, but no XLS in your coding.
    And then the GUI download function deals with ASCII rows, but not with pages. The number of pages when you import ASCII rows in an excel file is definitely NOT the same like in your spool! I do not know any way to compare the page numbers..why so? It goes about the data rows.
    Did you have a look at your internal table IT_XLS_SPOOL, if any data row from your spool is listed there?
    Regards
    Michael

  • Upload/download excel from BSP

    Hi all
    I am new to BSP's and and need to investigate the following:
    Is it possible to create an excel file, manipulate certain cells (e.g. read only, format colours etc.) then export the file to a supplier via the portal. Then read the file and update R3. As the file will be quite large is it possible to compress it?
    Thanks
    Zane

    Hi look at these blogs:
    /people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table
    /people/sap.user72/blog/2006/02/07/downloading-data-into-excel-with-format-options
    But I don't know any way of communication from the excel-sheet back to the R/3.
    Regards,
    Steffen

  • Is it possible to download pdf from spool in smallest form

    Hi Gurus,
    our customer wants a report that has many columns, so I create a report with line size 1023. But also they want to download it to a pdf form, so I send the report to spool and download it to pdf form by running standard report RSTXPDFT4. But pdf form takes only little part of the report, many columns can't seen in it. Is there any way to take it in smallest font or any other thing that I can take all the columns or print columns in other page??
    thanks..

    Hi,
    Implement SAP note #1226758. Ensure that you make the setting below in SPAD as decribed in the note:
    'SP01: Number of Columns for List Display from Format'.
    This should ensure that the wide format is used for the PDF also.
    Regards,
    Aidan

  • Abap run time error while downloading from spool

    Hi,
    Please find the error as an attachment when a user is trying to download data from spool.
    Please Guide me solution..
    Thanks in advance..
    Reagrds
    Aravind.

    Hi Aravind,
    It could be due to overflow of  your spool count.Try to check it first or if possible delete some old spool requests from the system by execution of standard report RSPO1041.
    After that try to re run the same & take a sample printout to check again.
    Regards,
    Gaurav

  • Generate Excel file Automatically of Spool Ouptut from Spool request

    In 4.6C version how do i code to download Excel file of spool output from its spool request number?

    hi
    please if u know this ans pls send me...........
    but think like this .......
    it will create seperate image for u
    Regards Prasad
    Edited by: EV prasad on Nov 26, 2008 4:55 AM

  • Taking download into excel from ALV Grid - header is printing in two lines

    Hi All,
    I have a scenario where I am taking the download from ALV grid to an excel sheet. Now the header of the ALV (column names) is appearing in two lines in the downloaded excel sheet while items (records of the ALV table) are getting displayed in a single line.
    This download is taken from the standard download to local file (spreadsheet) button provided by SAP for ALVs.
    I am using function module "Reuse_alv_grid_display" for the purpose.
    Can somebody provide an idea how I can avoid the header printing in two lines and keep the length as it is.
    Thanks in Advance,
    Chandan

    Hi..
    1. Pass header name in internal table appned first line.
    2. after that pass u r data .
    3. Use  FM. WS_DOWNLOAD 
    Salil ......
    Edited by: salil chavan on Nov 26, 2008 11:07 AM

  • Download file from UNIX to EXCEL problem

    Hi,
    I am trying to download file from UNIX server to excel file, there is one column which is messing up and that is number 100000000000000002 (18 in length) it is writing as 1E+17, funny thing is when I click on that cell it is showing as
    100000000000000000.
    I am using GUI_DOWNLOAD to download to excel, below is the output excel format, I am talking about 4th value from left
    GUID    leg_reg     lic_type     lic_num     ex_lic_num     vali_from     valid_to     created_by
    3E633B85C05E6F28E100     EAR     ENC     1E+17     ENC     20030305     20930305     VANRIJ
    below is the program I am using to download the output from UNIX to excel
    FORM get_data_file.
      OPEN DATASET p_unxfil FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc = 0.
        DO.
          READ DATASET p_unxfil INTO input_file_tab-line_string.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          APPEND input_file_tab.
          CLEAR  input_file_tab.
        ENDDO.
      ELSE.
        PERFORM write_message USING 'ZZ' 'E' '000'
          'Unable to find file' p_unxfil
          '  Press Enter key to exit.' ''.
      ENDIF.
      CLOSE DATASET p_unxfil.
      DESCRIBE TABLE input_file_tab LINES record_cnt.
    ENDFORM.                    " get_data_file
    FORM create_pc_file.
      DATA: l_file TYPE string.
      MOVE p_pcfile TO l_file.
    Save the file
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_file
        TABLES
          data_tab                = input_file_tab
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc NE 0.
        WRITE: / 'Error creating pc file', p_pcfile.
        EXIT.
    endif.
    I will assure of points.
    Thanks for your help
    Sarath

    It is not the problem of your program. This happens becuase of the "nature" of the excel. You need to retain the text property of that column.
    Try like this:
    1. Download the file in .txt
    2. Open Excel .. blank sheet
    3. Now, click on Open. Select your .txt file
    4. One pop up will come ..."Text Import Wizard"
    5. Select the fixed width or Delimited ... Press Next ...
    6. Select appropriate delimitors or fixed length .. press Next
    7. Select your coulumn (which has the problem), Select the "Text" radiobutton on the upper-right corner and finish.
    Regards,
    Naimesh Patel

  • In download to excel from bsp hw to increase excel column width to wrap txt

    in download to excel from bsp how to increase excel column width to wrap text
    in each column.
    My client does not want to manually click each cell aftet downloading to excel to see full text in each column

    Hi,
    You can achieve this by formatting your output using HTML table tag.
    Try the following code.
      DATA: lv_output  TYPE string.
      concatenate
      '<table border="1">'
      '<tr style="font-weight: bold; text-align:center; "><td>Name</td><td width="150">Description</td></tr>' cl_abap_char_utilities=>cr_lf
      '<tr><td>First Name</td><td>Some Description goes here..... ....... ...... </td></tr>' cl_abap_char_utilities=>cr_lf
      '<tr><td>2nd Name</td><td>XYZ.......</td></tr>' cl_abap_char_utilities=>cr_lf
      '</table>'
      into lv_output.
      response->set_cdata( data = lv_output ).
    Regards
    Geogy
    PS. Reward the useful answers.

  • Download to excel from alv display

    Hi,
    How to download to excel from alv display.I am using object oriented abap for using alv.If i click export->spreadsheet i am getting fatal error and if i export->local file->spreadsheet i am getting only the column names and heading but no contents.Can anyone tell me how to overcome this problem.
    Regards,
    Sowmya.

    Hi Sowmya,
    Just put break point near FM reuse_alv_grid_display and check if internal table which is used to display output is popullated or not.
    Regards Sachin.

  • Delete blank lines when downloading to excel from CL_GUI_ALV_TREE

    Hi Experts
    I have developed a report using the class CL_GUI_ALV_TREE. If the user wants to download it into local machine in the excel format, he is going to the print preview and downloadn through Syste --> LIst --> Save --> Local File.
    But in the excel file there are few blank lines after each node. Now my client wants to excluding of those blank lines while downloading the file into excel. Is there any method to achieve this.
    Please advice me if there is any solution.
    Thanks in advance
    Praveen

    Hi Praveen,
    We cannot do any thing if the user download the file by that selection,
    Disable the download option from the toolbar and you provide a download button on the toolbar. as the user clicks the button the delete the black entries from the table and download it using  CL_GUI_FRONTEND_SERVICES.
    Regards,
    Kumar M.

  • Issue with Data download to excel from ALV

    Hi,
    I am trying to download data to excel from ALV.
    The number of records are 26000.
    When I am trying to download I am getting an error displaying a pop up saying that
    problems came up in the following areas during the load
    TABLE
    The log displayed is not clear.
    I need to know the limitations while downloading to excel... I tried in SDN but of no use. I am using office 2007.
    What is the max downloading limit(MB)
    What must be the Length of line that can be downloaded.
    Regards

    Hi ,
    First check whether your ALV grid OUTPUT   is Consistent or Not   .
    if there are any inconsistency  then you need to rectify that  .
    for Checking COnsistency / Inconsistency  .do following steps
    1) execute ALV report 
    2) Press Shift+Mouse Right Button (Twice)  in blank area of report 
    3) you will get result   whether ALV is good or not .
    regards
    Deepak.

Maybe you are looking for

  • MS office report not working when application is compiled (application builder)

    I'm finishing up an application that includes several MS office reports (opens a MS Word template). The template is opened, the bookmarks are filled, then the file is saved (to our internal network) as a .doc file. The New Report.vi is used to open t

  • Calendar no longer syncing with MacBook Pro

    I have an iCloud account and since moving over to ML, my Calendar on the Mac has been spotty at best. My iPhone syncs with my iCloud account and vice-versa but not so the Mac. I have tried logging out and back in, restarting, etc. Nothing. I have had

  • How do I get all my music off my phone on to my new laptop

    I bought a new laptop and want to know how I can get my music from I tunes off my phone on to the itunes on my new laptop?

  • ITunes crashes on launch for all but one user

    iTunes works fine for me (main user), but it crashes for any other user. I've tried deleting and creating new accounts, but no matter what I do iTunes crashes on launch for any user but me. Here's the crash report: Date/Time: 2007-08-12 13:09:51.731

  • How do I get document to open?

    Help..I received large doc as PDF attachment in email. It changed format when tried to save in word doc so moved email to word doc, now won't open at all.. It is in word documents but is greyed out. I cannot open it at all through the email anymore.