Application Development 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: 

Problem with the function module

Former Member
0 Kudos

Hi All,

Iam facing a problem with the function module 'SO_NEW_DOCUMENT_SEND_API1' it is giving as sy-subrc eq 2 can any one face the same problem.

Regards

Warun

8 REPLIES 8

Former Member
0 Kudos

Hi,

Make sure that you have an email address in SU01 specified for the sending user.

Darren

Former Member
0 Kudos

Hi Darren Barton,

Can you please tell me where exactly the email se up will be there in SU01 . Right now I am there in SU01 with my userid.

Regards

Warun

Former Member
0 Kudos

Hi All,

Can yu please tell me where the Email user setting will be there in SU01 tcode

0 Kudos

On the Address TAB, under the commuination section there is a field called email.

Darren

Former Member
0 Kudos

Hi,

You can get.Please debug where the sy-subrc becomes 2 and check accordingly if input given is correct.

Thanks.

Former Member
0 Kudos

what error it is throwing

can u tell me

Former Member
0 Kudos

Hi ,

Iam using the following code

WA_MAILDATA-obj_descr = IS_BACKMON-Message_Subject.

*Collect the mailid and reciver type to send an email

WA_RECEIVER-receiver = 'Emailid'.

WA_RECEIVER-rec_type = 'U'.

WA_RECEIVER-com_type = 'INT'.

APPEND WA_RECEIVER to i_RECEIVER.

*Display the context of the message

is_contents_txt = IS_BACKMON-Message_Body.

APPEND is_contents_txt to i_contents_txt.

clear is_contents_txt.

*Send an Email to a Particular person

call function 'SO_NEW_DOCUMENT_SEND_API1'

exporting

document_data = WA_MAILDATA

  • document_type = 'HTM'

put_in_outbox = c_flag

commit_work = c_flag

tables

  • object_header = I_MESSAGE

OBJECT_CONTENT = i_contents_txt

receivers = i_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.

if sy-subrc eq 0.

*Submit after the function module is successful

SUBMIT rsconn01 WITH mode = c_int

WITH output = ' '

AND RETURN.

Former Member
0 Kudos

It is giving as Document not send..