Skip to Content
-2

Email attachment were corrupted

Hi all,

I have a requirement to send attachments to customer with different type of formats.

I'm sending the documents in .ZIP format, can you help me on this..

CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' EXPORTING buffer = l_vzip * IMPORTING * output_length = lv_len TABLES binary_tab = lit_content_255.

Thanks in advance,

Satish

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Mar 11, 2017 at 03:34 PM

    You must first identify where the real problem is. How do you know it's because of SCMS_XSTRING_TO_BINARY? It could be because you pass the internal table to the mail in text mode, or you forget to pass the length of the ZIP (unit: number of bytes)

    Add comment
    10|10000 characters needed characters exceeded

    • You should pass the length of the ZIP using I_ATTACHMENT_SIZE parameter of ADD_ATTACHMENT (otherwise, the length is considered being the number of lines of LIT_CONTENT_255 multiplied by 255 bytes).

  • Mar 13, 2017 at 10:52 AM

    Thanq Rossi... Finally I fixed the bug. Actually that is sorting problem. I sorted internal table of raw data by attachment number, that's why attachments corrupted. Now I removed "SORT statement. Issue resolved.

    Thanks for your reply.

    Regards,

    Satish

    Add comment
    10|10000 characters needed characters exceeded