Set Up and Use Actions with SAP Build Process Automation

Use actions to integrate your process in SAP Build Process Automation with SAP S/4HANA and SAP S/4HANA Cloud. This method of connectivity can be used for other SAP or non-SAP systems.

Context

To integrate your SAP S/4HANA destination with your project in SAP Build Process Automation, you need an action. An action is a feature in SAP Build Process Automation that connects processes with external systems, be they SAP or non-SAP systems. It is an important part of your project, especially if you want to automate or extend your business processes for any available back-end applications. You can build these extensions in the actions design environment using SAP Build Process Automation. By using actions, you can also connect to your given system with methods such as GET, POST, PATCH, and other API operators.

For more information about creating and configuring action projects, see Create an Action Project, Overview of an Action Editor, Using SAP Business Accelerator Hub, and Action Project Settings.

To give an example of the setup and use of actions, we show an example configuration based on the business partner scenario that was described in Extend and Integrate Your SAP S/4HANA Processes with SAP Build Process Automation.

In this example, we use the SAP Business Accelerator Hub to retrieve the API details. For more information about other methods of establishing connectivity, see Create an Action Project. Keep in mind that the same procedure can be applied to other SAP applications as well as third-party systems.

Procedure

  1. Start by creating an action project in the SAP Build lobby so that you can use the Business Partner API in a business process.
  2. Once you are in the SAP Build lobby, select Create to initiate a new action project.

    Keep in mind that we support multiple mechanisms for generating an action project, which are highlighted in Create an Action Project. In our example, select the SAP Business Accelerator Hub where you can create an action project based on any API that is available in this repository.

  3. Once the connectors from the SAP Business Accelerator Hub are open, either select the filters, or search for Business Partner and select API Business Partner (A2X) (version 1.4.0) for SAP S/4HANA:
    The screenshot is explained in the previous paragraph.
  4. When you have given your project a name, select Create to generate a new actions project. After a few seconds, your project is created and appears in the SAP Build lobby.
  5. Once you open the project, you can choose the API operations that you want to make available within your business process. The first time you open them, you are prompted with a screen to select the API operations that you want to expose. For this example, select:
    • Business Partner > POST /A_BusinessPartner

    • Business Partner > GET /A_BusinessPartner('{BusinessPartner}')

    • Business Partner > GET /A_BusinessPartner

  6. After you've chosen the API operations that you want, choose Add.

    Afterward, you can get access to your entire actions project, where you can specify the input and output for your APIs, enable a CSRF-Token for authentication, and test all the operations that you selected previously. For more information about how to work with the action editor, see Overview of an Action Editor.

  7. Once you are satisfied with your result, you can save your efforts, release the project, and publish it to be consumed by other developers.
  8. Now, you can make this action available in a business process.

    Go to the process builder of SAP Build Process Automation, choose at any point of your process definition, and choose Action.

    Filter by your action project to create a new business partner and select Add.

    The screenshot shows the action library.
  9. Choose the action that you just created inside the process logic and access the configuration pane on the right-hand side. Here you can change the name of your action and specify a destination variable.
    The screenshot shows how to create a destination variable in an action.

    This variable functions as a placeholder, which can then be mapped to a real destination in your SAP BTP subaccount. The mapping happens when you release and deploy your project.

  10. Go back to the configuration pane of your action, choose the General tab, go to Click to select user source from step, and select the approval form. This leverages the user session from the approval step to create the business partner in the SAP S/4HANA system, generating the identity and keeping traceability on who allowed the business partner to be created.
  11. Go back to the configuration panel of your action and select the Input tab to map the context data of your process to the input of the corresponding action project. The format of your input was specified beforehand in the action project itself.
    This screenshot shows the mapping of context data in the input tab. It specifies that the field PersonalFullname needs to be left empty.
  12. Now you can save your project and release it. When you publish it, you need to map your destination variable to an actual destination from your SAP BTP subaccount.
    1. Optionally, you can also consume the action in the design time. In the following screenshot, you can see an approval step that was initiated through an approval form in SAP Build Process Automation.

      You can see this form in the My Inbox application.

    2. Once the approval form is approved, you trigger the actions project. The action then posts the business partner information into the SAP S/4HANA system.