cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch run heuristic (location) event in macro

Former Member
0 Kudos

Dear all,

I have to write a macro in a SNP planning book.

This macro have to run only when just finished run heuristic (location). But in SAP, there are only 4 event default, level change, start, exit.

Is there any event or variant to know when running heuristic (location) or not?

Please help me to solve this problem.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

rajkj
Active Contributor
0 Kudos

Hi,

Macros can't be triggered by external events unless you customize your APO system. However, you can have minor process changes to meet your requirement. For instance,

Interactive Planning:

  • Execute the location heuristics from the data view manually
  • Upon completion of the heuristics run, trigger the required macro manually.

Background Processing:

You may use any sophisticated scheduler that supports SAP background job execution, or process chains, or SM36 to run background jobs.

  • Execute program /SAPAPO/RSNPDRP1 (i.e. t.code /SAPAPO/SNP01 executing SNP heuristics in background) with appropriate variant
  • Execute  program /SAPAPO/TS_BATCH_RUN (i.e. program to run the macros in background) with appropriate background job (use t.codes /SAPAPO/MC8T and /SAPAPO/MC8D).

Thanks,
Rajesh

Answers (0)