2020 Sep 03 12:02 PM
Hi All,
We are using Standard texts for getting Email body text, Can i know if there is any way to
add graphic or bitmap image in Mail body as a signature?
Things I have tried,
1) Created graphic in SE78
2) used the BITMAP command in Standard Text, but it doesn't work
Could you please let me know if there is any other way to accomplish this?
2020 Sep 03 12:02 PM
Hi,
Thank you for visiting SAP Community to get answers to your questions. I am here to help you to get the most out of it.
First of all, I recommend that you
familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't done so already), as
it provides tips for preparing questions that draw responses from our
members.
For example you:
- can outline what steps you took to find answers (and why they weren't
helpful)
- can share screenshots of
what you've seen/done
- can use a descriptive subject line
Please also make sure you're using all appropriate tags, so the right experts can find your question. Overall, the more details you provide, the more likely it is that members will be able to assist you. Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question - but if that happens, you can leave more details in a comment).
Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.
Best,
Lena (SAP Community Moderator)
2020 Sep 03 12:09 PM
Store the image somewhere (many solutions are possible) you can read it from ABAP, attach it to the email as a multipart and with a Content-ID and refer to it from the HTML body of the email via <img src="cid:the-content-id">.
There are lots of examples in the forum and in the wiki.
2020 Sep 03 12:17 PM
Hello saikalyan
First you have to attach an image to the email as an attachment.
DATA:
lv_img TYPE xstring,
ls_attachment TYPE crms_email_image,
ls_image_url TYPE crms_email_image_url,
lt_attachments TYPE crmt_email_image,
lt_image_urls TYPE crmt_email_image_url.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = IMAGE_NAME
p_id = IMAGE_ID
p_btype = IMAGE_TYPE
RECEIVING
p_bmp = lv_img
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
CHECK sy-subrc = 0.
ls_attachment-content_id = IMAGE_NAME.
ls_attachment-content_bin = lv_img.
ls_attachment-is_embedded = abap_true.
APPEND ls_attachment TO lt_attachments.
ls_image_url-content_id = IMAGE_NAME.
ls_image_url-url = cl_ssf_xsf_utilities=>mime_url_for_bds_graphic(
p_object = 'GRAPHICS'
p_name = IMAGE_NAME
p_id = IMAGE_ID
p_btype = IMAGE_TYPE ) .
APPEND ls_image_url TO lt_image_urls.
CALL METHOD cl_crm_email_utility=>get_body_part_from_editor
EXPORTING
iv_rewrite_cid = abap_true
it_image_url = lt_image_urls
it_attachment = lt_attachments
IMPORTING
et_mime_data = lv_body
CHANGING
cv_html = lv_body_html
EXCEPTIONS
input_error = 1
OTHERS = 2.
Then, in your email's HTML body, call the image with <img cid:IMAGE_ID />.
Kind regards,
Mateusz2024 Feb 26 9:47 AM