Skip to main content

Record and Run GUI Scripting File

To use GUI Scripting technology in Process Runner, SAP scripting must be installed and should be enabled. To check if GUI Scripting is enabled, perform the following steps:

  1. Open the SAP Logon Pad and select the system on which you want to perform this check. Note that no logon information is required for this system.
  2. Select Options in the SAP GUI.
  3. Check if Script Recording and Playback is available.

  4. If the option is grayed out, perform the following steps:
    • Install and enable GUI scripting. For information, see How to enable scripting in SAP.
    • Place a request to enable this option. This option is normally set by the SAP BASIS administrator.

This section contains the following topics:

CM01 - Capacity Planning

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 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 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.

MM41 - Enter Multiple Units of Measure

This topic describes how to use vertical scrolling in Process Runner.Inserting multiple rowsof data into table using standard transaction usually requires the use of toolbar options such as 'Page-Down' or 'Create New Items' to automate entering each line item. However, when we encounter an SAP transaction that does not provide these toolbar options, we are limited by standard transaction recording. You can use the vertical scrolling of GUI Scripting for the insertion of multiple units of measure during the creation of retail material using the MM41 transaction code.

Note: This transaction can be created only in GUI Scripting in Process Runner.

To record and run MM41 transaction,

  1. To create the Process file, perform the following steps:
    1. Select File > New Process > New Transaction or select Transaction (TX) available on the left side of the New Process window. The New Process window appears.
    2. Enter the transaction code MM41 in the Transaction Code box.
    3. Select Start Recording. The Connector for SAP window appears. Perform the following steps:
      1. Select the SAP system, select Logon, and enter the information for Client, User, Password, and Language.

      2. Select OK. Process Runner displays a progress bar to indicate that the recording is in progress.
  2. In the SAP GUI, perform the following steps:
    1. Enter the data and select Enter.

      mm41_rec-2

    2. Insert the header values as shown in the following screenshot.

      recrec_1

    3. Enter the data as shown in the following screenshot in the second row. After you finish inserting data, select Check screen data.

      Note: Do not select Enter at any point in this process.

      recrec_2

    4. When you select Check Screen data, a vertical scroll appears as shown in the following screenshot.

      recrec_3

    5. Select appropriately as shown below: (click 1 time).

      recrec_4

    6. Select Save. When you complete the recording in SAP, Process Runner automatically compiles the script and moves to the Mapper tab.

      recrec_5

  3. On the Mapper tab, perform the following:
    1. Insert a loop in the mapper for vertical scrolling. Make the appropriate changes as shown in the following screenshot.

      Recording_mapepr_002

  4. Save the Process file, select Run, and perform the following steps:
    1. Select the GUI session where the file must be run. The existing sessions are listed in the Select GUI Session where you want to run this process window or select Start and use new SAP GUI Session to run this Process file in the new SAP GUI session.

    2. Select the SAP Logon shortcut in the Connector for SAP window and select Logon. When you run this Process file, all the records are saved.
  5. Optionally, to verify the data in SAP, log in to the same SAP system that you used to record the transaction, enter MM43 and select Enter.

Was this article helpful?

We're sorry to hear that.