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

Similar Messages

  • 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

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

  • 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

  • I've had a recent issue with downloading songs from the store, and they won't show up in my iTunes library, only in my purchased playlist. Anyone know how to get recent purchases to show in the music library?

    Am i the only one with this issue?

    when you play the CD in your laptop on your home screen a Cd should pop up under the name of the album. Than when you open itunes it will probly say something like "let this CD download" or something like that. If it doesn't than automaticlly while the CD is importing to your itunes a page will pop up with a progess of the CD download.
    Hope that helped.

  • Issue after downloading excel file: SYLK format

    Hi experts,
    I have downloaded an excel file through 'GUI_DOWNLOAD'.
    When I open the file, I get a pop up message which says:
    "Excel has detected that mg.xls is a SYLK file, but cannot load it. Either the file has error, or it is not a SYLK file format.
    Click OK to try to open the file in a different format."
    mg.xls is the excel file name.
    When I click OK, the the file opens in a proper XLS format.
    But I am not sure why is this pop up message coming.
    Thanks,
    Ajay.

    Hi,
    GUI_DOWNLOAD dows not download in excel format
    Use following FM
    call function 'MS_EXCEL_OLE_STANDARD_DAT'
    exporting
    file_name = p_file " path offile where u need to download
    CREATE_PIVOT = 0
    DATA_SHEET_NAME = ' '
    PIVOT_SHEET_NAME = ' '
    PASSWORD = ' '
    PASSWORD_OPTION = 0
    tables
    PIVOT_FIELD_TAB =
    data_tab = <dyn_table>  "internal table with data
    *fieldnames = int_head "internal table with header
    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.
    Regards,
    Prashant

  • Avaya IP phone has an issue then downloading calendar from Exchange 2010

    Hi all,
    I'm having an issue, please give me an advice! When my IP phone (IP) works with  Exchange 2010, it can not download calendar. I captured and saw that after client sends hello, server sends hello, server sends certificate, then client sends back bad
    certificate and TCP Reset messages. I installed Exchange and AD on the same server. I also installed CA on this server to issue certificate to Exchange. I configured phone download root cert of CA and certificate of Exchange. If you require any information,
    please let me know.
    I don't know what mechanism that phone used to connect to Exchange to download calendar. And don't have any document configuration. If you have any experience, please share with me.
    Hoang Vu,
    Thanks

    Hi,
    You mentioned the client sent back bad certificate, please check if the certificate was configured correctly.
    For this issue, I recommend you contact the Avaya IP Phone support to get better help. Thanks for your understanding.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Issues in Download File from Server to PC

    Hi Experts,
    i am havin requirement to download a File and show it to user in open/Sava dialog box.
    i have tried both way to achieve this.
    1)  cl_wd_runtime_services 2 File Download Elements
    here is coding for cl_wd_runtime_services
      CONCATENATE 'C:\temp\'
                         stru_ctx_resume-cv_language
                         stru_ctx_resume-cv_type
                         stru_ctx_resume-oprn_role
                         lv_version
                          '.pdf' INTO lv_filename.
            lv_filetype = 'application/pdf'.
            lr_conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
    Showing Downloaded File to new Window.
            cl_wd_runtime_services=>attach_file_to_response(
              i_filename  = lv_filename
              i_content   = lv_filecontent " Its file Byte Array
              i_mime_type = lv_filetype
              i_in_new_window = abap_false
              i_inplace       = abap_false ).
    Problem Statement: Filedownload is working perfect, the only prolem is that IE give warning message before download, i want to get rid of this warning message so i opted for File Download UI Element.
    2) File Dowload Element:
    i have a file download element in a table collumn, this table is mapped to a node Called CTX_Resume, file download element's data property is mapped to attribute called file_content of type xSTring, this attribute is in node called data which is child node of CTX_Resume.(1:N, Lead Selection True, Singleton True)
    so in summary
    CTX_Resume(Node): Mapped to table
        File_DATA(Sub Node of CTX_Resume): It has Supply methodName: Sup_File_Data
              File_Content(Type Xstring) Mapped to Data property of Filedownload
    Codding at Supply Method is
    METHOD sup_file_data .
    data declaration
      DATA:
        stru_file_data            TYPE wd_this->element_file_data,
        stru_resume           TYPE wd_this->element_ctx_resume,
            lv_filecontent TYPE zall_empprof_file_content,      "#EC NEEDED
            lv_error_text TYPE zall_empprof_error_text,         "#EC NEEDED
    if wd_this->mv_first_time = abap_false.
      CALL METHOD parent_element->get_static_attributes
        IMPORTING
          static_attributes = stru_resume.
      if not stru_resume is INITIAL.
        MOVE stru_resume-cv_version TO lv_version.
      CALL METHOD wd_assist->download_cv
        EXPORTING
          im_doc_id       = stru_resume-doc_id
          im_doc_type     = 'pdf'
          im_doc_version  = stru_resume-cv_version
        IMPORTING
          ex_file_content = lv_filecontent " File Byte Array
          ex_error_text   = lv_error_text.
      IF lv_error_text IS INITIAL.
        move lv_filecontent to stru_file_data-file_content.
      ENDIF.
    else.
      wd_this->mv_first_time = abap_false.
    endif.
      node->bind_structure(
        new_item =  stru_file_data
        set_initial_elements = abap_true ).
    ENDMETHOD.
    Problem Statement: this works perfect only at first time as i cant controll the triggering of Supply method, to get rid of this i want whenever user clicks on File Download Link, it must trigger supply method.
    My table doesnt have selections properites = none.
    hope i have given sufficiant information about the problem,
    please help me....
    Regards
    Manish.
    Edited by: Manish Vijay on Jul 3, 2009 2:28 PM
    Edited by: Manish Vijay on Jul 3, 2009 2:34 PM

    It depends on your browser mime type setting.
    If you donload a doc file for example and the client's browser is set as to open doc files automatically with word application you will not get the save file dialog box.
    Its all dependent on the client machine setting and not on forms.

  • ITunes Match unable to download songs from iCloud issue

    I have a MacBook Pro running Mavericks 10.9.4 and iTunes 11.3.1. I am having repeated issues with downloading songs from iCloud to my MBP. I have reset Match numerous times using the steps located here: http://support.apple.com/kb/TS4054.
    Then it works for a short time and I am able to download some songs and then suddenly I will get the pinwheel, the songs in iCloud will all show greyed out and then I am no longer able to download anymore. Repeat process.
    I am about to try a test tethering to my iPhone's internet service to see if that improves things. So far, the only threads I have found on this topic have been related to Mountain Lion. So I'm not sure if this is a different issue I am seeing.
    I also tried resetting the System Configuration to see if it would fix, but no luck: https://discussions.apple.com/thread/4160355?start=90&tstart=0
    Is anyone else experiencing this and what is the issue? Can it be fixed?

    Hi,
    I don't think that you have a similar issue to OP.
    Mettelin wrote:
    That means that iTunes Match is stripping out the Sample Rate when it uploads some tracks (even variable within albums) and then it gets stuck when you try to play the track.
    Apple needs to fix this.
    Match does not strip out the Sample Rate. If tracks are matched, it shows the standard sample rate of 44,100 but unknown when tracks are uploaded (probably because Apple does not capture this on such tracks). If you have an iCloud status of "Waiting" and a blank sample rate, this suggests that the match / upload process was not completed.
    If you have not already solved your problem, I suggest that you delete those tracks and then read them to your iTunes library. Once you have matched or uploaded them, you can delete from your hard drive but not the cloud.
    Jim

  • Download file from AL11 into CSV to load MD into BPC

    Hi All
    I have an issue in downloading file from AL11 which is in the form of CSV.
    1) I have exported the masterdata for Costcenter using a Open hub.
    2) The file is residing at the app server AL11 in the form of CSV.
    3) I want to down load the file into CSV and upload that file into BPC NW for my costcenter diemension.
    When i am downloading the file from AL11 , the total records are merged into one row, i cannot download same as it is available in AL11.
    I have followed the HOW TO GUIED : HOW TO AUTOMATE MD LOADING IN BPC nw.
    I m unable to get the file properly on to my PC.
    could you please help me .
    AK

    You should open your file in AL11, then clicking 'List' then 'Save' you'll be able to download your file. There will be some header lines indeed.
    You'd better use an open hub with your local client as destination if you need the file.

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

  • Download data from ui to excel

    Hello Experts,
    We have a requirement wherein, we need to download data from SAP CRM Web-ui (Assignment Block/View) to excel sheet(CSV) using a custom button.
    Kindly help me in doing so.
    Thanks,
    Anubhuti Dixit

    Hey Guys,
    anybody has a answer on this issue?

  • Word and Excel hang "downloading" file from network drive - copy file to be able to open it

    Word or Excel hang trying to open files on a network drive maybe after an untidy close.
    Symptoms:  pick the file from a pinned entry on recent list or even direct from File!Open... or by double clicking on the file from file explorer.  Word/Excel show in the middle of the status line a comment "Downloading:filename "  
    a progress bar, that shows no progress, and a white cross on a red circle to close.  Some minutes later may Excel/Word  say could not open filename.
    I have removed any temporary copies of the file prefixed with the ~. However there are no documents shown in any document recovery pane.
    If I rename the original file the problem is still there.
    I can only clear the problem by working on a copy of the file. It works with either a new name of if the copy is used to replace the original file.
    It seems file explorer's "copy" is clearing something within the file that is causing this problem.
    I have seen the same issue with both Excel and Word documents in native Office 2010 format.
    Is there a better way to clear this issue?
    Thanks

    Hi,
    It doesn't hang/crash, does it?
    If you could provide the exact error message, it would be preferred to determine the cause.
    You can also try the steps below to modify the registry, as mentioned in this thread:
    http://social.technet.microsoft.com/Forums/en-US/ba5114e0-98dd-4b44-a078-373df8899048/word-2007-issue-slow-opening-files?forum=word
    Note your 12.0 represents Office 2007, 14.0 is for Office 2010.
    Important
    This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the
    registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry,
    http://windows.microsoft.com/en-US/windows7/Back-up-the-registry
    Word
    HKEY_CLASSES_ROOT\Word.Document.14\Shell\Open\Command                
    Rename Subkey “Command” to “Old_Command”                
    Rename Key “ddeexec” to “Old_ddeexec”
    Using FileType Manager change .xls from Word.Sheet.8 to Word.Sheet.14 In the Open Command append “%1” 
    .docx In the Open Command append “%1” 
    Excel
    HKEY_CLASSES_ROOT\Excel.Document.14\Shell\Open\Command                
    Rename Subkey “Command” to “Old_Command”                
    Rename Key “ddeexec” to “Old_ddeexec”
    Using FileType Manager change .xls from Excel.Sheet.8 to Excel.Sheet.14 In the Open Command append “%1” 
    .xlsx In the Open Command append “%1”
    If the issue persists, you can also read this KB below and let me know if it is helpful:
    http://support.microsoft.com/kb/313937/en-us
    Regards,
    Melon Chen
    TechNet Community Support

  • I reinstall the Yosemite due to the wifi issue, when finished, the iMovie was not installed, I try to download it from app store, but it's not free. How can I get iMovie back?

    I'm using a mid 2014 13" rmbp. I reinstall the Yosemite due to the wifi issue, when finished, the iMovie was not installed, I try to download it from app store, but it's not free. How can I get iMovie back?

    It's something to do with the main user account (not iTunes account) on my Mac because I logged in with another account and it downloaded fine, I installed it on the HDD and even though the date in App Store was 16th October 2014, it is the full installer of 10.10.2.
    To try to resolve this problem, I have copied the installer app elsewhere and deleted it but App Store still will not allow me to download it with my main user account yet just allowed me to update iTunes.
    I had a brainwave last night that it might have been related to me changing the default downloads folder to one not on my boot drive (to save disk space on my main boot drive) but having changed it back, tried again, rebooted and tried yet again, deleted my App Store preferences. nothing has worked.

  • 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

