Automate SAP S/4 HANA Cloud Application Using the Recorder
Automate the process of creating a purchase order in Manage Purchase Orders application in SAP S/4 HANA Cloud.
Overview
You will learn
- How to automate applications in SAP S/4 HANA Cloud
- How to re record applications
Prerequisites
Prerequisites
- Access to a SAP BTP tenant with SAP Build Process Automation
- Install and set up the Desktop Agent 3 to run the automation
- Register to SAP S/4 HANA Cloud Trial account
- Manage Purchase Orders application must run in the background
Steps
Once you have successfully created S/4 HANA Cloud Trial account as mentioned in pre-requisites, navigate to SAP S/4 HANA Cloud Trial account.
Search for Manage Purchase Orders.

Manage Purchase Orders
You will create a new project in SAP Build Process Automation application.
Navigate to SAP Build application and create a project by choosing Create.

Create a project Select Build an Automated Process.

Build an Automated Process Select Task Automation.

Task Automation In the Create a Task Automation project window, please give the project the name: Upload Purchase Order and choose Create.

Create Task Automation Once the project is created, a new tab will open. You will need to configure your agent version. Select the version of the agent installed on your machine and choose Confirm.

Select desktop version A pop-up window asking you to create an automation will appear, please choose Cancel.

Cancel automation What is going on?
As you will be using the recorder feature, you do not need to create an automation but an application.
The next step would be to create your application within your project.
Before recording the steps of a workflow, ensure that the Manage Purchase Orders application and the SAP Build Process Automation application are running in a Chrome browser in two separate windows.
Open the Manage Purchase Orders application in your SAP S/4 HANA Cloud Trial account.
In the Overview tab of your Upload Purchase Order project, choose Create, then choose Application.

Application In the Create Application window, type Manage Purchase Orders as an application name and choose Create.

Create application What is going on?
SAP Build Process Automation starts detecting the applications and their screens currently running on your local machine. When it’s done, you’ll see a list of screens in the picker panel on the left.
Select the Manage Purchase Orders screen and choose Next.

Select web screen You have the option to select either Recorder type or Manual Capture type. This tutorial will show you how to use the Recorder.
Select Recorder as type and choose Record.

Recorder Please note that the technology that you will be recording is Web.
After the dependencies have been successfully added, SAP Build Process Automation application is locked and you will be directed to the S/4 HANA application you want to record.
The Recorder widget will appear. In this tutorial, you will learn how to use a new feature in the Recorder Automatic Capture Mode.
In earlier versions of the Recorder, when the screen changed in the application, the recorder showed a capture hint. This reminded the user to capture the screen where you had to click on the camera icon to capture the screen. Now, the recorder is enhanced such that, as soon as any screen changes are detected, it automatically initiates the capture and captures the screen.
Choose Record to start recording.

Record You can see the Automatic Capture Mode is on.

Automatic Capture Mode You can select the drop down menu to view the different available capture modes such as:
- Automatic Capture Mode
- Manual Capture Mode
- Capture on Hover

Automatic Capture Mode This step involves recording the setting of the values for Supplier, Purchasing Organization and Purchasing Group.
Field Name Value Supplier USSU-TRL04Purchasing Organization 1710Purchasing Group Z10Once you choose Record, the Recorder will capture the screen.
Now choose Manage Purchase Orders tile on the page.

Recorder You can see that the activity is added.
Once a new screen appears, the recorder detects the screen change and initiates the screen capture immediately. First, the recorder waits for the screen to load. Once the screen loads completely, the recorder starts capturing the screen data with green border around the application and capture progress in the recorder.
CAUTION: Please wait until the page is fully recorded.
On the Manage Purchase Orders application, choose Create.

Recorder The recorder will add the new screen with the new purchase order that needs to be created. Now you need to set the values for Supplier, Purchasing Organization and Purchasing Group.
In the Supplier input field, choose the Show Value Help icon.

Recorder CAUTION: Please wait until the page is fully recorded.

