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: 

excel with graphic for upload and download

Former Member
0 Kudos

Dear All,

Is it possible to store data in excel with graphics for eg.. boxes in (texts(for header or items) in SAP) and retreive the same data in excel format including graphics.

Regards,

Sonia

3 REPLIES 3

Former Member
0 Kudos

Hi,

Yes it is possible.

check the foollowing program.

&----


*& Report ZDOWNLOAD_PROGRAM

*&

&----


*&

*&

&----


report zdownload_program.

parameter : p_path type rlgrap-filename default 'C:\Pdata.xls'.

data : gt_output type standard table of trdirt,

wa_output type trdirt,

p_filen type string.

at selection-screen on value-request for p_path.

clear p_path.

call function 'F4_FILENAME'

importing

file_name = p_path.

start-of-selection.

select * from trdirt

into table gt_output

where name like 'Z%'

or name like 'Y%'.

end-of-selection.

move : p_path to p_filen.

call function 'GUI_DOWNLOAD'

exporting

  • BIN_FILESIZE =

filename = p_filen

filetype = 'ASC'

  • APPEND = ' '

write_field_separator =

cl_abap_char_utilities=>horizontal_tab

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE

  • IMPORTING

  • FILELENGTH =

tables

data_tab = gt_output

  • FIELDNAMES =

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.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

Regards

Rajesh Kumar

Former Member
0 Kudos

hi sonia

the fm ALSM_EXCEL_TO_INTERNAL_TABLE can be used to upload excel file and you can download to an excel sheet using the function module GUI_DOWNLOAD.

hope this helps

regards

Aakash Banga

Former Member
0 Kudos

Hi,

Refer below FMs.

ALSM_EXCEL_TO_INTERNAL_TABLE

GUI_UPLOAD

GUI_DOWNLOAD

ALSM_EXCEL_TO_INTERNAL_TABLE and GUI_UPLOAD both FMs you can use upload Excel file.

Regards

Md.MaahboobKhan