Skip to Content
author's profile photo Former Member
Former Member

Download an internal table to excel file

hi ,

how can i download an internal table into an excel file.

Regards

Arun

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 23, 2004 at 08:52 AM

    During debuggin right click and choose option save as excel or if you want to do it thru program you can use gui_download to do the job.

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2004 at 11:22 AM

    Hi,

    CALL FUNCTION 'WS_DOWNLOAD'

    EXPORTING

    filename = 'd:\cps_data1.xls'

    filetype = 'DAT'

    mode = 'A'

    TABLES

    data_tab = intab

    EXCEPTIONS

    file_open_error = 1

    file_write_error = 2

    invalid_filesize = 3

    invalid_type = 4

    no_batch = 5

    unknown_error = 6

    invalid_table_width = 7

    gui_refuse_filetransfer = 8

    customer_error = 9

    no_authority = 10

    OTHERS = 11

    .

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    here intab is your internal table name.

    Try this. it will help.

    Regards,

    Kathir

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Arun

      Use the FM "RH_START_EXCEL_WITH_DATA" if your system has it.

      <i>As another thing, let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;

      - one 10 points (solved)

      - two 6 points (very helpful answer)

      - many 2 points (helpful answer)</i>

      Kind regards...

      *--Serdar

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.