Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

receiving document not sent when send email via FM SO_NEW_DOCUMENT_SEND_API1

$
0
0

Hi Experts,

 

I am using the function module SO_NEW_DOCUMENT_SEND_API1 to send the information to the email

 

After executing, I have received exception like 'Document not sent'.

 

Note: while debugging at one stage receiver email IDs are taking only 12 characters length.

 

I thought this is the reason for the above exception.

 

Please correct me if i am wrong.

 

this is the sample code. Please check and help me how to correct this error.

 

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

  EXPORTING

    DOCUMENT_DATA              = LT_MAILSUBJECT

  TABLES

    OBJECT_CONTENT             = LT_MAILTXT

    RECEIVERS                  = LT_MAILRECIPIENTS

  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 EQ 0.

  COMMIT WORK.

*   Push mail out from SAP outbox

  SUBMIT RSCONN01 WITH MODE = 'INT' AND RETURN.

ENDIF.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>