{"ref":"content:sap-email-functionality-in-sap-with-a-custom-function-module","page":"/content/sap-email-functionality-in-sap-with-a-custom-function-module","json":"/content/sap-email-functionality-in-sap-with-a-custom-function-module.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"sap-email-functionality-in-sap-with-a-custom-function-module","title":"SAP: Email Functionality in SAP with a Custom Function Module","url":"https://community.sap.com/t5/technology-blog-posts-by-members/sap-email-functionality-in-sap-with-a-custom-function-module/ba-p/13962506","content_type":"blog","published_on":"source:sap-community","explains":[{"ref":"capability:notifications","applies_to":{"ecosystems":["abap"]}},{"ref":"capability:error-handling","applies_to":{"ecosystems":["abap"]}}],"summary":"A custom ABAP function module, ZFM_SEND_EMAIL, sends mail through Business Communication Services' CL_BCS and CL_DOCUMENT_BCS classes, adding TO/CC/BCC recipients and multiple attachments by building the HTML document in application code on top of what CL_BCS delivers, which is how ABAP's [notifications](capability:notifications) capability describes mail going out. The send sits in a TRY structure whose three CATCH blocks for CL_BCS's class-based exceptions are empty, so what reaches the caller is a BAPIRET2 table that BAPI_MESSAGE_GETDETAIL fills on the paths without an exception: no recipients given, sent to all, or not sent. That conversion into a caller-facing message table is what ABAP's [error handling](capability:error-handling) capability leaves to the application.","short":"ABAP function module sending email with attachments through BCS","author":"Surendra_Karma","published":"2024-12-16","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"btp-abap-environment-tag"}],"first_seen":"2026-10-09"},"drafted_with_ai":true},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"fair","evidence":"published 22 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2024-12-16"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":9035,"unit":"views"},{"value":0,"unit":"comments"},{"value":1,"unit":"likes"}]},"signals":{"views":9035,"likes":1,"comments":0,"metrics_at":"2026-10-25"},"series":null,"edges":{"authors":[]}}