cancel
Showing results for 
Search instead for 
Did you mean: 

APO DP - validation of correct forecast profile

Former Member
0 Kudos

We are using APO DP V5.0.

In interactive DP, we forecast at the level of 'product at customer'. For the 'product at customer' characteristic we have navigation attributes, such as 'history type' (eg EPOS, despatch)

The 'history type' determines which key figure we use as history, and so we have forecast profiles which are relevant for the different history types.

If a user assigns a forecast profile in interactive DP to a 'product at customer', we want to get the system to check that the forecast profile is actually valid for the relevant 'history type'. We have named the profiles carefully so that, for example, the first x characters of the profile name reflect the history type; so we could have validation logic saying 'if history type = EPOS, check that forecast profile starts with 'EPOS'.

But how could this validation logic be triggered?

Any ideas?

Thanks,

Bob Austin, Atos Origin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bob,

Technically having different history key figs mandates so many # univariate profiles. The univariate profiles can then be assigned to master profile in the master profile itself, during execution of forecast in interactive mode. but not in background as the master profile needs to be speicified with a unique univariate profile.

Alternative is you need multiple forcast profiles and want to execute all of them at one go, then you need to use a BADI -/SAPAPO/SDP_FCST2- multiple forecsat profile maintenance. This will excute forecasts basis mutiple history key figure and generate multiple forecasts at the same time.- both in foreground and background if this addresses your need. Actually SAP shd have made this available as a part of standard config. for many practical reasons for a planner to arrive at a demand plan basis multiple univariate profiles (=so many history key figures) in one go and some macro can be used to arrive at some good stat plan,

Thanks

Loknath

Former Member
0 Kudos

Hi Bob,

Wow, what a brain bender!

I think this would require some fairly serious ABAP...

You can't get the value of an attribute interactively (via a macro function, for example using ACT_IOBJNM_VALUE()). You would need a Function Module that could manipulate the Planning Object Structure to grab the attribute of the characteristic in question, based on the current selection.

The name of the forecast profile also can't be done with a standard APO macro function. We had something similar where we wanted to get the name of the forecast strategy via a macro function, but we ended up needing to create a short Function Module in ABAP that could called as a User Exit Macro. The trick with the Function Module is that you will need is to tell the system to get the GUID of the current selection, then use that to find the name of the Forecast Profile (field PRPFL) from the /SAPAPO/DP_FCST2 table.

Once you have that, you could tell the Function Module to pass just the first four letters ('EPOS') back to the planning book user exit macro so that you could then compare that with the attribute value.

Probably you didn't need me to write this short functional spec, but it was a very interesting problem to consider. Hopefully somebody else will read this and tell us a much simpler way to do it.

Dan

Former Member
0 Kudos

Ho Bob, Dan,

Actually I think you can get the navigation attribute with the ACT_IOBJNM_VALUE() in APO5.

Just use the parameter "CHARACTERISTIC_ATTRIBUTES" in the same way it appears in the POS.

However I don't see for the forecast profile... except the user exit as Dan suggested.

Dan, could you check the navigation attributes thing i tell me if I dream it?

Thanks and Regards

Julien

ZoltanMBiro
Advisor
Advisor
0 Kudos

Hi,

As far as I know there is a BADI called /SAPAPO/SDP_FCST5 which has a method SEL_CHANGE.

This should be used when one wants to change the selection before assigning the forecsat profile to the selection.

Maybe you could just check inside this BADI method that the navigation attribute is the same as the prefix of the profile name. Of course since the forecast profile is not included in the parameter of the method you have to export it to memory in a user exit that is called before.

If the profile does not match the navigation attribute just remove the whole selection.

I don't know whether it will work but worth a try.

Regards,

Zoltan.