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

Function Module SO_DOCUMENT_SEND_API1

Former Member
0 Likes
2,411

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,336

Hi..

Have u check these fields ?

put_in_outbox = 'X'

commit_work = 'X'

Read only

0 Likes
1,336

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.

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,336

Hi Ramya,

Try using the FMs SO_OBJECT_SEND(2005 release) or

SO_NEW_DOCUMENT_ATT_SEND_API1.

Thanks,

Vinod.

Read only

0 Likes
1,336

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

Read only

Former Member
0 Likes
1,336

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.

Read only

Former Member
0 Likes
1,336

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.

Read only

Former Member
0 Likes
1,336

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.