Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to send E-mail from sap system with Excel Fixed format as attachment

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.

13 REPLIES 13

FredericGirod
Active Contributor
0 Kudos

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

0 Kudos

Hi frdric.girod

Thanks for your answer.I know how to use cl_bcs,but I don't know what is ABAP2Xlsx.

FredericGirod
Active Contributor

samery so it will be a good day for you, you will learn about abap2xlsx

https://github.com/abap2xlsx/abap2xlsx

matt
Active Contributor

Use a search engine. There's a git repository.

Sandra_Rossi
Active Contributor
0 Kudos

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.

abo
Active Contributor

and let's not forget a blogpost with the exact solution to this question!

FredericGirod
Active Contributor

c5e08e0478aa4727abc4482f5be390b2 and the autor of this blog is jjamese.mcdonough, he wrote my favorite book (Object Oriented Design with ABAP)

roberto_forti
Contributor
0 Kudos

Hi, implement using the following objects.

cl_bcs=>create_persistent( ).

...
cl_document_bcs=>create_document(...)

...
cl_document_bcs->add_attachment(...)
...

Hi roberto4tisap

Thanks, I konw how to send mail.

Patrice
Participant
0 Kudos

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

0 Kudos

Hi the.procedural.abaper

Thanks for your suggest,it's useful for me .Thanks

0 Kudos

Hi frdric.girod

Thanks for your suggest, I will learn it

0 Kudos

Hi sandra.rossi

I hope there is a way convert, but.....