BlogBlogtypeA post on somebody's own site or a community platform. Nobody edits it after publication, so it dates from the day it was written.See every one →SAP Community

SAP: Email Functionality in SAP with a Custom Function Module

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 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 leaves to the application.

Where it sits

Explains
NotificationsABAPNotificationscapabilityTelling a person something happened when they are not looking at the screen — a notification in the launchpad, an email, a message somewhere they already are.Error handlingABAPError handlingcapabilityTurning a failure into a response a client can act on — protocol-correct error payloads, correlation, and a boundary between internal detail and what a caller sees.
Source
reachable

Who is behind it

Surendra_Karmaauthor

Properties

About this work

declared and crawled
Published
declared
Published on
declared
Views
crawled
9,035

For notifications

on the edge
Applies in
authored
abap

For error-handling

on the edge
Applies in
authored
abap

More on this4

Group by
Piece, what it offersStill applies
Also explainingNotifications4
S/4HANA Custom Development - What happens in case of errors in BAPIs or RAP BOs?
YouTube — SAP Developers playlists, SAP Developers
nothing recorded
How to create a Purchase Order through BAPI in the SAP through program ( SE38 ) T-CODE .
SAP Community, chandu_kumar_badukuri
nothing recorded
Basic code's of ABAP
SAP Community, RakeshZore
nothing recorded
AWS Mail configuration for SAP ABAP Systems
SAP Community, brijesh_tripath
nothing recorded

Details

Graph4 edges
POINTS OUT →
explainsNotificationscapability, core and community
explainsError handlingcapability, core and community
published onSAP Communitypublishing source
discovered viaSAP Communitybtp-abap-environment-tag
Source
Type
blog
Published on
Host
community.sap.com
First seen
History1
  • Entered the atlasDiscovered via SAP Community · btp-abap-environment-tag.
For your agent
Ref
content:sap-email-functionality-in-sap-with-a-custom-function-module
JSON
/content/sap-email-functionality-in-sap-with-a-custom-function-module.json
MCP
Connecting an agent