Skip to Content

Original of article taken from my personal blog site at oprsteny.com

Here I’d like to present my solution of a problem in APO planning books where it was necessary to load multiple products and locations at the same time into the planning view and execute some Default macros on all of them. The requirement was to execute the macro always only per ONE product/location. This was not possible because the planning data was aggregated on material and/or location level.

Therefore I have to modify the macros in macro editor (/SAPAPO/ADVM) so at first they DRILL_DOWN on material level, then on location level and then the computation macro itself is executed.

Macro “Drill down to Material level”

The basic idea is: IF ( AGG_LEVEL( ‘9AMATNR’ ) = 1 ) DRILL_DOWN( ‘9AMATNR’ ; ‘internal’ )

APO_MACRO_DRILL_DOWN_01.png

Macro “Drill down to Location level”

The basic idea is the same as for material : IF ( AGG_LEVEL( ‘9ALOCNO’ ) = 1 ) DRILL_DOWN( ‘9ALOCNO’ ; ‘internal’ )

APO_MACRO_DRILL_DOWN_02.png

Collective macro “Multiple: Calculation”

The collective macro executes the “sub-macros” in the list sequentially:

  1. Drill down to Material level
  2. Drill down to Location level
  3. Computation macro

APO_MACRO_DRILL_DOWN_03.png

Planning book output

In the planning book (/SAPAPO/SDP94) it’s now visible that each key figure row is split into several rows:

  • Total value (calculated automatically)
  • 1st product/location value (calculated by our macro)
  • 2nd product/location value (calculated by our macro)

APO_MACRO_DRILL_DOWN_04.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply