Hello experts,
I am facing a requirement to generate an email on Usage Decision of user. I chose to do this using user exit: QEVA0010 and
Function Module: SO_NEW_DOCUMENT_SEND_API1. It works perfectly in my Dev system but when I transported the code to QAS, the FM started generating X_ERROR exception. I read that it is not advisable to to commit from within a user so I followed the below steps from:
SO_NEW_DOCUMENT_SEND_API1 not working | SCN
Again, this works perfectly fine in my dev landscape but raises the exception in my QAS. The system seems to be configured to send emails as a previously user exit implemented in CS02 is generating an email. I would be very grateful if you could guide me in the right direction as I have been stuck with this problem for quite some time now.
This is the call to SO_NEW_DOCUMENT_SEND_API1 within my z_fm:
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = MAILDATA
DOCUMENT_TYPE = 'RAW'
"PUT_IN_OUTBOX = 'X'
"COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
OBJECT_HEADER = MAILTXT1
OBJECT_CONTENT = MAILTXT
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
RECEIVERS = RECLIST
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