‎2008 May 20 11:09 AM
hi there,
i am using FM so_new_document_send_api1 for sending emails from z-abap.
is there any possibility that i can send the email IMMEDIATELY ?
now it is getting into the queue (in SCOT). there we have a job running every
5 minutes which sends the emails.
but for this case i need it directly after call of so_new_document_send_api1.
any ideas ?
b.regards, Martin
‎2008 May 20 11:19 AM
Hi Martin,
In the Standard FM 'SO_NEW_DOCUMENT_SEND_API1' , we have a RECEIVERS parameter, in the TABLES tab. Here, the RECEIVER parameter is of the type of the STRUCTURE SOMLRECI1, which has a flag EXPRESS need to be set in order to send the mail immediately.
Hope this is helpful to you. If you need further information, revert back.
Reward all the helpful answers.
Regards
Nagaraj T
‎2008 May 20 11:36 AM
Hi Martin,
Put this piece of code after calling this FM.(Bold one)
Call function so_new_document_send_api1
.
.
.
.
.
.
IF sy-subrc IS INITIAL.
Send mail immediately
SUBMIT rsconn01 USING SELECTION-SET 'INT' AND
RETURN.
CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.
ELSE.
MESSAGE i123 WITH 'Mail sending failed.'
ENDIF.
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on May 20, 2008 4:08 PM
‎2008 May 20 11:37 AM
I think the external mails, the background job will send the mail. We can't do anything from the coding side.You need to contact with the BASIS team to reshedule the background job.
‎2008 May 20 11:40 AM
i AM the 'basic team' myself.
i don't want to change the scheduling of the job ! i have to send it right AFTER the fm-call.
you gave me 3 solutions now ! 1) using 'express' (this will work ??????) 2) submit the job in the abap
3) reschedule.
well, what is best now ?
reg, Martin
‎2008 May 20 11:47 AM
Hi Martin,
we have used this submitting report in many of the objects and in none of the objects we have issues. As soon as u run the object mail will go. Also i dont think there is any disadvantages with this approach. So u can proceed with adding this 2 lines of code which u urself can do without the need of abaper if u have developer access.
Thanks,
Vinod.
‎2008 May 20 12:44 PM
oh my god ! thats a very very very bad solution
now i have sent about 500 emails from TESTSYSTEM to many users, even to the general director !
in testenv. we don't have scheduled the job, as it would not be good to send messages out from testsystem, they should stay there in scot as unsent !
b. reg, Martin