2010 May 21 1:49 AM
Hello all
i am trying to send a file that is located in application server, this file was created in BINARY MODE, so now i need to download from this server and then send it by e-mail, i haver already download in BINARY MODE but when i send it and i open this appears in BINARY MODE i need to see in the specific format, for example:
I have a FILE.XLSX which is BINARY MODE in the server and i used this function to download it
CALL FUNCTION 'C13Z_RAWDATA_READ'
EXPORTING
i_file = input_file
IMPORTING
e_file_size = lv_file_size
e_lines = lv_lines
TABLES
e_rcgrepfile_tab = it_tab
EXCEPTIONS
no_permission = 1
open_failed = 2
read_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
w_doc_data-doc_size = lv_file_size.
LOOP AT it_tab INTO wa_itab.
t_attachment-line = wa_itab-orblk.
APPEND t_attachment.
ENDLOOP.
ENDIF.
fter to recive the file in binary mode i move it to the internal table t_attachment, after that i send it by e-mail,
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'EDISO'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
*--> Crea el cuerpo del mensaje
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_mensaje LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = space. "'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1 ."5.
t_packing_list-body_start = 1. "5.
IF t_attachment[] IS NOT INITIAL.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = c_format. THIS IS THE FORMAT I NEED TO SEE THE FILE FOR EXAMPLE: XLSX
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
ENDIF.
But when i open the mail and open the file attach appears in BINARY so i need to see in XLSX format,
Thanks a lot for you help
2010 Jul 17 1:25 AM