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

APO - SNP Alert Macros running too slow

Hi,

We have created alert macros which run for next 27 weeks for 38000 Product-Location Combinations. They are running too slow.

We are deleting alerts externally using program /sapapo/amon_reorg and then running this macro with "ADD" . This macro slows down once it starts filling up alert table with 100,000 records. What are the best practices for writing the macro so that it runs fast ?.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Jun 01, 2007 at 05:24 AM

    Assuming you are executing this alert macros as a background job, see if you can create a separate data view containing only the relevant keyfigures (those required in the macro computation) and the relevant time horizon (only 27 weeks - no additional future buckets).

    That should improve the performance of the job. But if you are seeing slowdown of macro performance after filling up /SAPAPO/AM_ALERT table - you can check with your BASIS consultant to finetune the table parameters (not sure what all).

    Thanks,

    Somnath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2007 at 07:15 AM

    Is it necessary to write all the alerts? What I mean is, do you filter the results when you view them through the Alert Monitor?

    If your alert profile has a minimum threshold set for an alert type, then you can read this threshold in the macro and only write alerts that fall below the threshold.

    e.g.

    Step: Get Threshold Values : ( 1 Iterations :Initial;Initial )

    Action Box: Get Threshold Value

    LAYOUTVARIABLE_SET( 'Alert_Thresh' ;

    ALERT_PROFILE_THRESH( SDP_ALERT_PROFILE' ; '4100' ; 'I' ) )

    Where SDP_ALERT_PROFILE is the profile that contain sthe minimum threshold you want to use and 4100 is the alert type. The I is for information, can use either W for Warning or E for Error as well.

    Then use the variable Alert_Thresh to check if your value falls below this, only then write the alert.

    Regards

    Ian

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      What I meant was, if you filter the writing of alerts the performance increases as most of the time is taken writing to the database in the macro. So the less writes you perform the faster the macro executes.

      Regards

      Ian

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2007 at 05:23 AM

    Ketan

    Is it necessary to run the Alerts for all the 27buckets. Am not sure of your business procecess or the kind of alerts(if you have a leadtime of procurement of 27weeks then yhes it makes sense to get an alert for the 28th week )

    but I would use alerts only for the nearby buckets. Again if you have a frozen horizon of 4weeks there is no point generating alerts for stock shortage for the 2nd week.

    Are these Dynamic or DB alerts?

    Are these notes run in interactive planning or in the background?

    here is a note(if you ahve not seen it before) that might help you

    521639 - Generation of DB Alerts in Background

    there is a a whole host of related notes in the bottom of that note

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2007 at 05:24 AM

    and one more

    500063 - Overview of performance notes for the Alert Monitor

    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.