Skip to Content
avatar image
Former Member

Problem with the function module

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Oct 03, 2008 at 09:52 AM

    Hi,

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

    Darren

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 03, 2008 at 09:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 03, 2008 at 10:22 AM

    Hi All,

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 03, 2008 at 10:32 AM

    Hi,

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

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 03, 2008 at 10:36 AM

    what error it is throwing

    can u tell me

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 03, 2008 at 10:39 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 03, 2008 at 10:41 AM

    It is giving as Document not send..

    Add comment
    10|10000 characters needed characters exceeded