Welcome again to another Logic Apps Best Practices, Tips, and Tricks post. In my previous blog posts, I discussed a fundamental trick for developers who use the SAP Connector to connect to SAP Systems. Today, we will discuss how to properly configure the SAP Connector’s System Number property.
![](https://blog.sandro-pereira.com/wp-content/uploads/2024/07/01-Logic-App-SAP-Connector-IM-1024x575.png)
How to properly configure the System Number property of the SAP Connector
Logic App lets you connect to the SAP system using the SAP Connector. Both Logic App Standard and Consumption workflows offer the SAP managed connector hosted and run in multitenant Azure. Standard workflows also offer the SAP built-in connector hosted and run in single-tenant Azure Logic Apps.
To connect to SAP, you need or can set up many properties in the SAP Connector. Today, we will focus on the AS System Number and within Logic App Consumption.
![](https://blog.sandro-pereira.com/wp-content/uploads/2024/07/01-Logic-App-SAP-Connector-properties-923x1024.png)
AS System Number: Specify the system number (e.g., 00) of the SAP System you want to connect to. The System Number is a 2-digit number unique to a single host. It is usually the last two numbers of the port.
When we are developing our Logic App Consumption inside Visual Studio, and when we add and configure the SAP Connector inside the Logic App designer, by default, in the ARM Template, the AS System Number property that you see in the picture above is set as an int with the value you define in the designer inside an ARM parameter called arm_sap_systemNumber:
"arm_sap_systemNumber": {
"type": "int",
"defaultValue": 40,
"metadata": {
"description": "The SAP System's System Number. It is a number ranging from 00 to 99."
}
}
This configuration is usually OK. You will not find any issues using the SAP Connector inside your Logic Apps. But what happens if your SAP System uses a system number below 10? Basically, the SAP System Number ranges from 00 to 99.
Yes. You correctly think that ’00’ or ’09’ is not an int. INT doesn’t accept 0 (zeros) on the left side. 0 or 9 is an int, but ’00’ or ’09’ is a string.
So, the question that we need to ask is, how can I properly configure the AS System Number property to accept all cases? Ideally, we want to keep this setting consistent across all configuration scenarios and avoid future problems.
The answer is quite simple, you should open the Logic App in code view – access the ARM template file, and always change this parameter to be a string instead of an integer:
"arm_sap_systemNumber": {
"type": "string",
"defaultValue": "00",
"metadata": {
"description": "The SAP System's System Number. It is a number ranging from 00 to 99."
}
}
Don’t forget to do the same in the Logic App parameter file. Here, you don’t need to specify that it is a string, but you need to set it as a string value:
"arm_sap_systemNumber": {
"value": "00"
}
Instead of:
"arm_sap_systemNumber": {
"value": 40
}
I hope you find this helpful! If you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego!