03-24-2011 1:59 PM
Hi experts.
I must trigger a Mail with as attachment, the attachment of an business activity.
So, i've used the class cl_crm_documents->get_info for read the attachment and after
cl_crm_documents->get_document for get all the details of the attachment(file format,name, etc).
This method return also the Binary of the attachment.
Now i must add the attachment at the mail. i'm using BCS
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = file_type
i_attachment_subject = file_des
i_att_content_hex = binary_content.
the problem is the binary_content...The method has as parameter a table with a structure length 255.
The method cl_crm_documents->get_document return a structure with lenght 1022.
How i can map this 2 tables??
or how i can get the binary with a table compatible with the method document->add_attachment?
Best regards
Marco
Marco
03-24-2011 2:15 PM
Hi Marco,
I had similar problem in the past.
I used
SCMS_BINARY_TO_XSTRING to convert a binary table to xstring, then
SCMS_XSTRING_TO_BINARY to convert xstring to binary.
Regards
Andrea
03-24-2011 2:15 PM
Hi Marco,
I had similar problem in the past.
I used
SCMS_BINARY_TO_XSTRING to convert a binary table to xstring, then
SCMS_XSTRING_TO_BINARY to convert xstring to binary.
Regards
Andrea
03-24-2011 2:27 PM
Ciao Andrea
Thanks for your reply..
This trick solved my problem!!
Grazie
Marco
Edited by: Menegazzo Marco on Mar 24, 2011 3:27 PM