Configure environment variables (preview)
[This article is prerelease documentation and is subject to change.]
Environment variables are solution components that store parameter keys and values, which then serve as input to various other application objects found in Power Automate flows and Power Apps. Enterprise systems often have multiple connection parameters, and manually entering the parameters into each component can be redundant and time-consuming.
The Copilot for Finance SAP Collections template uses environment variables within cloud flows to centrally manage and set key properties on the SAP ERP connector flow action steps.
Tip
As a best practice, configure and manage environment variables as part of your application lifecycle management (ALM) strategy. Set both default and current environment values as you migrate and manage the various solution files across your environments.
Learn more: Use environment variables in Power Automate solution cloud flows
Configure environment variables at time of installation
When you install the SAP Copilot for Finance Collections solution template, you are prompted to enter values for seven environment variables that you can configure to your local needs.
Once set up, the environment variables can be edited as you build your own solutions in the development environment.
The table provides information about the five environment variables that need SAP connection parameters set up.
Display name | Name | Description | Default value |
---|---|---|---|
SAP Application Server | mpa_SAPApplicationServer | JSON string that contains system parameters, host, system number, client, and more. Refer to the SAP property guidance. | {"AppServerHost":"10.0.0.10","Client":"800","SystemNumber":"00","LogonType":"ApplicationServer"} |
SAP Client ID | mpa_SAPClientID | The SAP client ID identifies your connection to the SAP system. The SAP backend client (or 'Mandant') into which to log in. It's a number ranging from 000 to 999. Used separately in IDoc transactions. | 800 |
SAP Count of Rows to Read | mpa_SAPCountofRowsToRead | Sets the maximum number of records to be returned on any search query and helps to alleviate performance concerns. | 1000 |
SAP Application Server | sap_SAPDevelopment | JSON string that contains system parameters, host, system number, client, and more. Refer to the SAP property guidance. | {"AppServerHost":"10.0.0.10","Client":"800","SystemNumber":"00","LogonType":"ApplicationServer"} |
SAP Development SafeTyping | sap_SAPDevelopmentSafeTyping | JSON string that contains system parameters, host, system number, client, and more. Refer to the SAP property guidance. | {"AppServerHost":"10.0.0.10","Client":"800","SystemNumber":"00","LogonType":"ApplicationServer","SafeTyping":true} |
SAP Language Key | mpa_SAPSPRAS | There are times when you need to specify a language on specific transactions, such as ReadMaterial. We created an environmental variable called SAP SPRAS that allows you to easily control the value in one place according to your localization requirements. | EN |
SAP System ID | mpa_SAPSystemID | The SAP system's three-letter system ID (Mandatory if connection type is Message Server and a message server service isn't present). Used separately in IDoc transactions. | ABA |
Here are some example connection strings:
ASHOST - Application Server
{
"AppServerHost": "sap.example.com",
"Client": "100",
"LogonType": "ApplicationServer",
"SystemNumber": "00"
}
MSHOST - Message Server
{
"Client": "102",
"LogonGroup": "FICO",
"LogonType": "Group",
"MessageServerHost": "sapserverdv6",
"MessageServerService": "3601",
"SystemID": "DV6"
}
MSHOST + SNC/SSO - Message Server using SSO via SNC (Kerberos)
{
"Client": "102",
"LogonGroup": "FICO",
"LogonType": "Group",
"MessageServerHost": "sapserverdv6",
"MessageServerService": "3601",
"SncLibraryPath": "c:\\sapcryptolib\\sapcrypto.dll",
"SncPartnerName": "p:CN=DV6",
"SncQOP": "Default",
"SncSso": "On",
"SystemID": "DV6",
"UseSnc": "true"
}