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

Sending email in update task

Former Member
0 Likes
2,020

Hi gurus.

I've faced one problem with sending emails.

I need to do this in user-exit in stansart SAP-Transaktion that is called in "Update Task" mode.

Therefore it's not permitted to use SUBMIT statement, so I am not able to "SUBMIT RSCONN01" after sending mails with FM 'SO_DOCUMENT_SEND_API1'. The one way is to schedule the job with RSCONN01 to execute for example every minute, but it's not very nice. May be anybody know the FM-analogue of the Report RSCONN01? Or the way to send the queue of mails without submitting RSCONN01?

Thank for your help

Hi gurus.

I've faced one problem with sending emails.

I need to do this in user-exit in stansart SAP-Transaktion that is called in "Update Task" mode.

Therefore it's not permitted to use SUBMIT statement, so I am not able to "SUBMIT RSCONN01" after sending mails with FM 'SO_DOCUMENT_SEND_API1'. The one way is to schedule the job with RSCONN01 to execute for example every minute, but it's not very nice. May be anybody know the FM-analogue of the Report RSCONN01? Or the way to send the queue of mails without submitting RSCONN01?

Thank for your help

6 REPLIES 6
Read only

Former Member
0 Likes
1,334

Hi,

Talk to basis and ask them to set up the time to trigger the email functionality every one minute.

Otherwise, you have to go to SCOT and triggere them manually.

Regards,

Subramanian

Read only

Former Member
0 Likes
1,334

Hi,

In such cases, you may not need to submit the RSCONN01 program.

Did you try using the FM without the submit statement?

Regards,

ravi

Read only

Former Member
0 Likes
1,334

I tryed to pass COMMIT_WORK = 'X' parameter to FM, but that also leed to error.

Read only

former_member194669
Active Contributor
0 Likes
1,334

Instead of using SO_DOCUMENT_SEND_API1 try to use class CL_BCS



data: send_request       type ref to cl_bcs.

send_request->set_send_immediately( 'X' ).

please check the example program BCS_TEST13.

Read only

Former Member
0 Likes
1,334

hi

Create the RFC Function module with Email Code And cal function in below Way.

    DATA:

              g_taskname      TYPE num8 VALUE '00000001',

              g_group         TYPE rzllitab-classname VALUE ' '.

CALL FUNCTION 'Z*Function mdule'

      STARTING NEW TASK g_taskname

      DESTINATION IN GROUP g_group

      TABLES

        object_content        = e_message

      EXCEPTIONS

        communication_failure = 1

        system_failure        = 2

        resource_failure      = 3.

    IF sy-subrc NE 0.

      CLEAR sy-subrc.

    ENDIF.

Thanks,

satish

Read only

matt
Active Contributor
0 Likes
1,334

Why have you answered a question that's 6 years old? Anyway, just in case someone searches and find this, the correct answer is "Use CL_BCS and associated classes to send email".

Thread locked against further responses.