Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3560

Issue with Header data while downloading internal table to excel.

$
0
0

Hi all,

 

I have a requirement to download internal table to excel sheet including header.In my method cl_gui_fronted_services=>gui_download I used file type DBF. But when I download data to presentation sever header field names truncated to 10 characters. Anyone could you please suggest  how to get full length header using file type DBF.

 

Code:

 

CALL METHOD cl_gui_frontend_services=>gui_download

      EXPORTING

        filename                = lv_file_path1

        filetype                = 'DBF'

        write_field_separator   = 'X'

        fieldnames              = gt_header[]

      CHANGING

        data_tab                = gt_finaldata[]

      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

        not_supported_by_gui    = 22

        error_no_gui            = 23

        OTHERS                  = 24.

    IF sy-subrc <> 0.

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

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

    ENDIF.

 

Thanks in Advance,

Suneel.Uggina.


Viewing all articles
Browse latest Browse all 3560

Trending Articles