02-20-2012 11:40 AM
Hi All,
OUR REQUIREMENT: We need to send EXTERNAL MAIL with ATTACHMENT(Excel) form SAP .
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.
02-20-2012 11:51 AM
Harsha,
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:
http://wiki.sdn.sap.com/wiki/display/ABAP/DownloadinginternaltablestoExcel
Thanks,
Vimal.
02-20-2012 1:17 PM
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.
REQUIREMENT
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.
[http://sapsamplepro.blogspot.in/2012/02/excel-sheet-send-mail.html]
Thank you,
Harsha
02-20-2012 1:41 PM
can you check in ur sap inbox 'SBWP' whether u could able to open that excel file.
02-21-2012 3:35 AM
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.
TRY.
data:gt_binary_content TYPE solix_tab.
* convert final string gc_string into binary format
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = gc_string " your final string
iv_codepage = '4103'
iv_add_bom = 'x'
IMPORTING
et_solix = gt_binary_content ).
CATCH cx_bcs.
MESSAGE e024.
ENDTRY.
pass this gt_binary_content as an excel attachment. check the excel attachment in SOST tcode.
Regards,
Karuna N
02-20-2012 11:55 AM
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 ?
07-19-2013 7:11 PM
Harsha,
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.
AW
07-19-2013 10:55 PM
hi,
Please got through this link
http://www.slashsap.com/2011/08/send-mail-with-formatted-excel-sheet.html
and this one
http://www.an-sap-consultant.com/2010/12/abap-sending-email-with-pdf-attachment.html
With regards,
Prakash.S