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_ATT_SEND_API1 issue

Former Member
0 Likes
569

Hi,

I have a problem related to email sending by SAP.

When I send an email by using SBWP. Then I execute the program RSCONN01. it process this email sucessfully (green status)

On the other hand, when I send a mail by SO_NEW_DOCUMENT_ATT_SEND_API1. Then I execute the program RSCONN01 and It doesn't process the email (remain in yellow status).

Anyone knows which could be the reason around this difference?

Thanks in advances

Regards

Leonardo

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
538

Are you sure you have the parameter COMMIT_WORK set to 'X' in the function call?

~Suresh

4 REPLIES 4
Read only

suresh_datti
Active Contributor
0 Likes
539

Are you sure you have the parameter COMMIT_WORK set to 'X' in the function call?

~Suresh

Read only

Former Member
0 Likes
538

Hi,

Try passing COMMIT_WORK = 'X' to the function module..

also check this link for a sample code..

You can also search in SDN with this function module...

Thanks

Naren

Read only

Former Member
0 Likes
538

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

DOCUMENT_DATA = W_DOC_DATA

PUT_IN_OUTBOX = 'X'

COMMIT_WORK = 'X'

IMPORTING

SENT_TO_ALL = W_SENT_ALL

  • NEW_OBJECT_ID =

TABLES

PACKING_LIST = IT_PACKING_LIST

CONTENTS_BIN = IT_ATTACHMENT

CONTENTS_TXT = IT_MESSAGE

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

RECEIVERS = IT_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

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WAIT UP TO 2 SECONDS.

SUBMIT RSCONN01 WITH MODE = 'INT'

WITH OUTPUT = 'X'

AND RETURN.

Regards

Ansumesh

Read only

Former Member
0 Likes
538

Hi,

make sure you are passing this parameter as 'X'.

COMMIT_WORK = 'X' .

Regards

Neha