BlogBlogA 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
Automating Material Data Extracts: A Multi-Format Email Report in ABAP
A worked ABAP report selects material master data from MARA, builds it into one of four formats, and emails it as an attachment through the BCS API — CL_BCS, CL_DOCUMENT_BCS and CL_CAM_ADDRESS_BCS — building a document, attaching the file, setting the recipient and sending it immediately. The XLSX branch builds a real workbook with abap2xlsxabap2xlsxA library that reads and generates .xlsx Excel workbooks directly from ABAP data, without exporting through a list viewer, installed through abapGit and tested from SAP_ABA 731.independent, abap's ZCL_EXCEL and ZCL_EXCEL_WRITER_2007 classes, rather than the HTML-table trick used for the other formats.
Where it sits
Explains
NotificationsABAPNotificationsTelling 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.abap2xlsxABAPabap2xlsxA library that reads and generates .xlsx Excel workbooks directly from ABAP data, without exporting through a list viewer, installed through [abapGit](artifact:abapgit-abapgit) and tested from SAP_ABA 731.
Who is behind it
reddysekharpathipatiauthor
Properties
About this work
Published
Published on
Group by
Piece, what it offersStill applies
AWS Mail configuration for SAP ABAP SystemsAWS Mail configuration for SAP ABAP SystemsWalks through routing an SAP ABAP system's outbound mail through Amazon SES instead of an on-premises mail server or a dedicated EC2 SMTP instance: verifying a sender address and generating SMTP credentials in SES, creating the SMTP node in transaction SCOT, importing the SES endpoint's certificate into the SSL client via STRUST, and testing delivery through SO01 and SOST. It covers the SMTP relay underneath ABAP's mail delivery, the layer Notifications marks as where the core stops and where a channel like this is written on top.brijesh_tripath, published 2025-03-04
SAP: Email Functionality in SAP with a Custom Function ModuleSAP: Email Functionality in SAP with a Custom Function ModuleA 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.Surendra_Karma, published 2024-12-16
Details
Graph
Notificationscapability, core and community
abap2xlsxartifact
SAP Communitypublishing source
SAP Communityabap-development-tag
Source
Type
blog
Published on
Host
community.sap.com
Discovered via
First seen
History
- Entered the atlasDiscovered via SAP Community · abap-development-tag.
For your agent
- Ref
content:automating-material-data-extracts-a-multi-format-email-report-in-abap- JSON
- /content/automating-material-data-extracts-a-multi-format-email-report-in-abap.json
- MCP
- Connecting an agent