Application Development 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: 

Mail sending

Former Member
0 Kudos

Hi,

I have used 'SO_NEW_DOCUMENT_ATT_SEND_API1' fn module for mail sending with atachment.It is working fine.

The body of the email contains some text.

'asfdsfsd adfadsf asdfdsaf sdfdsfs xcvmnxbcvm yjhwkjdfhask

jhkjshj skjhkjdhfs'

<b>1)</b> In the body txt, i want a link and i want to bold some part of the text.

<b> 2) </b> I have used <a href="http://www.sdn.com">sdfadsfa</a>. It works fine from R/3.Our internet mails are going to Lotus notes and if i open the mail in lotus notes ...all the html tags are apprearing.How to achieve the same in lotus notes?

Advance thanks.

SAPUSER 100.

7 REPLIES 7

former_member184619
Active Contributor
0 Kudos

Hi,

Use the following in exporting parameters:-

DOCUMENT_TYPE = 'HTM'

Hope it helps.

Regards

-


Sachin Dhingra

former_member188685
Active Contributor
0 Kudos

Hi,

By default it will be RAW format.if you don't give any Document type.

so try to pass DOCUMENT_TYPE as 'HTM' in your importing parameter.

<b>DOCUMENT_TYPE = 'HTM'</b>

Regards

Vijay

0 Kudos

Hi,

I'm not using SO_NEW_DOCUMENT_SEND_API1.

There is no document_type parameter in <b>SO_NEW_DOCUMENT_ATT_SEND_API1 </b>. I have used this fn module as my mail contains attachment also.

Any idea?

Rgds,

SAPUSER 100

0 Kudos

hi,

Check the tables parameters <b>packing_list</b> , it will have <b>doc_type</b> parameter in FM SO_NEW_DOCUMENT_ATT_SEND_API1 .

check this link :

/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface

regards

appana

0 Kudos

call function 'SO_NEW_DOCUMENT_SEND_API1'

exporting

document_data = maildata

<b> document_type = 'HTM' </b>

put_in_outbox = 'X'

tables

object_header = mailtxt

object_content = mailtxt

receivers = mailrec

exceptions

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

operation_no_authorization = 4

parameter_error = 5

x_error = 6

enqueue_error = 7

others = 8.

if sy-subrc <> 0.* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. endif.endform.

Message was edited by: kishan negi

0 Kudos

Hi,

Sorry for cofusion.

If u r using SO_NEW_DOCUMENT_ATT_SEND_API1

then u can use DOC_TYPE field of table PACKING_LIST.

Append DOC_TYPE in PACKING_LIST.

Hope it helps.

Regards

-


Sachin Dhingra

Former Member
0 Kudos

Hai

Check the following Code

DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.

DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.

DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.

DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.

DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.

DATA: DOC_CHNG LIKE SODOCCHGI1.

DOC_CHNG-OBJ_NAME = 'TEST'.

DOC_CHNG-OBJ_DESCR = 'Test-Dokument fur API1 Test'(001).

OBJTXT = 'Mindestgebot : $250000'.

APPEND OBJTXT.

OBJTXT = 'Eine Abbildung des zur Versteigerung stehenden Bildes'.

APPEND OBJTXT.

OBJTXT = 'wurde als Anlage beigefugt.'.

APPEND OBJTXT.

DESCRIBE TABLE OBJTXT LINES TAB_LINES.

READ TABLE OBJTXT INDEX TAB_LINES.

DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).

  • * ERSTELLEN DES EINTRAGS ZUM KOMPRIMIERTEN DOKUMENT

CLEAR OBJPACK-TRANSF_BIN.

OBJPACK-HEAD_START = 1.

OBJPACK-HEAD_NUM = 0.

OBJPACK-BODY_START = 1.

OBJPACK-BODY_NUM = TAB_LINES.

OBJPACK-DOC_TYPE = 'RAW'.

APPEND OBJPACK.

  • * ERSTELLEN DER ANLAGE FUR DAS DOKUMENT

OBJBIN = '\O/ '. APPEND OBJBIN.

OBJBIN = ' '. APPEND OBJBIN.

OBJBIN = ' / \ '. APPEND OBJBIN.

DESCRIBE TABLE OBJBIN LINES TAB_LINES.

OBJHEAD = 'picasso.txt'. APPEND OBJHEAD.

  • * Erstellen des Eintrags zur komprimierten Anlage

OBJPACK-TRANSF_BIN = 'X'.

OBJPACK-HEAD_START = 1.

OBJPACK-HEAD_NUM = 1.

OBJPACK-BODY_START = 1.

OBJPACK-BODY_NUM = TAB_LINES.

OBJPACK-DOC_TYPE = 'TXT'.

OBJPACK-OBJ_NAME = 'ANLAGE'.

OBJPACK-OBJ_DESCR = 'Abbildung Objekt 138'.

OBJPACK-DOC_SIZE = TAB_LINES * 255.

APPEND OBJPACK.

  • * Fullen der Empfangerliste

RECLIST-RECEIVER = SY-UNAME.

RECLIST-REC_TYPE = 'B'.

APPEND RECLIST.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

DOCUMENT_DATA = DOC_CHNG

PUT_IN_OUTBOX = 'X'

document_type = 'HTM'

TABLES

PACKING_LIST = OBJPACK

OBJECT_HEADER = OBJHEAD

CONTENTS_BIN = OBJBIN

CONTENTS_TXT = OBJTXT

RECEIVERS = RECLIST

EXCEPTIONS

TOO_MANY_RECEIVERS = 1

DOCUMENT_NOT_SENT = 2

OPERATION_NO_AUTHORIZATION = 4

OTHERS = 99.

Regards

Sreeni