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

SO_NEW_DOCUMENT_SEND_API1

former_member184495
Active Contributor
0 Likes
1,225

Hi,

am using the <b>SO_NEW_DOCUMENT_SEND_API1</b> where i am sending an HTML format with obj_type = 'HTM'.

i tested it in DEV, its working fine, it sends my Messages in HTML format.

transported it to QAS, tested in QAS, now instead of message in HTML format its sending me an attachment.

Summary :

1) In DEV it sends my HTML, but appends a system text &SO_FORMAT=ASC at the end.

So how can i remove this system text and

2) In QAS it doesnt send anything but an empty attachment.

Aditya.

11 REPLIES 11
Read only

Former Member
0 Likes
1,117

Hi Aditya,

could you please paste the code for us to review and comment on it..

Thanks

Rakesh

Read only

0 Likes
1,117

hi Rakesh,

following is the code.

-


loop at idlient.

mailrec-receiver = idlient-member_adr.

mailrec-rec_type = 'U'.

append mailrec.

endloop.

mailtxt = '<html>'.

append mailtxt.

mailtxt = '<meta http-equiv="Content-Type" content="text/html;'.

append mailtxt.

mailtxt = 'charset=utf-16">'.

append mailtxt.

mailtxt = '<p><font color="#FF0000">'.

append mailtxt.

mailtxt = 'Please do not reply to this message!...</font>'.

append mailtxt.

mailtxt = '<font color="#0000FF">'.

append mailtxt.

mailtxt = 'THIS IS CONFIRMATION OF RECEIPT OF YOUR COMPLAINT'.

append mailtxt.

mailtxt = '</font></p>'.

append mailtxt.

mailtxt = '<p>If you need to discuss your situation immediately, '.

append mailtxt.

mailtxt = 'you may contact our Quality Manager directly at : </p>'.

append mailtxt.

mailtxt = '110-009-4966<br>'.

append mailtxt.

append mailtxt.

mailtxt = '<img src="http://www.xyz.com/folder/logo.bmp"'.

append mailtxt.

mailtxt = '</html>'.

append mailtxt.

-


i tried the mailtxt = 'charset=utf-16">' part using charset=1852-1

Aditya

Read only

0 Likes
1,117

hi Rakesh,

following is the code.

-


loop at idlient.

mailrec-receiver = idlient-member_adr.

mailrec-rec_type = 'U'.

append mailrec.

endloop.

mailtxt = '<html>'.

append mailtxt.

mailtxt = '<meta http-equiv="Content-Type"

content="text/html;'.

append mailtxt.

mailtxt = 'charset=1852-1">'.

append mailtxt.

mailtxt = 'Please do not reply to this message!...'.

append mailtxt.

mailtxt = '<If you need to discuss your situation immediately, '.

append mailtxt.

mailtxt = 'you may contact our

Quality Manager directly at : >'.

append mailtxt.

mailtxt = '110-009-4966<br>'.

append mailtxt.

mailtxt = '</html>'.

append mailtxt.

-


i tried the mailtxt = 'charset=utf-16">' part using charset=1852-1

well basically i am writing all my HTML text in the HTML Tag format and storing in mailtxt,

passing this to my FM.

Aditya.

Read only

0 Likes
1,117

hi aditya,

Can u plz tell me how can i send an email with an attachment??

I have ALV report i need to send this ALV report as an attachment.

Read only

former_member184495
Active Contributor
0 Likes
1,117

selfanswered

Read only

0 Likes
1,117

Hello.

Could you tell us how you solved the &SO_FORMAT=ASC problem?

Thanks

Kevin

Read only

0 Likes
1,117

hi Aditya,

using the FM SO_NEW_DOCUMENT_SEND_API1 to send an email in html format but in the end of the email content it is desplaying '&so_format = ASC'.

you mentioned here self answered. i am also facing the same problem could you please help me out to resolve the issue.

Thanks in advance.

send your solution to this email id <REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Mar 19, 2008 5:14 PM

Read only

0 Likes
1,117

Hi Aditya,

could u pls let me know the solution to the problem.

I am facing the same problem.

I am using the doc_type as RAW

Thanks in Advance.

Read only

0 Likes
1,117

Hi,

i have the same problem, any suggestions to resolve that ?

Read only

0 Likes
1,117

I found the solution to the problem with the added text "&SO_FORMAT=ASC" etc. In the examples found elsewhere in this forum, the same table structure was passed to both object header and contents, like this:

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
      document_data              = maildata
      document_type              = 'HTM'
      put_in_outbox              = 'X'
    TABLES
      object_header              = mailtxt
      object_content             = mailtxt
      receivers                  = mailrec

To remove tha trailing text, assign a different table to "object_header" instead, in my case I just left it empty (unassigned):

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
      document_data              = maildata
      document_type              = 'HTM'
      put_in_outbox              = 'X'
    TABLES
      object_header              = mailhdr
      object_content             = mailtxt
      receivers                  = mailrec

This takes care of the problem.

Read only

0 Likes
1,117

Thanks Almgren! You solved my problem. Somebody should award you points for this.

Regards,

KKR