Recorder Search for the Supplier:
USSU-TRL04in the search field and choose Go.
Recorder Select the Supplier:
USSU-TRL04.
Recorder CAUTION: Please wait until the page is fully recorded.
Upon selecting the Supplier, the Purchasing Organization input fills itself with the correct value automatically.

Recorder Now you can repeat the above steps for Purchasing Group:
Z90.
This step involves recording the setting of the values for Material Details in a table.
| Field Name | Value |
|---|---|
| Material | MZ-FG-M525 |
| Order Quantity | 200 |
| Order Price | 9000 |
Choose Create.
CAUTION: Please wait until the page is fully recorded.

Recorder A new empty table row is created.
In the Material input field, choose the Show Value Help icon.
CAUTION: Please wait until the page is fully recorded.

Recorder Search for the Material:
MZ-FG-M525in the search field and choose Go.Select the Material:
MZ-FG-M525.
Recorder Set Order Quantity to
200.Set Net Order Price to
9000.CAUTION: Please wait until the page is fully recorded.
Choose Order.

Recorder The new purchase order is created.

Recorder
Once you have completed entering the data in the application screens, you can stop recording. Choose the button to stop the recording. After you stop the recording, by default, the Export button is displayed.
Choose the stop button to stop the recording.
To export the recorded steps to SAP Build Process Automation, choose the Export button.

Recorder CAUTION: Before you start exporting the recording to SAP Build Process Automation, check if your session has not timed out. If it has timed out, you must re-login (do not refresh) and then export the recording.
After successful processing, the recorder widget will be closed. You will be redirected to SAP Build Process Automation application and the confirmation message, Recording successfully exported is displayed.
The application Manage Purchase Orders and the automation Manage Purchase Orders are successfully exported.

You will find the Declared Application in Manage Purchase Orders application. You can view the recorded screens under Declared Application and the recorded elements under Declared Elements. If required, you can manually edit the screens to add or remove objects.

All the recorded steps will be displayed in the automation designer of Manage Purchase Orders automation. You can then edit the automation to update the Step Details.

To test your automation, choose Test.

Manage Purchase Orders application is opened in a browser window and creates the purchase order with values provided in the steps of the automation.

When you record an application, you always create a new application and automation at the end of the recording. The Re-recording of application feature allows you to re-record or update an existing application and enhance the existing automation by merging newly recorded artifacts with it.
Navigate to the Overview tab of your Upload Purchase Order project.
Choose Create and then select Application. The Create Application popup window is displayed.

Create new application In the Create Application popup window, enter the following:
- Enter the name in the Application Name field: Home
- Optional: edit the Application Identifier field without using a space.
- Enter a short description in the Description field: Add home screen
Choose Create.

Create new application A new tab labeled to the name of the captured application is displayed. The system starts detecting the applications and their screens currently running on your local machine. When it’s done, a list of screens is displayed in the picker panel on the left.
Select the application you want to record from the list of screens. A preview of the screen is displayed in the capture area.
Choose Next. This redirects you to the application that you want to record.

Select application To start the recorder, choose Record.

Start recorder To initiate the recording, choose the Record button. The Cloud Studio is locked and the selected application is recorded.

Record In the search field, type Manage Purchase Order and hit enter.

Search Note that the recorder is in Automating Capture Mode. You may change the mode to your liking.
You may now stop the recording, choose the stop button and then the Export button.

Stop In the Export Recording popup window, select Update an existing automation and choose Next.
What is going on?
If you select this option, the existing automation is displayed. If you select the Create a new automation option and choose Next, the Successfully created the automation confirmation message is displayed and you are redirected to the Cloud Studio.

Export In the Insert Recording popup window, select Start of current automation to add the new recording at the beginning of your automation.
To insert the steps into your existing automation, choose Insert.

Insert The Successfully saved the automation confirmation message is displayed, and you are redirected to the Cloud Studio.
You can see that your new application Home has been added.

Home application Now you need to remove the duplicate Start and Close application activities from your automation.
Navigate back to your Manage Purchase Orders automation.
You can delete step 3 and 4 as they are duplicate activities.

Delete duplicate steps Save your automation.
You may test your automation. Now Home application is opened in a browser window and creates the purchase order with values provided in the steps of the automation.
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.