Application Development and Automation 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: 
Read only

Function Module SO_OBJECT_SEND_API1

abdulazeez12
Active Contributor
0 Likes
961

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.

9 REPLIES 9
Read only

vinod_gunaware2
Active Contributor
0 Likes
937

Hi

Use below function

SO_NEW_DOCUMENT_ATT_SEND_API1 SAPoffice:

Send new document with attachments via RFC

regards

vinod

Read only

Former Member
0 Likes
937

Hi

Try FM

SO_NEW_DOCUMENT_ATT_SEND_API1

Regards,

Shashank

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
937
Read only

Former Member
0 Likes
937

Hi,

check this example...

http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html

regards

vijay

Read only

Former Member
0 Likes
937

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

Read only

Former Member
0 Likes
937

.

null

Read only

Former Member
0 Likes
937

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

Read only

0 Likes
937

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

Read only

0 Likes
937

Use CL_ABAP_CHAR_UTILITIES=>CR_LF or CL_ABAP_CHAR_UTILITIES=>NEWLINE instead of hard-coded values.