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

Problem on SO_NEW_DOCUMENT_ATT_SEND_API1 delay.

Former Member
0 Likes
1,260

hi expert.

I have big problem with method SO_NEW_DOCUMENT_ATT_SEND_API1.

when i send email in my program with SO_NEW_DOCUMENT_ATT_SEND_API1 i have delay???

what is for?how can i solve it?

best regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,041

Hi ,

First check the FM- If commit is marked as 'X'.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

     EXPORTING

       document_data              = doc_data

       put_in_outbox              = 'X'

       commit_work                = 'X'

Second:

If the emails are appearing in SOST ,code is working fine .Contact BASIS team for config and JOB scheduled to send ot out .

Third :

We can call the same report to send the email immemdiately in your code itself.


SUBMIT  rsconn01 WITH mode = 'INT'

         WITH output = 'X' AND RETURN.

Fourth :

Instead of the rsconn01 ,We can use class /methods to send the email immediatley :


DATA: send_request TYPE REF TO cl_bcs.

* set send immediately flag
send_request->set_send_immediately( 'X' ).

Thanks!

5 REPLIES 5
Read only

FredericGirod
Active Contributor
0 Likes
1,041

Hi,

what did you mean with delay ? 

Please use the CL_BCS Oo to send email.

regards

Fred

Read only

former_member213851
Active Contributor
0 Likes
1,041

Hi Maryam,

I think you need to change the TCODE SCOT configuration and  need to check the frequency of SCOT job . you can check it in sm37  search the SCOT job and check the job details.You can correct the job frequency as per the requirement.

Regards,

Sachin

Read only

Former Member
0 Likes
1,041

Hi,

The problem may not be with the FM SO_NEW_DOCUMENT_ATT_SEND_APL1. Please check the job schedule that sends out the mails to external IDs. Possible that interval between successive job executions is more.

Hope this helps,

~Athreya

Read only

Former Member
0 Likes
1,041

Hi Marian,

There is no  possibility  of delay in the Function module you have mentioned above because that is a standard function module which is globally used to send mails.

First what you need to do is:

1.Execute the report.confirm that report is executed.

2.Then go to SOST transaction and see is there any mail is been in queue with the mail id of yours.

Then click on the highlighted button and click ok.

you will receive a mail.

The delay is because of the job scheduled to send mail.

Revert incase of any queries.

Thanks,

Dinesh.

Read only

Former Member
0 Likes
1,042

Hi ,

First check the FM- If commit is marked as 'X'.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

     EXPORTING

       document_data              = doc_data

       put_in_outbox              = 'X'

       commit_work                = 'X'

Second:

If the emails are appearing in SOST ,code is working fine .Contact BASIS team for config and JOB scheduled to send ot out .

Third :

We can call the same report to send the email immemdiately in your code itself.


SUBMIT  rsconn01 WITH mode = 'INT'

         WITH output = 'X' AND RETURN.

Fourth :

Instead of the rsconn01 ,We can use class /methods to send the email immediatley :


DATA: send_request TYPE REF TO cl_bcs.

* set send immediately flag
send_request->set_send_immediately( 'X' ).

Thanks!