Posts

Showing posts with the label sap abap send email with xlsx attachment

SAP - Custom FM to Send XLSX Attachments In Mail - Reusable Asset

Image
Generally when there is a requirement, to send excel attachments in a mail, we face issues with XLSX format. XLS Attachment are easy to do, but the formatting of data is an issue . Also if we are able to resolve the same Through HTML Templates, the size of attachment sometimes becomes an issue. The benefit of sending XLSX attachment is formatting is automatically done, auto width optimization is taken care of and data issues are not observed. Here we have created a reusable function module which can be used in any program to create a XLSX attachment in any mail program. Function Module:  ZSEND_MAIL_XLSX_ATTACHMENT ATTRIBUTES: IMPORTING PARAMETERS: TABLES: STRUCTURE: EXCEPTION: CODE FOR FM: FUNCTION zsend_mail_xlsx_attachment. *"---------------------------------------------------------------------- *"*"Local Interface: *"  IMPORTING *"     VALUE(I_BODY) TYPE  SOLI_TAB *"     VALUE(I_FIELDCAT) TYPE  ...