Skip to Content
0

Add LOGO image to XML and send e-mail as Excel file in background

May 23, 2017 at 01:53 PM

212

avatar image
Former Member

Hi

We need to send reports from SAP to customer in the form of PDF & Excel files as attachments in 1 single e-mail.

Considering the content size, this e-mail sending report would be scheduled in background.

I am able to send both excel & PDF files in the background(in the form of XML) but the problem comes when I have to format & add LOGO at the top of the excel file.

For sending the files in background, I convert the data into XML(using IF_IXML_ELEMENT) and attach it in e-mail as .xls file, though am able to do formatting on the data but not able to attach LOGO image to it.

I had already extensively searched through the forum and not able to find any solution(could find examples only related to charts but not LOGO images).

Please help me with the solution.

Thanks

Amar.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sandra Rossi May 23, 2017 at 04:18 PM
1

If you install ABAP2XLSX, you'll find the demo program ZDEMO_EXCEL16 which is doing a "logo" rather well !


hy2uk.png (47.6 kB)
Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sandra,

Thanks for your quick response.

Can you please guide me, how to install ABAP2XLSX in my SAP system.

I am having logo in MIME repository, is it possible to use the same path for uploading that logo in program using ABAP2XLSX.

0
0
Former Member

Hi

Thanks again,

I tried installing by following the installation guide, copied the code but got the below error:

Type "ABAP_BOOL" is unknown

error.png (41.2 kB)
0

It looks like you're using an old ABAP release (7.0 or before). From 7.02, constants and types from type pools don't need the type pool being declared. So, in your case, you have to add "TYPE-POOLS abap."

0
Former Member

Hi Sandra,

Thanks for your seggestion.

We followed changes in report as per your suggestion, the below error is populating.

Can you please guide me, how to proceed further ASAP.

Thanks

Amarnath

0

There are many differences in ABAP 7.0 compared to the latest versions.

You will have to do many adaptations. As I won't be able to help you at every syntax error, you should solve these errors by yourself.

For instance, here, you can deduce that TAKE_BITS is a functional method and its return value is passed to the only parameter of method BITS_TO_INT. And if you know well ABAP 7.0, you should know that it's forbidden to have expressions (a functional method call here) at parameter positions. So, you should first call TAKE_BITS and get its return value into a new data object, then call BITS_TO_INT with this new data object as argument.

0