08-29-2015 7:10 PM
Hello,
I am trying to send an email with txt tab delimited file as attachment. I am following what Thomas Jung has suggested in other posts. I am able to generate the email with txt attachment but my issue is txt is not taking into account carriage return (CR_LF). But if I open the txt file with excel, I can see carriage return. Not sure what I am doing wrong for txt file to discard carriage return. Below is what I am doing. Thomas Jung or someone please help me.
I am using SCMS_STRING_TO_FTEXT per Thomas suggestion. My str2 string has the contents of my attachment with tab & carriage returns. And I am passing my IT_OBJBIN to CONTENTS_BIN of SO_DOCUMENT_SEND_API1.
08-30-2015 3:53 AM
Hi,
Start using cl_bcs .
The program attached use cl_abap_char_utilities=>cr_lf .
After generating the tab delimited string use:
DATA: it_solix TYPE solix_tab .
DATA: attachment_subject TYPE so_obj_des .
DATA: ob_document_bcs TYPE REF TO cl_document_bcs.
CALL METHOD cl_bcs_convert=>string_to_solix
EXPORTING
iv_string = your_string
IMPORTING
et_solix = it_solix.
attachment_subject = 'Attachment subjec' .
CALL METHOD ob_document_bcs->add_attachment
EXPORTING
i_attachment_type = 'txt'
i_attachment_subject = attachment_subject
i_att_content_hex = it_solix.
Easy.....
Regards.
08-30-2015 8:34 PM
Hi Adrian,
Pls. take help from Report BCS_EXAMPLE_7, available in your system..!!
Thanking You All..!!