‎2006 Mar 08 12:22 PM
Hello All,
I am using the Function Module to send an attachment to an email ID. In the program, I have used one internal table which is passed as a table type parameter contents_bin for this Function module. The program is running fine and also sending the attachment to the email ID. But, when the attached file in the email is opened, the data is in a straight line format(all lines concatenated as one line) instead of line-by-line. Can anyone help me out of this? I want my attachment to go in the format of internal table that i have used.
Thanks in advance.
Abdul Azeez.
‎2006 Mar 08 12:27 PM
Hi
Use below function
SO_NEW_DOCUMENT_ATT_SEND_API1 SAPoffice:
Send new document with attachments via RFC
regards
vinod
‎2006 Mar 08 12:34 PM
‎2006 Mar 08 12:35 PM
Hi,
Check these links for sample code and kindly reward points by clicking the star on the left of reply,if it helps.
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
‎2006 Mar 08 12:38 PM
‎2007 Jan 19 11:16 PM
Hi,
That's the same problem which I faced the other day. I tried different ways and below is the one which looks good so far.
It is weired that you are going to use Carriage Return/Line Feed with Internal Table but this is what I experienced.
Define HEX value of Carriage Return/Line Feed and concatenate it at the end of each row of your internal table. See below:
CONSTANTS c_crlf2(2) TYPE x VALUE '0D0A'. "return & line feed
It will give you proper Alignment.
If it works, quote points.
Thanks
Message was edited by:
Burhan
‎2007 Jan 19 11:19 PM
‎2007 Jan 27 2:49 AM
HI,
Declare a data like:
data: cr(2) type x value '0D'. [ it is zero D ].
Concatenate each line of the internal table with this field .
Regards
Subramanian
‎2007 Jan 29 5:25 PM
Hi,
It didn't works with me.
This is what I tried before but if you have multi language system, for example; EN and FR and if you used only carriage return "0D", it is working good in EN and when you logon to other language, the last two lines are overlapped.
That's why I used both carriage return and line feed (0D0X) so that we have aligned data but extra blank line after each data line.
Thanks,
Burhan
‎2007 Jan 29 6:26 PM
Use CL_ABAP_CHAR_UTILITIES=>CR_LF or CL_ABAP_CHAR_UTILITIES=>NEWLINE instead of hard-coded values.