Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Report download issue

0 Kudos

Hi Experts,

I have delvelope one ALV Report which displays output correctly, now the problem is, if i download it in local file in .xls format it will not shows all the records in XL file. Some records inbetween lost. and if i download it from menu bar LIST-SPREADSHEET and save it with .xls it shows all the records.

I have use following FMs in Report.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

      i_callback_program                = SY-REPID

     i_callback_top_of_page            = 'TOP_OF_PAGE'

      is_layout                         = LS_LAYOUT

      it_fieldcat                       = IT_FIELDCAT

    IT_SORT                           = LS_SORT

      i_default                         = 'X'

      i_save                            = 'A'

* IMPORTING

     TABLES

       t_outtab                        = IT_FINAL

  EXCEPTIONS

    program_error                     = 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.

and

FORM TOP_OF_PAGE.

   REFRESH it_listheader[].

   wa_listheader-info = 'Input Tax Register Report'.

   wa_listheader-typ = 'H'.

   APPEND wa_listheader TO it_listheader.

   CLEAR wa_listheader.

   CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

     EXPORTING

       it_list_commentary       = IT_LISTHEADER[].

ENDFORM.                    "top_of_page

Please help me.

Thanks in advance.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

First look for OSS notes related to "Excel Spreadsheet export" on your system and your version of Excel. Not every tool is at same level, some are stuck in the good old (xls) 65,536 rows by 256 columns when last have exceeded those limits like (xlsx) 1,048,576 rows by 16,384 columns - Start with Note 1517329 - ALV Spreadsheet Export: Format Overview

Most standard tools (outside OLE2) that override currently the limit don't actually create Excel up-to-date files, but flat or xml compatible files that Excel will convert correctly. Actual conversion start with (AFAIK) class cl_xlsx_document, exception if of course scn abap2xlsx

Regards,

Raymond

5 REPLIES 5

Former Member
0 Kudos

Hi Gopal,

Did you check all the sheets of the excel sheet that is downloaded. Because when you download with the button in the ALV to save in excel sheet. It saves the data in multiple sheets.

Let me know still it does not solve your problem.

Thanks,

Tooshar Bendale

0 Kudos

yes Tushar i checked all sheets of excel, not appearing in it

vinoth_aruldass
Contributor
0 Kudos

hi,

it is because of some format problem . use it with menu spreadsheet itselt . or try %pc in command button.

hope it helps,

Vinoth.

alex_campbell
Contributor
0 Kudos

.XLS format a limit of 65536 rows, it cannot store any more records than that. Is your dataset larger tahn this?

raymond_giuseppi
Active Contributor
0 Kudos

First look for OSS notes related to "Excel Spreadsheet export" on your system and your version of Excel. Not every tool is at same level, some are stuck in the good old (xls) 65,536 rows by 256 columns when last have exceeded those limits like (xlsx) 1,048,576 rows by 16,384 columns - Start with Note 1517329 - ALV Spreadsheet Export: Format Overview

Most standard tools (outside OLE2) that override currently the limit don't actually create Excel up-to-date files, but flat or xml compatible files that Excel will convert correctly. Actual conversion start with (AFAIK) class cl_xlsx_document, exception if of course scn abap2xlsx

Regards,

Raymond