Skip to Content

Sending of email triggered in a background job ends with error.

Hello all,

I have created a API which triggers mail to a distribution list using class CL_BCS. When i execute this API in foreground it works fine and the mails are triggered.

However i am calling this API in a report which will scheduled as a background job in my application and this job executes for some 5 to 6 hours and after that i trigger the mail. However at this point the job gets cancelled due to an abort message raised in

one of the CL_BCS methods.

The method is cl_cam_address_bcs=>create_internet_address which is called in my API and internally this calls many other methods. The abort meessage is thrown from the method instantiate_imp_class of class CL_EXIT_MASTER.

The ST22 log reads like this:

Runtime Errors: LOAD_SWITCHSTATES_MISMATCH

Short text: Current switch statuses are incompatible with program switch statuses.

What happened?

The current switch statuses that are read for the execution of the

program "CL_IM_CVI_ADDRESS_UPD_IMPL====CP" are incompatible with the switch

statuses with which the

program "CL_IM_CVI_ADDRESS_UPD_IMPL====CP" was generated at the time

20090902114544.

Any advice would be greatly helpful.

Warm Regards,

Naveen M

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 03, 2012 at 02:52 PM

    Hi Naveen,

    I'm facing the same issue. Do you know how you resolved this issue back then?

    Any help is appreciated !

    Many thanks,

    Ashish.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 08:30 PM

    Hi!

    How you determine sender (method set_sender) ? if you use current user, when it runs on background use a backgorund user and it maybe can not determine an email.

    Try force a sender (harcode your user for test when sy-batch eq 'X')

    If it works, you need to determine the user to be used on jobs to solve this problem.

    I hope it helps 😀

    Regards!!!!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.