11-25-2022 9:45 AM
Hi all.
I want to send E-mail from sap system,but the attachment is Excel like this .
I use OLE and call function up_load get attachment size and content hex, so I can send mail success.
But another question what I con't fix it, The program must be executed in the background;So, Ole and function are useless.
Is there any other way to send mail in the background?
By the way, If there is one way can convert excel to pdf, it can also solve the problem.
The most important thing is that the program can run in the background.
Best regards.
11-25-2022 9:50 AM
Mail in background should not be a problem if you use CL_BCS
Excel in background should not be also a problem if you use ABAP2Xlsx
11-25-2022 10:07 AM
Hi frdric.girod
Thanks for your answer.I know how to use cl_bcs,but I don't know what is ABAP2Xlsx.11-25-2022 11:11 AM
samery so it will be a good day for you, you will learn about abap2xlsx
11-25-2022 11:11 AM
11-25-2022 12:09 PM
As you also suggest PDF: in ABAP, there are 3 ways to generate a PDF file (1: Adobe Form with SFP / 2-3: conversion from OTF or ABAP List), none of them can convert an Excel file into PDF.
11-25-2022 12:20 PM
and let's not forget a blogpost with the exact solution to this question!
11-25-2022 12:50 PM
c5e08e0478aa4727abc4482f5be390b2 and the autor of this blog is jjamese.mcdonough, he wrote my favorite book (Object Oriented Design with ABAP)
11-25-2022 2:12 PM
Hi, implement using the following objects.
cl_bcs=>create_persistent( ).
...
cl_document_bcs=>create_document(...)
...
cl_document_bcs->add_attachment(...)
...
11-28-2022 12:33 AM
11-25-2022 5:26 PM
Hi Tom,
ABAP2XLSX is a tool that you can install in your SAP system that offers a multitude of possibilities for Excel file processing. I highly recommend you install it. You can search the Web and you will find all the information on GitHub.
I hope this helps.
Thanks.
Patrice
11-28-2022 12:32 AM
Hi the.procedural.abaper
Thanks for your suggest,it's useful for me .Thanks11-28-2022 12:36 AM
11-28-2022 12:38 AM