-
SAP BUSINESS TECHNOLOGY PLATFORM | EXTERNAL
Setup Guide
Business Partner Creation Approval Process using
SAP Workflow Management or SAP Build Process
Automation
© 2022 SAP SE or an SAP affiliate company. All rights reserved.
1
Table of Contents
Table of Contents .................................................................................................................................. 2
Overview ............................................................................................................................................. 4
Required SAP Business Technology Platform Services .............................................................................. 6
Setup and Configuration ........................................................................................................................ 7
Configure SAP Build Process Automation.......................................................................................................... 7
Configure Process Automation Destination .......................................................................................................................... 7
Configure OAuth2ClientCredentials SAP Build Process Automation Destination (Service Instance)...................................8
Configure OAuth2UserTokenExchange Destination .............................................................................................................8
Configure SMTP Mail Destination ..........................................................................................................................................9
Configure SAP Workflow Management .............................................................................................................. 9
Configure Workflow Email Destination ..................................................................................................................................9
Configure OAuth2ClientCredentials Workflow Destination ...................................................................................................9
Configure OAuth2UserTokenExchange Workflow Destination ........................................................................................... 10
Configure OAuth2ClientCredentials Business Rules Destination ......................................................................................... 11
Configure OAuth2ClientCredentials Business Rules Destination (Service Instance) ........................................................... 11
Configure OAuth2ClientCredentials Workflow Destination (Service Instance) ................................................................... 12
Configure a Destination to SAP S/4HANA Cloud system .................................................................................. 12
Configure Identity Authentication Service Destination ...................................................................................... 13
Create and Configure the Core Data Services to populate the Value Helps........................................................ 13
Setup SAPUI5 Application ................................................................................................................................ 14
SAPUI5 Application.............................................................................................................................................................. 14
Configure SAP Central Fiori Launchpad Site for SAP Workflow Management .................................................................... 14
Appendix ............................................................................................................................................ 16
Pre-requisite ........................................................................................................................................................................ 16
Create Custom CDS View for Country .............................................................................................................. 16
Procedure ............................................................................................................................................................................ 16
Create Custom CDS View for Business Partner Roles ....................................................................................... 17
Procedure ............................................................................................................................................................................ 17
Configure S/4HANA Cloud.................................................................................................................... 19
Setup OData Service based on Custom CDS View ............................................................................................ 19
Procedure ............................................................................................................................................................................ 19
Set up custom communication scenario for CDS views ...................................................................................................... 19
Create Communication User............................................................................................................................................. 19
Create Communication System .......................................................................................................................................... 19
Create Communication Arrangement ................................................................................................................................ 20
Setup API for Banks to enable value help for all banks...................................................................................... 20
Procedure ........................................................................................................................................................................... 20
Setup API for Business Partner to be used in BTP Destination ......................................................................... 20
Procedure ........................................................................................................................................................................... 20
Configure S/4HANA on-premise........................................................................................................... 22
Expose CDS View ............................................................................................................................................ 22
Configure Cloud Connector ............................................................................................................................. 22
2
Modify User Interface source code .................................................................................................................. 22
[Optional] Making Custom Changes ...................................................................................................... 23
Making Custom changes in SAP Build Process Automation ............................................................................. 23
Making Custom changes in SAP Build Process Automation ............................................................................. 23
3
Overview
This document provides information about configuration steps to consume the live process
package Business Partner Creation Approval Process. The primary audience of this
document is technical IT / system administrators.
Business Partner Creation Approval Process content package for SAP S/4HANA Cloud enables to
automate business partner creation in a flexible and transparent way. It provides flexibility in
executing a specific variant of the process depending on attributes like business partner category,
etc. When a user submits a request to create a new business partner, a pre-configured process
variant is triggered in SAP Workflow Management or SAP Build Process Automation based on
configurable business conditions. On approval, a business partner is created in SAP S/4HANA
Cloud system.
Salient features of this content package are:
• Plug and Play with SAP S/4HANA Cloud without any additional development.
• Possible to create business partner of category types Person and Organization
• Process steps delivered to create a business partner
• Automatic email notification to parties involved.
• Business Rules provides flexibility in determining process variants and approvers
• Custom validation on business partner attributes using Business Rules.
• New variant of the process can be created using the pre-delivered process steps in a no-
code / low-code approach
• Insight to actions using process visibility
• Out-of-the-box visibility into key process performance indicators
Disclaimer: Please note that this content package is a template to facilitate custom build extensions. A
full-fledged master data management solution, with data quality management and governance
capabilities is available on SAP Business Technology Platform, please see SAP Master Data Governance.
4
5
Required SAP Business Technology Platform
Services
The following SAP BTP services are required to consume the content package Business Partner
Creation Approval Process for SAP S/4HANA Cloud
• SAP Workflow Management or SAP Build Process Automation
• SAP Cloud Portal service / SAP Launchpad service
• SAP Web IDE / SAP Business Application Studio
• SAP Cloud Identity Services - Identity Authentication
6
Setup and Configuration
The Business Partner Creation content package requires SAP Build Process Automation SAP
Workflow Management subscription or a CPEA contract. Follow the setup and configuration section
of SAP Workflow Management or SAP Build Process Automation.
Configure SAP Build Process Automation
Follow the setup and configuration section of SAP Build Process Automation:
1. Subscribe to SAP Build Process Automation (Standard Plan)
2. Configure Destinations for Live Process Projects
a. Import Package Destination
b. Business Rules Destination to support start and step conditions
3. [Optional] Configure SAP Launchpad Service for SAP Build Process Automation
Configure Process Automation Destination
A HTTP destination is required in the BTP subaccount where SAP Build Process Automation is
subscribed. Create a destination with name “sap_process_automation_service” with the following
configuration if it doesn’t exist already. Please refer how to create a HTTP destination OAuth 2.0
Authentication (client credentials).
Name sap_process_automation_service
Type HTTP
Proxy Type Internet
Authentication OAuth2ClientCredentias
URL <”endpoints”.”api”>
Client ID <"uaa":"clientis”>
Client Secret <"uaa":"clientsecret”>
Token Service URL <"uaa":"url">/oauth/token
Note: While creating the service instance for SAP Build Process Automation service, make sure that
at least the required scopes are assigned (help documentation to enable technical authentication
to access the SAP Build Process Automation APIs). If the scopes are not assigned, you can also
update the service instance with the required scopes.
7
Configure OAuth2ClientCredentials SAP Build Process Automation Destination
(Service Instance)
Ignore this step if there is already a destination using SAP Build Process Automation service
instance created.
Create new destination to call SAP Build Process Automation APIs using a service route from SAP
UI5 component. For more details, follow the help document:
https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-
US/685f383cebb54c009b2fac633b32c90f.html.
Configure OAuth2UserTokenExchange Destination
Configure a destination with the following parameters:
Name sap_process_automation_workflow_useraction
Type HTTP
Proxy Type Internet
Authentication OAuth2UserTokenExchange
URL <”endpoints”.”api”>
8
Client ID <"uaa":"clientis”>
Client Secret <"uaa":"clientsecret”>
Token Service URL <"uaa":"url">/oauth/token
Additional Properties: Name: bpmprocessvisibility.triggerWorkflow
Value: user
Name sap_process_automation_workflow_systemaction
Type HTTP
Proxy Type Internet
Authentication OAuth2UserTokenExchange
URL <”endpoints”.”api”>
Client ID <"uaa":"clientis”>
Client Secret <"uaa":"clientsecret”>
Token Service URL <"uaa":"url">/oauth/token
Additional Properties: Name: bpmprocessvisibility.triggerWorkflow
Value: system
Please refer help documentation how to get URL, Client ID , Client Secret and Token Service
URL. For more information refer to how to create a HTTP destination.
Configure SMTP Mail Destination
Configure email destination to automatically send email notification to the involved parties. For
more information on configuring the destination, see configure SMTP mail destination.
Configure SAP Workflow Management
Follow the setup and configuration section of SAP Workflow Management.
Note: While creating the service instance for Workflow service, make sure that at least the following
scopes are assigned (help documentation to enable technical authentication to access the
workflow APIs). If the scopes are not assigned, you can also update the service instance with the
following scopes.
• WORKFLOW_INSTANCE_GET
• WORKFLOW_INSTANCE_START
Configure Workflow Email Destination
Configure workflow email destination. For more information on configuring destination, see
Configure the Workflow Capability Mail Destination.
Configure OAuth2ClientCredentials Workflow Destination
Use an existing or create a new Workflow service instance with at least the following authorities
9
(scopes):
WORKFLOW_INSTANCE_START
WORKFLOW_INSTANCE_GET
Please refer to the documentation on how to Enable Technical Authentication with specific
authorities.
Configure a destination with the following parameters:
Name Workflow
Type HTTP
Proxy Type Internet
Authentication OAuth2ClientCredentias
URL https://api.workflow.<region-
host>.hana.ondemand.com/workflow-service/rest
Client ID
Client Secret
Token Service URL <"uaa":"url">/oauth/token
Additional Properties: Name: bpmprocessvisibility.triggerWorkflow
Value: system
Please refer help documentation how to get URL, Client ID , Client Secret and Token Service URL.
For more information refer to how to create a HTTP destination and how to use Workflow APIs.
Configure OAuth2UserTokenExchange Workflow Destination
Configure a destination with the following parameters:
Name WorkflowActions
Type HTTP
Proxy Type Internet
Authentication OAuth2UserTokenExchange
URL https://api.workflow.<region-
host>.hana.ondemand.com/workflow-service/rest
Client ID
Client Secret
Token Service URL <"uaa":"url">/oauth/token
Additional Properties: Name: bpmprocessvisibility.triggerWorkflow
Value: user
Please refer help documentation how to get URL, Client ID , Client Secret and Token Service URL.
10
For more information refer to how to create a HTTP destination and how to use Workflow APIs.
Configure OAuth2ClientCredentials Business Rules Destination
Configure a Business Rules destination with name “BUSINESS_RULES” with the following
parameters:
Please refer help documentation how to get URL, Client ID , Client Secret and Token Service URL
For more information refer to how to create a HTTP destination and how to access business rules
APIs using OAuth 2.0 Authentication (client credentials)
Configure OAuth2ClientCredentials Business Rules Destination (Service Instance)
Ignore this step if there is already a destination using Business Rules service instance created.
Create new Destination to call Business Rules Service APIs using a service route from SAP UI5
Component.
• Click New Destination.
• Select Service Instance as Destination Configuration.
• Select Service Instance as BusinessRules.
• Enter Name as BusinessRules_CFLP and click Next button.
11
• Click Save button.
Configure OAuth2ClientCredentials Workflow Destination (Service Instance)
Ignore this step if there is already a destination using Workflow service instance created.
Similarly, create new Destination to call Workflow Service APIs using a service route from SAP UI5
Component. For more details, follow the official help document:
https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-
US/685f383cebb54c009b2fac633b32c90f.html.
Configure a Destination to SAP S/4HANA Cloud system
Create a destination to connect to either SAP S/4HANA or SAP S/4HANA Cloud system. For example,
in this case you see the destination to connect to SAP S/4HANA Cloud system.
Configure a destination with the name as “S4HANA”, with Type as HTTP, Proxy
Type as Internet, URL as hostname of your SAP S/4HANA Cloud tenant, and authentication as
BasicAuthentication. Please refer how to create an HTTP
12
destination
Configure Identity Authentication Service Destination
Configure Identity Authentication destination with the following parameters to call SCIM REST
APIs.
Name SCIM
Type HTTP
Proxy Type Internet
Authentication Basic Authentication
URL https://<IAS tenant
ID>.accounts.ondemand.com
User
Password
To obtain User and Password values please follow how to add system administrator
Create and Configure the Core Data Services to populate t he
Value Helps
The Custom Task UIs based on SAP UI5 uses a couple of backend services to populate the value
helps for Business Partners Roles and Country/Region information and Bank information.
Country Value Help URL –
{S4HANA_Dest}/sap/opu/odata/sap/YY1_BPCountry_CDS/YY1_BPCountry
13
Business Role Value Help URL –
{S4HANA_Dest}/sap/opu/odata/sap/YY1_BPROLE_CDS/YY1_BPRole
Bank Data Value Help URL –
{S4HANA_Dest}/sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail
Create the necessary Custom CDS Views in your SAP S/4HANA Cloud system in order to use the
Live
Process Package. Refer to the Appendix for more details.
Setup SAPUI5 Application
SAPUI5 Application
While importing the content, an SAPUI5 application is automatically deployed in your BTP tenant.
If you want to enhance the template application, pleaser refer to chaper Making Custom changes.
Configure SAP Central Fiori Launchpad Site for SAP Workflow Management
If you plan to use SAP Launchpad service, then configure SAP Central Fiori Launchpad Site with
Workflow Applications using help documentation.
Perform the following steps to add the Business Partner Creation app as a tile in the launchpad site:
• Open SAP Launchpad site manager application.
• Select Content Manager
• Go to Content Explorer tab
• Under the HTML5 Apps, search for com.sap.bpm.CreateRequest
• Select the app from the result and click ‘Add to My Content’ button to include the UI5
component
• Select My Content tab and Search Everyone.
• Click Everyone from the result and navigate to the details
• Click the Edit button.
• Search for the app ‘Business Partner Creation Request’ and click the + button to assign the
app to the role.
14
• Under My Content tab, click New button and Select Group to create a new group
• Add a Title for e.g.: Business Partner Creation under PROPERTIES tab.
• Search and add the Business Partner Creation Request app
• Click Save button. Please refer help documentation to know more about configuring
start UI tile on Central Fiori Launchpad.
15
Appendix
SAP S/4HANA uses the two letter ISO codes for the countries. When the country field of an address
needs to be changed, then the new address must be from the two letter ISO codes list. To make the
country field human readable in the UI, the country codes that are supported in SAP S/4HANA will be
used. To get the list, we are going to create a Custom CDS View.
Pre-requisite
You have the necessary tools and rights to create Custom Core Data Service Views . Please refer to
the following - SAP HANA Core Data Services (CDS) Reference
Create Custom CDS View for Country
Procedure
1. Create a Custom CDS View with the Name YY1_BPCountry and Label “BPCountry”.
2. Select Scenario “External API”
3. Choose Add > Add Primary Data Source.
4. Choose the data source with the name “I_CountryText” and choose Add.
5. Choose Add > Add Associated Data Source.
6. Choose the data source with the name “I_Country” and choose Add.
7. Choose Edit Association Properties ( ) in the Actions column.
8. In Associated Data Source Fields, choose “Country”. Leave the Operator as equal and in Value
choose “Country”.
9. Choose OK.
10. Repeat the step 8 to 10 for I_Language to add the language as an Associated Data Source.
11. In Associated Data Source Fields, choose Language. Leave the Operator as equal and in Value
choose “Language”.
12.Choose OK.
13.Choose Save Draft.
14.Choose Field Selection tab.
16
15. Fields needed to be selected are
Country, Language (are already selected since they are key
fields) and select the CountryName field in addition.
16. Choose Filters tab.
17.Choose Edit.
18. Choose Fields.
19. Choose the LanguageISOCode field from the dropdown.
Note
The field name may vary with the variable name given to the language field in previous steps. This
field name is “_I_Language_2.LanguageISOCode” if the defaults are preserved.
20. Complete the formula with “=’EN’”.
Note
The complete formula will then look like “_I_Language_2.LanguageISOCode=’EN’”.
21.Choose Apply.
22. Choose Save Draft and choose Preview.
Note
You should see in the table the fields Country Key (2 letters ISO Code), Language Key and Long Name
of the countries in English.
23. Choose Publish.
Create Custom CDS View for Business Partner Roles
Procedure
1. Access the SAP Fiori launchpad and click the tile “Custom CDS Views”
2. Click Create
3. Enter Label as BPRole, Name as YY1_BPRole
4. Select Scenario “External API”, click Create
5. Add primary data source “I_BusinessPartnerRole”
6. Add elements
17
7. Add element properties
8. Check and Publish the CDS view
18
Configure S/4HANA Cloud
Setup OData Service based on Custom CDS View
Procedure
Set up custom communication scenario for CDS views
1. Access the SAP Fiori launchpad.
2. Select Custom Communication Scenarios SAP Fiori tile in the Extensibility catalog.
3. Choose New and enter ID and Description then choose New.
4. Choose Inbound Services tab and choose Add.
5. In the opening dialog, choose the services that were created in the previous steps while creating
the Custom CDS view. Note: The service name will be the name of the Custom CDS View
followed by “_CDS”. You can add both the CDS views- for country and business roles as inbound
services to single scenario
6. Choose Check and then Publish.
Create Communication User
1. Access the SAP Fiori launchpad
2. Select the business group “Communication Management”
3. Launch the app “Maintain Communication Users”
4. Click New
5. Enter User Name(e.g. WORKFLOW_API_USER), Description
6. Click Propose password
7. Click Create
Create Communication System
1. Access the SAP Fiori launchpad
2. Select the business group “Communication Management”
3. Launch the app “Communication Systems” and click Create
4. Enter host name which will be the SAP S/4 HANA Cloud system host
5. Enter Business System name
6. In the section “Users for Inbound Communication”, click + icon and choose the user you created
above
7. Keep Authentication Method as User Name and Password, click OK
8. Click Save
19
Create Communication Arrangement
1. Access the SAP Fiori launchpad
2. Select the business group “Communication Management”
3. Launch the app “Communication Arrangements” and click New
4. Select the custom communication scenario created in the above steps.
5. Enter Arrangement Name and click Create
6. In the Common Data section, choose the communication system created in previous steps
7. In the Inbound Communication section, choose User Name created in above steps
8. Click Save. The communication Arrangement status should change to Active
Setup API for Banks to enable value help for all banks
Procedure
1. Access the SAP Fiori launchpad.
2. Go to the Communication Arrangements app in catalog Communication Management.
3. To create a new communication arrangement, choose New.
4. To create a communication arrangement for Finance – Bank Integration API, select SAP_COM_0127.
5. Adapt the Arrangement Name if required.
6. Choose Create.
7. In the Common Data section, from the input help, select the Communication System that was also
used during the setup of the other APIs/ CDS- Views (as mentioned above)
8. The technical user is automatically added to the Inbound Communication section.
9. Save your changes.
Check that the communication arrangement has been activated (the status Active must be visible).
Setup API for Business Partner to be used in BTP Destination
Procedure
1. Access the SAP Fiori launchpad.
2. Go to the Communication Arrangements app in catalog Communication Management.
3. To create a new communication arrangement, choose New.
4. To create a communication arrangement for Business Partner Integration API, select
SAP_COM_0008.
5. Adapt the Arrangement Name if required.
6. Choose Create.
20
7. In the Common Data section, from the input help, select the Communication System that was
also used during the setup of the other APIs/ CDS- Views. (as mentioned above)
8. The technical user is automatically added to the Inbound Communication section.
9. Save your changes. (The status should change to Active)
21
Configure S/4HANA on-premise
Expose CDS View
Use the standard approach for exposing the CDS views as an OData service in SAP S/4HANA on -
premise.
Please refer to the help documentation to Expose CDS Views as an OData service.
Configure Cloud Connector
For SAP S/4HANA on-premise landscape, configure cloud connector to enable secure tunnel to SAP
BTP tenant. Please refer the help documentation to configure Cloud Connector.
Configure Cloud Connector so that the following paths and all their subpaths are exposed:
/sap/opu/odata/sap/
Modify User Interface source code
1. Download the sources for Business Partner Creation Approval Process: User Interface into
SAP Business Application Studio
2. Search for occurences of the CDS view paths:
YY1_BPROLE_CDS/YY1_BPRole
YY1_BPCountry_CDS/YY1_BPCountry
3. Replace the prefix YY1_ with ZZ1_
4. Build and deploy the UI application
5. Optionally you can also choose a different BTP destination name:
a. In the User Interface project, search for "destination": "S4HANA" and replace S4HANA
with your custom destination name
b. Also get the sources for Business Partner Creation Approval Process: Process into
SAP Business Application Studio
c. Replace the destination name in the Service Task Create Business Partner
d. Build and deploy both the UI application and the Workflow Process
22
[Optional] Making Custom Changes
Prerequisite: An account with access to SAP Business Application Studio as well as space
developer permissions in SAP BTP.
The source code for both the process and the SAPUI5-based user interfaces are available as part
of the content package. With this, custom modifications can be implemented to adapt the content
for specific needs.
Making Custom changes in SAP Build Process Automation
• In Manage Package app, select Sources tab
• Select the archive you want to download in the list on the left side
• Click on the blue filename behind File (tar, zip) to download the attached source archive
• Import the archive into SAP Business Application Studio
• Make any necessary modifications
• Build and deploy the MTA archive, using the space developer credentials
Making Custom changes in SAP Build Process Automation
• in Application Lobby, search the package name and select Sources tab
• select the archive you want to download in the list
• Click options icon (…) to download the attached source archive
• Import the archive into SAP Business Application Studio
• make any necessary modifications
• Build and deploy the MTA archive, using the space developer credentials
Please refer to the documentation for SAP Business Application Studio, the documentation for
Modeling a Workflow and the documentation for Creating User Interfaces for details.
23