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

Alignment Problem in Email Attachment

Former Member
0 Likes
575

Hi,

I am using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send two text files as attachment. The FM is working fine and it is generating two files with correct data as attachments. The problem is in its alignment. The Text Files are displaying data with a new tab increase in every line, that goes in a slant manner. ( am unable to show the slant here).

Kindly help to get the data in the proper line format as below:

0 1 8 - 3 4 0 3 0 1 8 - 3 4 0 3

0 1 8 - 3 4 0 6 0 1 8 - 3 4 0 6

0 1 8 - U S 0 2 U S 0 1 S t o c k V a r i ance

Thanks,

Faisal

3 REPLIES 3
Read only

Former Member
0 Likes
495

Hi,

you doing any code page conversions before passing the data into the function module?

you passing the hexadecimal data or TXT data?

Regards,

Ajit.

Read only

0 Likes
495

Hi,

Am passing the internal table data to the objbin tble of FM. the attachments are required in TXT format so am givin the doc_type as TXT.

Thanks,

Faisal

Read only

Former Member
0 Likes
495

Paste your code snippet here.

I guess your system is unicode, so characters are each internally coded on 2 bytes ("A" is coded hex 4100 or 0041). SAP should convert it to UTF-8 ("A" becomes 41) to build the mail content, but for some reasons in your code, SAP do not convert them, so "ABC" is sent as 410042004300 for example, and when you display them, system thinks it's UTF-8, 41 is interpreted as "A", 00 is interpreted as a space, etc.

refer to the following thread.