Skip to Content
0
Jan 20, 2017 at 10:41 AM

Send CSV via mail. Data tab is not compatible?

144 Views

Hey, I'm creating a csv-file from an internal table. Afterwards I want to send it via an email. In the "add_attachment" method I get an error that the converted table doesn't fit to "i_att_Content_text". I also tried i_att_Content_hex" with the same error.

How can I send a CSV-File via mail without these errors?

DATA: lt_converted_tab TYPE truxs_t_text_data.
 gr_document = cl_document_bcs=>create_document(
 i_type = 'RAW'
 i_text = gv_text
 i_length = '12'
 i_subject = 'CSV-Datei Useranlagereport' ).

 gr_document->add_attachment(
 EXPORTING
 i_attachment_type = 'csv'
 i_attachment_subject = 'CSV-Datei'
 i_att_content_text = lt_converted_tab
 ).