Skip to Content
0
Former Member
Dec 28, 2007 at 08:08 AM

Message body - contains error for more than 255 characters

342 Views

Hello Experts,

I want to use multiple lines as the body of sending mail from my application.

for that i have used..following code....

DATA : t_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0 WITH HEADER LINE, "storing mail body

w_message TYPE string .

w_message = 'Sample mail for testing purpose line 1.

Sample mail for testing purpose line 2

Sample mail for testing purpose line 3

Sample mail for testing purpose line 4

Sample mail for testing purpose line 5

Sample mail for testing purpose line 6

Sample mail for testing purpose line 7

Sample mail for testing purpose line 8

Sample mail for testing purpose line 9

Sample mail for testing purpose line 10

Sample mail for testing purpose line 11

Sample mail for testing purpose line 12

Sample mail for testing purpose line 13

Sample mail for testing purpose line 14'.

APPEND w_message TO t_message.

..........................

..........................

DESCRIBE TABLE t_message LINES t_packing_list-body_num.

t_packing_list-doc_type = 'RAW'.

APPEND t_packing_list.

............................

............................

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = gd_doc_data

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = t_packing_list

contents_bin = t_attachment

contents_txt = t_message

receivers = t_receivers

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

But here i am gettting error of 255 max length.

Do u have any idea regarding this issue?

Regards,

nimesh