Maybe you are looking for

  • Hard drive broke. ipod not working with new computer

    Hello, My computer hard drive recently died on me. I got a new hard drive installed and I downloaded a new version of itunes (I think the latest) but when I connect my ipod to my computer, although it turns on the ipod, my computer isn't reading the

  • Filling Baseline date in the 'BAPI_ACC_DOCUMENT_POST'

    Hi All,    I am using the BAPI <b>'BAPI_ACC_DOCUMENT_POST'</b> for posting the documents and I can't able to update the Baseline date(Bline date) field in the BAPI which is inside the parameter 'ACCOUNTRECEIVABLE' since I am not having any customer n

  • Can't add to or rearrange songs in play lists

    Suddenly, iTunes decided not to work like it usually does. I can no longer drag songs into play lists and can't rearrange songs already in lists. Shuffle is not on, repeat is not on. I have the songs arranged by the order I originally added them, not

  • Display preferences do not allow for turning off Apple TV

    After turning on Apple TV it cannot be reset without rebooting the system. Display preferences will not allow unchecking of Apple TV. It reverts immediately from Off to Apple TV

  • Best Practices regarding AIA and CDP extensions

    Based on the guide "AD CS Step by Step Guide: Two Tier PKI Hierarchy Deployment", I'll have both internal and external users (with a CDP in the DMZ) so I have a few questions regarding the configuration of AIA/CDP. From here: http://technet.microsoft