cancel
Showing results for 
Search instead for 
Did you mean: 

APO DP macro question - how to identify specific history and fcst periods

Former Member
0 Kudos

I am using APO DP V5.

I need to be able to identify in my macros the 'first period' of the future, and the 'most recent period' of history.

What is the best approach for this?

Thanks,

Bob.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Group APO,

Do you need to identify the first period and most recent period because you are limiting the execution of your macro to those periods? If yes, then you don't really need to "detect" those periods. You can simply configure the horizon of the macro so that i executes in those periods only Can you explain what you are trying to do?

Former Member
0 Kudos

Emmanuel,

Thanks for your reply.

I want to execute a particular piece of logic just for the most recent period of history. So I was thinking of having a step which applies to history and works 'backwards', ie from most recent period backwards.

Regards,

Bob.

Former Member
0 Kudos

Hi Group APO,

In this case, you can configure the macro step to simply execute within the relevant history periods. You can set the process area to be "User Defined", then select the current most recent history period, iteration = 1 (you are just interested in the most recent history period right? If not, just change it to the number you need). You can set the processing direction to be "In Past" so the iteration works backwards.

Hope this helps.

Answers (1)

Answers (1)

srinivas_krishnamoorthy
Active Contributor
0 Kudos

You should be able to achieve this with a combination of Date functions such as MONTH(TODAY) or WEEK(TODAY) as the case may be.

Usually if you select the specific period through a macro (using date fields) it becomes a rolling/relative period, in which case you dont require date functions.