‎2016 Sep 21 11:28 AM
Hi Team,
How to set send immediate option in function module SO_DOCUMENT_SEND_API1, to send mail immediately without waiting in SOST.
Thanks.
‎2016 Sep 21 11:38 AM
I hope Some Configuration At SOST, Basis people has to do the Work.
‎2016 Sep 21 11:48 AM
The email is not sent immediately but collected, and send as per the Period set by BASIS in SCOT configuration.
Ex. as attached..
Either SOST transaction has to be used to release them, or you can call RSCONN01 program.
Do this after calling the FM 'SO_NEW_DOCUMENT_SEND_API1'
SUBMIT rsconn01 USING SELECTION-SET 'INT' AND RETURN.
You can use class CL_BCS to send emails and the method allows an immediate send without affecting other emails in the queue.
CALL METHOD LR_SEND_REQUEST->SET_SEND_IMMEDIATELY
EXPORTING
I_SEND_IMMEDIATELY = 'X'.
-Satya
‎2016 Sep 21 12:53 PM
Hi Satya,
Thanks for your reply, please let me know how to use
CALL METHOD LR_SEND_REQUEST->SET_SEND_IMMEDIATELY
EXPORTING
I_SEND_IMMEDIATELY = 'X'.
after calling function module SO_NEW_DOCUMENT_SEND_API1.
Thanks.
‎2016 Sep 21 1:52 PM
Thats in case you are using CL_BCS to send email.
Instead you can use below code after calling function module SO_NEW_DOCUMENT_SEND_API1.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = ''
AND RETURN.
-Satya
‎2016 Sep 21 12:40 PM
Hi,
Why not use CL_BCS class for sending the mail. Its simple to use and there are n no of posts out there in SCN on this.
Sample below
TRY.
* Pass the document to send request
lo_send_request->set_document( lo_document ).
"Create recipient
lo_recipient = cl_cam_address_bcs=>create_internet_address( p_email ).
**Set recipient
lo_send_request->add_recipient( lo_recipient ).
* Send email
lo_send_request->SET_SEND_IMMEDIATELY('X').
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
IF lv_sent_to_all IS INITIAL.
MESSAGE i500(sbcoms) WITH lv_send.
ELSE.
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
‎2016 Sep 21 12:54 PM
Hi Gaurav,
Thanks for your reply, please let me know how to use
CALL METHOD LR_SEND_REQUEST->SET_SEND_IMMEDIATELY
EXPORTING
I_SEND_IMMEDIATELY = 'X'.
after calling function module SO_NEW_DOCUMENT_SEND_API1.
Thanks.