Here are some examples of different macros with different functions used in SAP APO.
Macro - Set Background Color of a Cell
Macro - Set Foreground Color of a Cell
Macro - Detailed Level Planning
Macro - Copy Stock to Time Series Key Figure
Macro - Copy "B" KF to "A" KF by Selecting Columns
Open and Close Key Figure With Macro
Macro - Value From Product Master in Planning Book
Will keep on adding more examples.