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.
Showing results for 
Search instead for 
Did you mean: 

Send External mail with Attchment from SAP

0 Kudos

Hi All,


We have developed a function module which converts the internal table data into Excel Format and sends it as an attachment to External Mail.

ISSUE : But our issue is we are unable to open that document using GOOGLE DOCS as well as in MOBILES(IPHONE) also.

Could any one help me how to do this.


Active Participant
0 Kudos


What function module did you use to convert internal table data into Excel Format ?

I suppose the issue is in getting the a properly formatted Excel document that you could open with 3rd Party tools like Google Docs and on Mobile phones. Alternatively, you could create .csv(comma separated value) files which can be read even with a text processor.

You might find this helpful:



0 Kudos

Hi Vimal

Thank you very much for your Suggestions .

The link you have provided is to download the internal table data into excel sheet.

But my requirement is to convert the internal table data into Excel sheet and send that excel sheet as an attachment to external mail.


1. Converting the internal table data into excel sheet.

2. Don't want to download the excel sheet.

3. Just need to send the excels sheet as an attachment to the external mail form SAP.

To attach the excel sheet to mail we need the excel sheet data in binary format.

Please find the following link to my code reference and please guide me achieve this scenario.


Thank you,


Former Member
0 Kudos

can you check in ur sap inbox 'SBWP' whether u could able to open that excel file.

Former Member
0 Kudos

Hi Harsha,

first you need to cancatenate all your internal table data to a string 'gc_string' of type string seperated by Horizontal tab . Then use the below method to convert your code to binary format.

       data:gt_binary_content TYPE solix_tab. 
* convert final string gc_string into binary format
               iv_string  = gc_string       " your final string
               iv_codepage = '4103'
               iv_add_bom  = 'x'
               et_solix    = gt_binary_content ).
      CATCH cx_bcs.
          MESSAGE e024.

pass this gt_binary_content as an excel attachment. check the excel attachment in SOST tcode.


Karuna N

Former Member
0 Kudos

Source: Google docs support forum:


        Google Docs size limits

Docs you create and files you upload have some limits built in.

Documents: 1,024,000 characters, regardless of the number of pages or font size. Uploaded document files that are converted to Google documents format canu2019t be larger than 2MB.

Spreadsheets: 400,000 cells, with a maximum of 256 columns per sheet. Uploaded spreadsheet files that are converted to Google spreadsheets format canu2019t be larger than 20MB, and need to be under 400,000 cells and 256 columns per sheet.
More information about spreadsheet size limits

If you're close to exceeding size limits, you'll see a message at the top of your spreadsheet that indicates which limit you're about to reach:

    Number of Cells: Total of 400,000 cells across all sheets
    Number of Columns: 256 columns per sheet
    Number of Formulas: 40,000 cells containing formulas
    Number of Tabs: 200 sheets per workbook
    GoogleFinance formulas: 1,000 GoogleFinance formulas
    GoogleLookup formulas: 1,000 GoogleLookup formulas
    ImportRange formulas: 50 cross-workbook reference formulas
    ImportData, ImportHtml, ImportFeed, or ImportXml formulas: 50 functions for external data
    Complexity: VLOOKUP and HLOOKUP formulas tend to be more complex than other functions, and may slow down your spreadsheet. After getting data points through VLOOKUP and HLOOKUP, try re-pasting them as "values only" to reduce spreadsheet size

These size limits also affect the spreadsheets that collect form responses (for example, if you send a survey). To determine the number of responses that a form can take, you need to take into account the number of questions in your form and the number of other cells of data in your spreadsheet 

are all these requirements met ? and does your excel file open up normally via MS-Excel ?

Former Member
0 Kudos


I have the same issue as you had with .XLS file not being viewed on smartphones.

Can you please provide with the solution as well if you can provide your complete code that will help.

Thanks in Advance.