Create a Simple GUI Script Multiline Template

The steps below explain how to create a GUI Script Template. Before proceeding, it is recommended that you know how to Perform a Simple Upload and you have read over the recording Tips and Tricks.

  1. Go to the Data Page in Syniti Data Workbench.
  2. Click Record a Template.
  3. On the Template Information tab, enter the transaction code that you would like to record. The following steps use FB50 as an example.
  4. In the Template Type field, select GUI Scripting Template.
  5. Give the template a meaningful name. Typically a brief description of what actions you are performing during the recording.
  6. Optionally, add a description. This may be helpful if you have notes to add about the recording or you want to distinguish this recording from other similar recordings.
  7. Click Record Template. The SAP GUI opens with the initial screen for the transaction.
  8. Fill out the header data, making sure that you "touch" all of the fields that you want to use for the upload.

    Figure 1 – Recording Section pressing the Record Template button

  9. After filling out all of header data, press <ENTER>.
  10. Add the first line item to the grid. It is important that this is done a specific way to make a repeatable process for the loop.

    Figure 2 – FB50 Entering Header Data
  11. For a simple multiline recording, all the line items must be entered on the same row. In an FB50 transaction, once you have completed filling out a line in the grid, highlight the row and click the "insert line" button() as shown in Figure 3.The results should look like Figure 4 below.

    Figure 3 –FB50 with First Line Item Selected

    Figure 4 – FB50 After Insert Line Button was Pressed
  12. Repeat the previous step for another line item making sure to press the “insert line” button () again. Creating two line items helps identify the loop in the template.
  13. Click Save in the SAP GUI or end the transaction however you normally would. The SAP GUI closes and Data Workbench creates the template.
  14. Click Stop Recording in the Template Recording dialog shown in Figure 5.

    Figure 5 – Template Recording Dialog
  15. Go to the Templates page.
  16. Highlight the newly created template, and click Edit Template.

    Figure 6 – Template Browser with the “Edit Template” button pressed
  17. Go to the Script Contents tab.
  18. In the template contents, look for a pattern where one or more screens repeat. The repeated screens represent each line item entered during the recording and contain the same line item fields in each set of the pattern. Figure 7 below shows that the selected screen and the one below it are almost identical except for the data values. The next steps are to loop the first instance of the pattern and delete any other instances.
  19. Select the first instance of the pattern, right click the selection and select Increment Loop Level as shown in Figure 7. This identifies the repeated part of the template and allows you to enter a variable number of line items.

    Figure 7 – Template Editor Incrementing the Loop Level
  20. The How was the recorded data entered into the grid? is displayed as shown in Figure 8. In this case, all the data was entered on row one (a simple multiline template).

    Figure 8 – How was the recorded data entered into the grid? Dialog
  21. Select all other instances of the pattern below the loop level you just created and click Delete Item.
    Note: Be careful not to delete the last screen that contains the Save button press. If you make a mistake, you can always go back to the original recorded state by clicking the "Restore Original" button.

    Figure 9 – Template Editor Deleting the Repeated Screens
  22. Click Save to return to the Templates Page.
  23. Select the template and click Create Load File
  24. Select the Create a Single Sheet option.
  25. Click OK to create an Excel file that contains a single worksheet containing both the header and the line item columns.
    Figure 12 – Create Load File Dialog
  26. To add data to the load file, enter the header information and the detail for the first line item in the first row of the load file.
  27. Enter the remaining line items for the transaction in the following rows.
  28. To begin another record, start the next row with the header information and repeat. Data Workbench keeps adding line items until it detects new data in the header columns.
    Figure 13 - Single Sheet Load File
  29. After populating the data in the load file, and saving it, go to the Upload Data to SAP Page.
  30. Select the file.
  31. Click Upload

NOTE: If records fail, see Troubleshoot Error Messages.