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: 

Logo in ALV to Excel

former_member377111
Participant
0 Kudos

Dear Friends,

1.When i try to download ALV report to excel it is not downloading the logo to the excel sheet.

2.I want my logo in the left side of the ALV.

Please suggest.

Thanks in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Neliea,

What is the code snippet you have used i mean the Function Module for downloading

You can use thefollowing which does not pose any problem,

CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = 'your file name with pathl'
filetype = 'BIN'
CHANGING
data_tab = internal table having data.

CALL FUNCTION 'XXL_FULL_API'
  EXPORTING
*   DATA_ENDING_AT          = 54
*   DATA_STARTING_AT        = 5
   filename                = 'TESTFILE'
   header_1                = header1
   header_2                = header2
   no_dialog               = 'X'
   no_start                = ' '
    n_att_cols              = 6
    n_hrz_keys              = 1
    n_vrt_keys              = 4
   sema_type               = 'X'
*   SO_TITLE                = ' '
  TABLES
    data                    = t_sflight
    hkey                    = t_hkey
    online_text             = t_online
    print_text              = t_print
    sema                    = t_sema
    vkey                    = t_vkey
 EXCEPTIONS
   cancelled_by_user       = 1
   data_too_big            = 2
   dim_mismatch_data       = 3
   dim_mismatch_sema       = 4
   dim_mismatch_vkey       = 5
   error_in_hkey           = 6
   error_in_sema           = 7
   file_open_error         = 8
   file_write_error        = 9
   inv_data_range          = 10
   inv_winsys              = 11
   inv_xxl                 = 12
   OTHERS                  = 13
          .
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

As suggested by our friend Usnig SET GET CALL METHOD in OOPs you can very well solve your issue.

Revert for further clarification

Thanks and Regards

Srikanth.P

4 REPLIES 4

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Neliea,

What is the code snippet you have used i mean the Function Module for downloading

You can use thefollowing which does not pose any problem,

CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = 'your file name with pathl'
filetype = 'BIN'
CHANGING
data_tab = internal table having data.

CALL FUNCTION 'XXL_FULL_API'
  EXPORTING
*   DATA_ENDING_AT          = 54
*   DATA_STARTING_AT        = 5
   filename                = 'TESTFILE'
   header_1                = header1
   header_2                = header2
   no_dialog               = 'X'
   no_start                = ' '
    n_att_cols              = 6
    n_hrz_keys              = 1
    n_vrt_keys              = 4
   sema_type               = 'X'
*   SO_TITLE                = ' '
  TABLES
    data                    = t_sflight
    hkey                    = t_hkey
    online_text             = t_online
    print_text              = t_print
    sema                    = t_sema
    vkey                    = t_vkey
 EXCEPTIONS
   cancelled_by_user       = 1
   data_too_big            = 2
   dim_mismatch_data       = 3
   dim_mismatch_sema       = 4
   dim_mismatch_vkey       = 5
   error_in_hkey           = 6
   error_in_sema           = 7
   file_open_error         = 8
   file_write_error        = 9
   inv_data_range          = 10
   inv_winsys              = 11
   inv_xxl                 = 12
   OTHERS                  = 13
          .
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

As suggested by our friend Usnig SET GET CALL METHOD in OOPs you can very well solve your issue.

Revert for further clarification

Thanks and Regards

Srikanth.P

Former Member
0 Kudos

Hi,

try the following program.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = 'C:\file.XML'

filetype = 'BIN'

CHANGING

data_tab = lt_xml.

hope it will solve your problem.

Regards

Rajesh Kumar

former_member377111
Participant
0 Kudos

Solved