cancel
Showing results for 
Search instead for 
Did you mean: 

APO DP macros - how to invoke a forecast from a macro

Former Member
0 Kudos

I am using APO DP V5.

Ideally I would like to have a macro which:

- performs some calculations

- runs a forecast using a defined profile

- performs some further calculations

Does anyone have any ideas about how to do this?

Thanks,

Bob Austin, Atos Origin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Bob,

It seems that your main question is you want macro to run the forecast with the desired profile. This is possible, please find below the answer.

  • Performs some calculations

- For this you need to be clear on what kind of calculations you require. You must be aware of the different calculations can be made with macro.

  • Runs a forecast using a defined profile

- For this you can use the macro as shown below to release the forecast.

(Macro)FORECAST_PROFILE_SET(): Forecast Profile (Step) input : ( 1 Iterations :INITIAL;INITIAL )

(Actionbox)set profile

(Op/Fun)LAYOUTVARIABLE_SET( 'X' ;

(Op/Fun)CHAR_VALUES_INPUT 'need_forecast_profile_name' ;

(Op/Fun)'PROFILE:'

(Op/Fun) )

(Op/Fun) )

(Step) operate : ( 1 Iterations :INITIAL;INITIAL )

(Actionbox)get profile

(Op/Fun)

FORECAST_PROFILE_SET( LAYOUTVARIABLE( 'X' ) ;

(Op/Fun) 'S' ;

(Op/Fun) ACT_VERSION

(Op/Fun) )

  • Performs some further calculations

- Again same please give more input on the type of calculations you require.

Hope this answer is helpful to you.

Prafulla

Answers (1)

Answers (1)

srinivas_krishnamoorthy
Active Contributor
0 Kudos

You can try the REPORT_SUBMIT() macro function that can invoke a background job. the job needs to be pre-configured with appriopriate settings to make sure the univariate forecast is called. (using prog /sapapo/ts_batch_run)

Or try with a user exit macro.