Skip to Content
author's profile photo Former Member
Former Member

Email Trigger after error

Hi,

I created an abap program to calculate the size of a file and raise an error if it was not within a certain threshold size. I use the program in a process chain and upon an error, I have it send an email. The problem is, that the email is only sent when I check the log to see how the process chain ended, it comes out with the dialog, "Status Change of Process ABAP1 ZD_FILE_SIZE_CHK, Save Status and Trigger Events if Appropriate". Only if I say Yes to that message, does it send the email. I want it to automatically send it without me having to check the log.

Is that possible? By the way, I had to create my own Process Chain type for an ABAP program because the original ABAP Program process chain did not have a success or fail completion statuses, it only had a completion status.

Thanks,

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 04:53 PM

    Hi Angel,

    try to have a look 176492 oss note.

    It could be useful for this issue. I didn't applied it yet but I will as soon as possible because the only way to send mail automatically is via the CCMS.

    I'll let you know.

    Regards

    Matteo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 08:36 AM

    Hi Angel,

    You can create a "success" or "failure" message for each process in the Process Chain. Right click on the process and select "Create message" option. Hope it works.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 09:34 AM

    Hi all,

    I have built a process chain which, after loading, should sent a mail message if the loading was correct or not.

    After the process loading I have built two messages for both cases.

    If the process loading is correct the mail is sent but I have some problem when the process is not correct.

    If there is some problem and the loading program gives an error the mail is not sent (for example I tried to deactivate the update rules, to change data source without replicate, to stop the process from SM50).

    In all these cases the mail has been sent ONLY if I entered in RSPC,check the process chain and the system asked me if I wanted to trigger the event after the error. Otherwise the mail was not sent.

    The only case I found the system automatically sends an email has been when I insert in the start routine of the update rules the field "ABORT = 8".

    I tried, also, to go to the CCMS Agent and complete the

    alerts of process chain but the mail wasn't be sent. I tried moreover to run the SAP_CCMS_MONI_BATCH_DP job as described in the 708480 note but unsuccessfully. The only way to send the mail is by

    refreshing the PC manually. Have you any idea to do this automatically?

    Thanks in advance

    Matteo Ferrari

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      This is the same problem I am having, if it goes through successfully, it emails, but when it is not correct, it doesn't email because it is waiting for you to check the logs so that it could trigger the after events. Must be a glitch in the trigger processing for failing processes.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 02:34 PM

    Hi Angel,

    Then there might be a problem where your Basis Admin needs to change the settings in SOST for "internet" mails. For now you can try whether the mails get triggered for SAP inbox.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hmm, I believe the problem is more on the Process Chain side, because if the process fails, and I go into the log and select yes when it asks the question, "Status Change of Process ABAP1 ZD_FILE_SIZE_CHK, Save Status and Trigger Events if Appropriate", it does send the email. It's just that I don't want to have to check the logs when it fails to send an email, I want it to send an email upon failure, without me having to click yes to the Trigger Events if Appropriate.

      The email doesn't even get to be placed on the queue, since the trigger never executes it. And SOST doesn't even recognize it.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2005 at 05:54 AM

    Hi!

    The message "Status Change of Process ABAP1 ZD_FILE_SIZE_CHK, Save Status and Trigger Events if Appropriate" only occurs if the process had aborted.

    Please make sure that your custom abap program works fine

    in isolation with the chain. I hope you have implemented the method ' ~get_status ' which returns the current status of the process back to the chain.

    Best Regards,

    Poornima

    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.