Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with SO_DOCUMENT_SEND_API1 while Sending Mail to External System

Hi Friends,

Iam using the FunctionModule SO_DOCUMENT_SEND_API1 in my BSP Application to send mail to external system. It was working fine for some days but now it gives an error. It is raising an exception X_ERROR.

So, I tried to execute the FM SO_DOCUMENT_SEND_API1 itself and it also gives the same error.i.e., it gives an exception X_ERROR with sy-subrc = 6.

The parameters I have given are...

CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = W_DOC_DATA

PUT_IN_OUTBOX = 'X'

SENDER_ADDRESS = SENDERMAILID

SENDER_ADDRESS_TYPE = 'SMTP'

COMMIT_WORK = 'X'

IMPORTING

SENT_TO_ALL = W_SENT_ALL

TABLES

PACKING_LIST = T_PACKING_LIST

  • contents_bin = t_attachment

CONTENTS_TXT = IT_MESSAGE

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.

<b>where</b>

W_DOC_DATA-DOC_SIZE = 1.

W_DOC_DATA-OBJ_LANGU = SY-LANGU.

W_DOC_DATA-OBJ_NAME = 'SAPRPT'.

W_DOC_DATA-OBJ_DESCR = 'Hello'.

W_DOC_DATA-SENSITIVTY = 'F'.

WA_T_PACKING_LIST-TRANSF_BIN = SPACE.

WA_T_PACKING_LIST-HEAD_START = 1.

WA_T_PACKING_LIST-HEAD_NUM = 0.

WA_T_PACKING_LIST-BODY_START = 1.

DESCRIBE TABLE IT_MESSAGE LINES WA_T_PACKING_LIST-BODY_NUM.

WA_T_PACKING_LIST-DOC_TYPE = 'RAW'.

APPEND WA_T_PACKING_LIST TO T_PACKING_LIST.

WA_T_RECEIVERS-RECEIVER = WA_ITAB1.

WA_T_RECEIVERS-REC_TYPE = 'U'.

WA_T_RECEIVERS-COM_TYPE = 'INT'.

WA_T_RECEIVERS-NOTIF_DEL = 'X'.

WA_T_RECEIVERS-NOTIF_NDEL = 'X'.

APPEND WA_T_RECEIVERS TO T_RECEIVERS.

here WA_ITAB1 contains the receiver MailIds.

So, what could be the reason for the error...How to solve that...

Any sort of help will be appreciated...

Regards,

Raju...

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question