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

using so_new_document_send_api1 ?

Former Member
0 Likes
1,176

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

6 REPLIES 6
Read only

Former Member
0 Likes
811

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

Read only

vinod_vemuru2
Active Contributor
0 Likes
811

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

Read only

Former Member
0 Likes
811

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.

Read only

0 Likes
811

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

Read only

0 Likes
811

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.

Read only

0 Likes
811

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