on 03-17-2009 10:35 AM
Hello Experts,
In R/3 coding I have Internal Table data available for which i have to generate an Alert mail with Excel file attachment.
This is the scenario of Proxy sender to Mail Receiver. but I don't know how to convert the Internal Table data into Alert mail excel File attachment.
Please suggest me.
Regards,
Jagesh
easiest wud be to use an xslt mapping - /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As suggested you need to use XSLT jst to format the output in the excel sheet. Alternately you can just concat all the fields from the source and map it to the content, however you excel will not be formatted in row,column format instead all the fields will occur in a same cell. So use the XSLT mapping to have a formatted output.
Thanks,
SaNv...
Hi Santhosh,
Thanks for your suggestion.
But without using XSLT mapping also, I have generated the Excel File attachment.
Throgh R/3 coding I am passing following.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-FROM = From Mail Address.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-TO = TO Mail Address.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-SUBJECT = 'Test Alert mail'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-DATE = SY-DATUM.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_TYPE = 'text/plain;name="CSV_data.csv"'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT = 'Testing1,Testing2,Testing3'.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_DISPOSITION = 'attachment'.
And in the Mail Receiver Adapter i have configured as following.
Use Mail package and Keep Attachment both options are selectd.
So I am getting the data in different columns in the excel file But How to set the Next ROW in Excel file?
I thnk i am missing something in CONTENT value.
Regards
Jagesh
Hi Santhosh,
I tried as following in Coding:-
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT = 'Cell 1.1,Cell 1.2,nl,Cell 2.1'.
I Wanted Text Cell 2.1 in the next row of the Excel file but i am getting output as following.
Cell 1.1 Cell 1.2 nl Cell 2.1
All 4 Text in same row with 4 columns.
Please suggest me the proper Line Break character to be use in this case..
Regards,
Jagesh
Dear Santhosh,
Finally I have got the solution for inserting the Line Break in attached Excel file without using the XSLT mapping.
In the R3 coding I have done as shown below.
concatenate Field1.1 ',' Field1.2 ',' CL_ABAP_CHAR_UTILITIES=>NEWLINE into String1
concatenate String1 Field2.1 ',' Field2.2 ',' CL_ABAP_CHAR_UTILITIES=>NEWLINE into String1.
Finally I assined the String1 to Content.
Content Type = 'application/vnd.ms-excel;name=TestFile.CSV'
Now In excel it is showing like.
Field1.1 Field1.2
Field2.1 Field2.2
So I am closing this Thread now.
Regards,
Jagesh
Check...might help
/people/community.user/blog/2006/09/07/email-reporting
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.