cancel
Showing results for 
Search instead for 
Did you mean: 

DP - Alerts not creating properly in planning book

Former Member
0 Kudos

Hello Experts,


We are using SCM 7, need suggestion on Alert issue

There is SDP Alert “Actual Sales VS Consensus forecast” using macro.

- Macro is calculating  Avg. values for  Consensus forecast & Historical Sales based on 6 weeks.

And then passing these avg. values to SDP alert

  1. e.g. if Current week is WK10,

Avg Historical Sales = AVG ( wk4 to wk9)

Avg Consensus Forecast = AVG ( wk10 to wk15)


Tot.Avg% diff
Historical Sales        105913337 7712.8369
Consensus Forecast 232323231919 13021.67




In Alert monitor we can see below Details

Actual Value

Target Value

%

21.67

12.83

12.83

69

But we expect

Actual Value

Target Value

%

12.83

21.67

21.67

69

  1. i.e. System should show Actual value =Avg Historical value  & Target Value = Consensus fcst

macro steps are :-


Macros in the Macro Book

     Alerts :Actual Sales vs Cons Fcst Weekly

     Set Auxiliary Values : ( 1 Iterations : W 31.2014; W 31.2014 )

       Row: Forecast Average ( Frm  W 31.2014 ) =

         AVG(

         Area:  [ $Consensus Forecast (  W 31.2014 ) ; $Consensus Forecast (  W 36.2014 ) ]

         )

       Row: History Average ( Frm  W 31.2014 ) =

         AVG(

         Area:  [ $Historical Sales (  W 25.2014 ) ; $Historical Sales (  W 30.2014 ) ]

         )

     Main Step : ( 1 Iterations : W 31.2014; W 31.2014 )

       Add : Actual Sales vs Consensus forecast weekly [ Actual Sales versus Consensus forecast ]

         Row: Forecast Average ( Frm  W 31.2014 )

         Row: History Average ( Frm  W 31.2014 )


We have checked and found that


- Internal Table  AM_ALERT:- These Avg. values are passed  to Standard Alert Table AM_ALERT in the sequence – 1st Consensus forecast( Key_fig1) and then Historical Sales( Key_fig2)  

So, The 1st parameter given in the alert definition will ALWAYS be the KEYFIGURE1 in the alert, which will be the Actual value.  The 2nd value given in the alert definition will ALWAYS be the

KEYFIGURE2 in the alert, which will be the Target value


We debugged this program :-


In method READ_SDP_ALERTS, class /SAPAPO/CL_AMOALRT_SD

System is calculating Variance = ABS( ( KEYFIGURE1 - KEYFIGURE2 ) / KEYFIGURE2 * 100 ).

In SAP system variance is based on KEYFIGURE2 not based on KEYFIGURE1

If we swap values ( 1st History & then Fcst ) before passing values to table then  column will look ok in Alert view but % variance will be wrong.

We tried changing steps in macro,  .ie 1st passing history value and then consensus fcst

By doing this we are getting avg values in correct column in alert monitor

Actual value =Avg Historical value  & Target Value = Consensus fcst but % is wrong based on above logic.


Can anyone please suggest on this.


Regards

Madhu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Experts...its bit urgent..please suggest asap.

please note :- table didn't get copied correctly in original post above, corrected table is as below

Actual Value

Target Value

%

21.67

12.83

69

But we expect

Actual Value

Target Value

%

12.83

21.67

69

thanks

Madhu