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: 

After sending attachment through mail using ABAP program.....

former_member1114079
Participant
0 Kudos

Hello Experts,

I am facing a problem to fulfill a requirement.

My requirement is....sending the data of the internal table to an external mail with attachment(excel format). I have done with this. But when o am opening the excel sheet(attachment) it is showing a message that 'The file you are trying to open is in different format than specified by the file extension'

I am using the extension 'XLS' and 'RAW ' in the coding for the file formats.

You can please suggest your solutions if you know or already faced this type of issues.

Thank you.

Regards,

Anand

7 REPLIES 7

Former Member
0 Kudos

This message was moderated.

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

The system does not trust you....

I have the feeling that the file you are sending is a text file with the extension 'XLS'

If the file is comma separated values (http://en.wikipedia.org/wiki/Comma-separated_values) then

use the extension 'CSV' if it is a tab separated then use the extension 'TXT' .


Regards.

CSV is also good for tab separated  I just checked by a copy of BCS_EXAMPLE_7 and changing:         i_attachment_type    = 'CSV'                        "#EC NOTEXT

nabheetscn
Active Contributor
0 Kudos

Hi

Please check this program BCS_EXAMPLE_7 which has all the code and try to execute and check if you get same error when you this file

Nabheet

Former Member
0 Kudos

Hello Anand,

The Messae that you are getting while opening to the EXCEL, it is ok.

This same message you will get when you will download the table content from a table into a spreadsheet.

For e.g. go SE16 download the table VBAP entries using the download button.

Thanks

Gaurav

Former Member
0 Kudos

Hi,

did you check it in the system MS Office software ,

Former Member
0 Kudos

Hi,

The file might be in XLS format but the version of microsoft excel is different. The system on which you are opening the excel might have higher i.e latest version. So it's giving system message. But it will not harm the content of the excel sheet.

Regards,

Pravin    

0 Kudos

File format is governed by the specification and it does not depend on viewer/editor program version.