2014 Nov 27 3:54 PM
Hi experts,
I am using SO_NEW_DOCUMENT_SEND_API1 to send mails from SAP.
The FM is working fine, but the mails are sent in a private mode.
How can i do to send them in a standard mode. Here my code:
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
* OBJECT_HEADER = packing_list
OBJECT_CONTENT = TB_TEXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
LOOP AT RECLIST.
IF RECLIST-RECEIVER = SPACE.
NAME = RECLIST-REC_ID.
ELSE.
NAME = RECLIST-RECEIVER.
ENDIF.
IF RECLIST-RETRN_CODE = 0.
WRITE: / NAME, ': succesfully sent'.
ELSE.
WRITE: / NAME, ': error occured'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'Too many receivers specified !'.
WHEN 2.
WRITE: / 'No receiver got the document !'.
WHEN 4.
WRITE: / 'Missing send authority !'.
WHEN OTHERS.
WRITE: / 'Unexpected error occurred !'.
ENDCASE.
ENDIF.
Thanks.
Amine
2014 Nov 27 3:58 PM
If i add a line like this into my code:
DOC_DATA-SENSITIVTY = 'O'.
Is that sufficient? or do i need to modify something in the system settings?
Thanks.
Amine
2014 Nov 27 4:28 PM
2014 Nov 27 4:34 PM