CM01 - Capacity Planning

Before proceeding, you might want to refer SAP GUI Scripting API documentation.

This topic describes the SAP GUI Scripting process for CM01 transaction. We download the details for Capacity Planning in a text file. This kind of transaction recording and playback is not possible with the regular (RFC based) Transaction record, map, and run method.

To record and run CM01 transaction

  1. To record the Process file, perform the following steps:
    1. Select File > New Process > New GUI Script or select GUI Script (GX) available on the left side of the New Process window.
    2. Enter the Transaction code CM01 in the Transaction Code box.
    3. Select More..., go to Advanced Record Options in Options window, select VB Script in Script Language, and click OK.
    4. Select Start Recording. The Magnitude Connector for SAP window is displayed. Perform the following steps:
      1. Select the SAP system, select Logon, and enter the information for Client, User, Password, and Language.
      2. Click Yes to confirm and start a new SAP GUI session. You might not get this warning and the Magnitude Connector for SAP window maybe behind the SAP Logon Pad. This behavior is dependent on how scripting warnings are configured in your SAP GUI.
  2. To configure the additional settings for SAP GUI Scripting, perform the following steps:
    1. In the Capacity Planning: Selection window, enter * for Work center, 3000 for Plant and select Standard Overview. The Capacity Planning: Standard Overview window corresponding to the values you enter is displayed.
    2. To save this report to a local file, select System > List > Save > Local File.
    3. Leave the format of the file to unconverted.
    4. Enter the values in the Directory and File Name boxes to indicate where you want to save the file.
    5. When SAP completes downloading the data, select Stop Recording in Process Runner, and select OK. Process Runner generates an .isf file (Innowera Script File).
    6. Select OK. Process Runner opens the Process file as [CM01| *NEW*] with the Mapper tab opened.
  3. To instruct Process Runner to generate the file name dynamically, because this example utilizes dynamically generated file name, and therefore mapping is required for the file name field only, perform the following steps:
    1. Go to the Mapper tab, select Advanced View. A detailed view of the mapper is displayed.
    2. Set Mapping Type of file Name (Description) to System Value, and in the System Values window, enter the name of file, right-click the text box and select Month - ##MM, Day - ##DD, Year - ##YY.

      The Mapper tab is updated with the changes.

  4. To save the Process file, select FileSaveSave As Local. The file is saved with the current date and time included in the file name. Optionally, you can change the file name and save it.
  5. To run the file, select Run. The number of bytes transferred is displayed in the log column and a text file with the name CapacityPlanningDownload_11-21-07.txt is generated in the path that is displayed in the Excel file.