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

Error in triggerring Mail

Former Member
0 Likes
716

Hello All,

I got a requirement wherein i have to covert a program output to spool and from spool i should convert that into a PDF attachment and trigger a mail to Outlook...

I could do the above one everything is going fine, right spoolid i chosen and the data is compressed and packed in right way

But when i try to trigger that as mail using FM SO_DOCUMENT_SEND_API1..

I am getting error as DOCUMENT_NOT_SENT My NEW_OBJECT_ID in FM SO_DOCUMENT_SEND_API1 is blank will it make FM SX_SEND_DISPATCHER to fail?? Hence results in no mail triggering ...

To find out the problem i have even checked SCOT and SOST transaction, But no log was found....

Also i made a background schedule of my program and saw the results in SM37 Here also i could not see any error and i could see my desired output..

I have even enabled PUT_IN_OUTBOX as 'X' and COMMIT_WORK as 'X'.....

My coding is as follows:

CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = LA_DOC "W_DOC_DATA

PUT_IN_OUTBOX = 'X'

COMMIT_WORK = 'X'

IMPORTING

NEW_OBJECT_ID = OBJID

TABLES

PACKING_LIST = IT_PACKING_LIST

OBJECT_HEADER = HEADLIST

CONTENTS_BIN = IT_ATTACHMENT

CONTENTS_TXT = IT_MAILBODY[]

RECEIVERS = T_RECEIVERS[]

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.

Waiting for your replies.....

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
660

How is RECEIVERS populated ?

Check the field communication type, Read the documentation of fm.

6 REPLIES 6
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
661

How is RECEIVERS populated ?

Check the field communication type, Read the documentation of fm.

Read only

0 Likes
660

Hi,

There are only three options enabled for the comm_type

SAPoffice internal

TELFAX Fax

TELEX Telex

Should i have to use "SAPoffice internal" for the mail to be triggered??

Kindly, suggest me what can be done...

Waiting for repiles...

Read only

0 Likes
660

Hi,

There are only three options enabled for the comm_type

SAPoffice internal

TELFAX Fax

TELEX Telex

Should i have to use "SAPoffice internal" for the mail to be triggered??

Kindly, suggest me what can be done...

Waiting for repiles...

Read only

0 Likes
660

How is receivers populated, please paste the code part.

Read only

0 Likes
660

Hi,

Got the desired output...

The mistake what i did was that i was getting the receiver type from a ztable [where i am going to maintain all my customer's

emails.]in this case the receiver type was coming blank from the ztable itself.

Thank you...

Read only

Former Member
0 Likes
660

You check the Thomas Jung's blog he can explain very well how to Receiving E-Mail and processing it with ABAP

and also how to Configuration and how to write code for receiving e-mail.