on 08-01-2014 2:29 PM
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
Avg Historical Sales = AVG ( wk4 to wk9)
Avg Consensus Forecast = AVG ( wk10 to wk15)
Tot. | Avg | % diff | ||||||||
Historical Sales | 10 | 5 | 9 | 13 | 33 | 7 | 77 | 12.83 | 69 | |
Consensus Forecast | 23 | 23 | 23 | 23 | 19 | 19 | 130 | 21.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 |
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.