cancel
Showing results for 
Search instead for 
Did you mean: 

Macros for Calculating Demand at higher aggregation levels

Former Member
0 Kudos

Our users are asking for the ability to add forecast values at higher levels, specifically the navigational attributes.

Our current POS or characteristic combinations are:

0COUNTRY Country

0SALESORG Sales organization

ZFCSTGRP Forecast Group

ZFCST_RDC Forecast RDC

ZMATNR Material Number

We also have navigational attributes for the ZMATNR (material number):

ZMATNR__ZPC_BUS Business Unit

ZMATNR__ZPH_CATGY Category

ZMATNR__ZPH_MKGPD Marketing Product

ZMATNR__ZPRICEPNT Price Group

Right now we have macros that calculate demand by adding three key figures. In order to get the correct disaggregation for the users to be able to add demand at the higher navigational attribute levels, I need to add drill downs through the macros. Depending upon which level you are entering forecast, you need to have specific drill downs.

I am having trouble trying to determine the best way to do this. How I have it now is checking for the level of the current selection but it does not seem to be working perfectly. Can you see something that is wrong here? I read all the documentation for the AGG_LEVEL and DET_LEVEL functions and cannot seem to see what is wrong.

DMD 1 - Check for at Business Unit Lvl

Quit if not at Bus Unit Lvl : ( 1 Iterations : P 02/2006; P 02/2006 )

IF

Not at Business Unit Level - Cat

AGG_LEVEL( 'ZMATNR__ZPH_CATGY' ) = 0

Information [ Only enter demand at Bus Unit Level ]

Error [ Changes Not Saved ]

ELSEIF

Not at Business Unit Level - PC

AGG_LEVEL( 'ZMATNR__ZPH_MKGPD' ) = 0

Information [ Only enter demand at Bus Unit Level ]

Error [ Changes Not Saved ]

ELSEIF

Not at Business Unit Level - Mat

AGG_LEVEL( 'ZMATNR' ) = 0

Information [ Only enter demand at Bus Unit Level ]

Error [ Changes Not Saved ]

ELSEIF

Not at Business Unit Level - RDC

AGG_LEVEL( 'ZFCST_RDC' ) = 0

Information [ Only enter demand at Bus Unit Level ]

Error [ Changes Not Saved ]

ELSEIF

Not at Business Unit Level - FGrp

AGG_LEVEL( 'ZFCSTGRP' ) = 0

Information [ Only enter demand at Bus Unit Level ]

Error [ Changes Not Saved ]

ENDIF

What happens is the macro will either execute no matter what is pulled up, ignoring the macro code above or I will get an error saying "Invalid Data Status" in an information box and then the macro will not execute at all.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Figured this out on my own.