The macro workbench is a tool for administrating macro books and individual macros. It enables you to quickly find macro books and perform the functions described in the Features section. You program the macros themselves in the MacroBuilder.
Schematic View of the Macro Workbench Screen
The macro workbench consists primarily of two work areas: The tool area that contains buttons with which you can start various functions, and the macro book area where the macro books are displayed. If necessary, separate screens are opened in which the individual macros of a macro book are displayed. You can display the contents of two macro books simultaneously.
The macro book area is the center of the function. Here, you select macro books with which you want to work, and you then perform the following activities:
● Export the macros
● Start the MacroBuilder
● Display the macros in the macro books(s)
● Display the coding
● Change the grouping of the macro books(s)
● Generate (activate) all the macros in a macro book
● Start semantic checking for the macro books (see Semantic Check for Macros)
● Delete macro books
● Transport macro books to another system
You can also call up a where-used list without selecting a macro book (see below).
You use macro groups to restrict your selections in the macro workbench. You can select macro books either manually or by using filter and sort functions.
You use this function to find macros books and individual macros that contain the following:
● A particular key figure
● A particular macro function
● A particular macro element (alert/status, process message, or document)
The system first displays the macro books in which the object is used. If you then display the macros in the macro book, the macros in which the object is used are marked with .
In general, to carry out a function on a macro book, you select the macro book in the macro book window and then select the relevant button in the application toolbar or use the context menu.
You can display the macros contained in a macro book. To do so, you select the macro book and choose in the application toolbar. A list of the available macros appears with columns that show if the macro has a note (), or is a standard macro. If the latter is the case, the relevant icon and the position of the standard macro are displayed within the planning book. This can be important if several standard macros are executed one after the other.
To copy one or more macros from one macro book to another, do the following:
1. Select the source macro book and display the macros. The macro book appears in the lower window.
2. Select the target macro book and choose Display second macro book from the context menu. The macro book appears in the lower right-hand window.
Alternatively, you can select both the source and the target macro book in the macro book window and then choose from the toolbar. Both windows are opened together.
3. In the source book, you select the macros to be copied. Choose or the requisite entry in the context menu. The macros are copied to the clipboard.
4. In the target book, choose or the requisite entry in the context menu. The macros are copied to the target book.
When macros are copied, they are in deactivated status. This is intentional. Before you activate the macros, check that all the key figures exist in the planning book and that compatible periods are used.
Similarly, you can move macros from one macro book to another. You open the two macro screens as described above and use drag and drop to move one or more macros from one macro book to another. As above, the macros are deactivated when they are moved.
You can create notes for individual macros. You use notes to briefly explain the usage of a macro and to provide users with other useful information. You can start the function from the macro screen by using the context menu. An editor appears in which you can edit a text or import unformatted text (*.txt) from a file. When you have finished, choose to save your changes. Choose to return to the macro workbench. A icon beside a macro indicates that the macro has an attached note.
You can start the MacroBuilder in a variety of ways.
From the macro book screen area:
● Choose from the application toolbar.
● Double-click the macro book anywhere except for the Changed by column.
● Choose Start MacroBuilder from the context menu.
From the macro screen area:
● Choose from the application toolbar at the top of the screen area.
● Choose Start MacroBuilder from the context menu.
Do not select a macro book.
Choose Where-used list from the toolbar. A dialog box appears. You now select the indicator next to the required option. An input help is available for each option (the Copy fr. field) in which you choose available objects.
For instance, if you want to see the macro books in which the FIX_CALC() function is used, you select the Macro function indicator and choose FIX_CALC() from the input help. When you click FIX_CALC, the function is automatically transferred to the upper line. You can now add text (for example, an argument) for the function.
When you choose , the system finds the macro books that are currently in the macro book work area and that contain the search object. If you now open the macro book and display the macros in the macro workbench, the macros that contain the search object are flagged with a instead of a traffic light. If you then open the MacroBuilder, these macros are also copied automatically in the processing area.
To return to the previous display in the macro book work area, choose .
You can add macro books to a transport request so that they are transported to the target system(s) when the request is released. When you transport a macro book, the system exports relevant notes directly to the target system. For this, you must specify the relevant RFC destination.
To be able to use macro books in another system, you need to have already exported other objects such as the relevant planning object structures and planning areas to the target system. You do this in Customizing for Demand Planning or Supply Network Planning under Basic Settings ® Maintain Manual Transport Link for DP/SNP. You can also use this activity to transport macro books. If the planning area does not exist in the target system, you can transport the macro book, but you cannot open the macro book or use the macros.
To transport a macro book, select the book and choose Tools ® Transport Macro Books. On the dialog box that appears, enter an existing transport request or create new one. The transport request determines the system to which the macro book is transported. Choose .
This function uses an RFC connection to copy the macros for selected macro books to an existing macro book in another SAP SCM system. You must have previously made the necessary RFC settings for the target system. For more information, see Maintaining Remote Destinations.
If you want to export macros, select one or more macro books and choose Tools ® Export Macros. On the dialog box that appears, enter the RFC connection and the target macro book.
The functions Transporting Macro Book and Exporting Macros are intended primarily for system administrators. You require the necessary authorizations to execute them.