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

SO_NEW_DOCUMENT_SEND_API

Former Member
0 Likes
784

Hi,

i use the Function SO_NEW_DOCUMENT_SEND_API to send Emails, but the emails have always the status 'waiting for communcation service'. The standard function to send emails works!!

I guess the system missed an entry in one of the import-tables?!

kr

Thorsten

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

After the sy-subrc check

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
      document_type              = 'RAW'
      document_data              = wa_doc_chng
      put_in_outbox              = 'X'
    TABLES
      object_content             = it_objcont[]
      receivers                  = it_recl[]
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      operation_no_authorization = 4
      OTHERS                     = 99.
  IF sy-subrc EQ 0.
    COMMIT WORK.  "use comit work or
   " you can use thi too
        SUBMIT rsconn01 WITH mode   = 'INT'
                      WITH output = 'X'
                      AND RETURN.
  ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
699

After the sy-subrc check

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
      document_type              = 'RAW'
      document_data              = wa_doc_chng
      put_in_outbox              = 'X'
    TABLES
      object_content             = it_objcont[]
      receivers                  = it_recl[]
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      operation_no_authorization = 4
      OTHERS                     = 99.
  IF sy-subrc EQ 0.
    COMMIT WORK.  "use comit work or
   " you can use thi too
        SUBMIT rsconn01 WITH mode   = 'INT'
                      WITH output = 'X'
                      AND RETURN.
  ENDIF.

Read only

vinod_vemuru2
Active Contributor
0 Likes
698

Hi,

Just add these 2 lines after calling mail sending FM. It will send the mail immediately.

SUBMIT rsconn01 USING SELECTION-SET 'INT' AND RETURN.

CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.

Thanks,

Vinod.

Read only

Former Member
0 Likes
698

Hi Thornsten.

I would like to suggest a reference,

[SDN - Reference for Message - Email status waiting|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Read only

Former Member
0 Likes
698

Hello,

Goto tcode SOST,

clear the queue except your message and click Execute.

Regards

Indu.

Read only

bpawanchand
Active Contributor
0 Likes
698

Hi

USe FM

SO_NEW_DOCUMENT_SEND_API1

Regards

Pavan