In this blog, we are going to create business partner in SAP S/4HANA Cloud Application using SAP Process Automation Recorder.
The minimum version required to automate SAP S/4HANA Cloud Application is mentioned below:
- Agent/MSI version – 126.96.36.199
- Extension version – V2– 188.8.131.52
- Extension version – V3– 184.108.40.206
- SDK version – 1.25.57
To start with, lets create a new project in Cloud Studio and open SAP S/4HANA Cloud Application in a new browser window.
Step 1 – Create a new application. Now all the applications running in our machine would be listed down. We need to select SAP S/4HANA Cloud Application cloud from the list.
Step 2. When SAP S/4HANA Cloud Application is selected, two options are available in the Cloud Studio – Recorder and Manual Capture.
We will move on with the Recorder option in this blog. So, let us click on Record button.
Step 3: We can see the recording widget is launched on top of the SAP S/4HANA Cloud Application.
To start the recording, click on the red button.
Step 4: Once the page is captured, enter username, password and then click on login button.
Step 5: Now that we have logged into the application, we can see there are different tiles listed on the UI.
Since there is a change in the UI and we are in automatic capture mode, the recording widget automatically captures the new screen without any user intervention.
To utilize the Auto Capture feature of the SAP Process Automation Recorder, the minimum version required is –
- Agent/MSI version – 220.127.116.11
- Extension version – V2– 18.104.22.168
- Extension version – V3– 22.214.171.124
- SDK version – 1.31.49
Else we need to capture the screen by clicking on the camera button every time we get the Capture Hint in the recording widget or if there is a change in UI.
Once the new screen is automatically captured by the recording widget. Click on arrow and select Business Partner Master from the list.
Step 6: Click Maintain Business Partner tile.
Step 7: Then after click Organization and wait until the recording widget is finished capturing the new screen.
Step 8: Select the grouping as per your choice. Here I have selected Ext. alphanumeric numbering.
Step 9: Enter the value for Business Partner as per the grouping.
I have entered BP001.
Step 10: Now fill in the Name and Address.
Step 11: Once the details are filled in, click on Save to create a new business partner with the given details.
Step 12: Since we have successfully recorded a scenario to create business partner in Cloud Studio. Now click on stop recording and export the artifacts.
After the artifacts are downloaded, an application and an automation are saved in Cloud Studio.
Any changes to the business partner data can be made in Cloud Studio even after exporting the artifacts. Select the activity and then update the input parameter.
We can also provide the business partner data from an excel.
To create the business partner from the excel data, the above automation needs to be enhanced. We will create an automation that will read and process the data from excel and then pass the business partner data to the current automation.
Let us create a new automation to read the business partner data from excel.
The excel that I have used in this blog has 1 worksheet.
Add following steps to the automation
- Open Excel Instance.
- Excel Cloud Link – This activity reads data from a specific worksheet and maps into a data type which we will later use in our automation for mapping. Provide the workbook Path and the worksheet Name from the excel and then click on From Excel Data button. This will map the excel data to data types. Since I have only 1 worksheet, so I have added this activity only once.
- Close Excel Instance.
- Output of this automation should be the data returned by Step 2 which is the list of business partners.
We will use the output of this automation as the input to the one we created above.
Add a For Each loop to go through all the records one by one and then create the business partner in the SAP S/4HANA Cloud Application.
Use a try catch block for exception handling in case of missing/faulty excel data.
Conclusion: Now if we run this automation, we should be able to create business partner in SAP S/4HANA Cloud Application dynamically from the provided excel.
Do not forget to have a look at the Learning content in our Store, as it contains many useful examples of use cases.