‎2008 Mar 20 11:19 AM
Hi,
I used the FM SO_DOCUMENT_SEND_API1 for sending an email. The email is not sent and the value of sy-subrc is 6. It says database inconsistency or internal error. Can you please explain about this error in detail ?
All the fields in the FM is getting populated with correct data.
Before calling the FM value of sy-subrc is 0.
Thanks in advance
‎2008 Mar 20 11:23 AM
Hi..
Have u check these fields ?
put_in_outbox = 'X'
commit_work = 'X'
‎2008 Mar 20 11:26 AM
Yes... I have done that...
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = E_DOC_CHNG
PUT_IN_OUTBOX = C_X
SENDER_ADDRESS = C_SENDER
SENDER_ADDRESS_TYPE = C_INT
COMMIT_WORK = C_X
TABLES
PACKING_LIST = I_STNH_OBJPACK
OBJECT_HEADER = I_STNH_OBJHEAD
CONTENTS_BIN = I_STNH_OBJBIN
CONTENTS_TXT = I_MESSAGE
RECEIVERS = I_STNH_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.
‎2008 Mar 20 12:05 PM
Hi Ramya,
Try using the FMs SO_OBJECT_SEND(2005 release) or
SO_NEW_DOCUMENT_ATT_SEND_API1.
Thanks,
Vinod.
‎2008 Mar 20 12:30 PM
Hi Vinod,
The code was working fine for the past few days.. But it isn't working now, without making any changes to the program or code...
‎2008 Apr 28 9:19 AM
Hi,
Could you please help me to replace the code
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = it_info_txt
document_type = 'RAW'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_content = t_text_msg_content
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.
with SO_DOCUMENT_SEND_API1 w.r.t. the parameters used.
Regards,
Binay.
‎2008 Apr 28 1:31 PM
Hi,
What is your Sender address? Is it more than 40 characters long? If yes check the table entries of ADR6. You enter your email address in SMTP_SRCH and check the entries. If this is the case then your sender address should be less than or equal to 40 characters.
Thanks,
Shravan G.
‎2008 Apr 28 2:15 PM
Hi Ramya,
you have to declare the data like this
DATA: RECIPIENT_INT LIKE SADRUD.
DATA: L_TAB_RECEIVER like SOMLRECI1 occurs 0 with header line,
and populate the receiver like this
l_tab_receiver-receiver = RECIPIENT_INT.
and then append it.
function module: CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = L_DOCUMENT_DATA
DOCUMENT_TYPE = 'RAW'
PUT_IN_OUTBOX = ' '
COMMIT_WORK = ' '
IMPORTING
SENT_TO_ALL = SENT_TO_ALL
NEW_OBJECT_ID =
TABLES
OBJECT_HEADER =
OBJECT_CONTENT = OBJCONT
RECEIVERS = L_TAB_RECEIVER
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
.
thanks,
reward if helpful.