Skip to content

Commit e068fa9

Browse files
Merge pull request #224753 from ecfan/sap
Azure Logic Apps: SAP connector - Strict min access requirements, partial clarity refactoring
2 parents 9285f20 + 9692f73 commit e068fa9

File tree

1 file changed

+35
-29
lines changed

1 file changed

+35
-29
lines changed

articles/logic-apps/logic-apps-using-sap-connector.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,87 @@
11
---
22
title: Connect to SAP
3-
description: Connect to SAP resources from workflows in Azure Logic Apps.
3+
description: Connect to an SAP server from a workflow in Azure Logic Apps.
44
services: logic-apps
55
ms.suite: integration
66
author: divyaswarnkar
77
ms.author: divswa
88
ms.reviewer: estfan, daviburg, azla
99
ms.topic: how-to
10-
ms.date: 08/22/2022
10+
ms.date: 01/23/2023
1111
tags: connectors
1212
---
1313

1414
# Connect to SAP from workflows in Azure Logic Apps
1515

1616
[!INCLUDE [logic-apps-sku-consumption](../../includes/logic-apps-sku-consumption.md)]
1717

18-
This article explains how you can access your SAP resources from Azure Logic Apps using the [SAP connector](/connectors/sap/).
18+
This how-to guide shows how to access your SAP server from a workflow in Azure Logic Apps using the [SAP connector](/connectors/sap/).
1919

2020
## Prerequisites
2121

2222
* An Azure account and subscription. If you don't have an Azure subscription yet, [sign up for a free Azure account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2323

24-
* A logic app workflow from which you want to access your SAP resources. If you're new to Azure Logic Apps, review the [Azure Logic Apps overview](logic-apps-overview.md) and the [quickstart for creating your first logic app workflow in the Azure portal](quickstart-create-first-logic-app-workflow.md).
24+
* The logic app workflow from where you want to access your SAP server.
2525

26-
* If you've used a previous version of the SAP connector that has been deprecated, you must [migrate to the current connector](#migrate-to-current-connector) before you can connect to your SAP server.
26+
* If you're using a deprecated version of the SAP connector, you have to [migrate to the current connector](#migrate-to-current-connector) before you can connect to your SAP server.
2727

2828
* If you're running your logic app workflow in multi-tenant Azure, review the [multi-tenant prerequisites](#multi-tenant-azure-prerequisites).
2929

3030
* If you're running your logic app workflow in a Premium-level [integration service environment (ISE)](connect-virtual-network-vnet-isolated-environment-overview.md), review the [ISE prerequisites](#ise-prerequisites).
3131

32-
* An [SAP Application server](https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Application+Server) or [SAP Message server](https://help.sap.com/saphelp_nw70/helpdata/en/40/c235c15ab7468bb31599cc759179ef/frameset.htm) that you want to access from Azure Logic Apps. For information about the SAP servers that support this connector, review [SAP compatibility](#sap-compatibility).
32+
* The [SAP Application server](https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Application+Server) or [SAP Message server](https://help.sap.com/saphelp_nw70/helpdata/en/40/c235c15ab7468bb31599cc759179ef/frameset.htm) that you want to access from Azure Logic Apps.
3333

34-
> [!IMPORTANT]
35-
> Make sure that you set up your SAP server and user account to allow using RFC. For more information, which includes the supported
36-
> user account types and the minimum required authorization for each action type (RFC, BAPI, IDOC), review the following SAP note:
37-
> [460089 - Minimum authorization profiles for external RFC programs](https://launchpad.support.sap.com/#/notes/460089).
38-
>
39-
> * For RFC actions, the user account additionally needs access to function modules `RFC_GROUP_SEARCH` and `DD_LANGU_TO_ISOLA`.
40-
> * For BAPI actions, the user account also needs access to the following function modules: `BAPI_TRANSACTION_COMMIT`,
41-
> `BAPI_TRANSACTION_ROLLBACK`, `RPY_BOR_TREE_INIT`, `SWO_QUERY_METHODS` and `SWO_QUERY_API_METHODS`.
42-
> * For IDOC actions, the user account also needs access to the following function modules: `IDOCTYPES_LIST_WITH_MESSAGES`,
43-
> `IDOCTYPES_FOR_MESTYPE_READ`, `INBOUND_IDOCS_FOR_TID`, `OUTBOUND_IDOCS_FOR_TID`, `GET_STATUS_FROM_IDOCNR`, and `IDOC_RECORD_READ`.
44-
> * For the **Read Table** action, the user account also needs access to *either* following function module:
45-
> `RFC BBP_RFC_READ_TABLE` or `RFC_READ_TABLE`.
34+
For information about the SAP servers that support this connector, review [SAP compatibility](#sap-compatibility).
35+
36+
* Set up your SAP server and user account to allow using RFC.
37+
38+
For more information, which includes the supported user account types and the minimum required authorization for each action type (RFC, BAPI, IDOC), review the following SAP note: [460089 - Minimum authorization profiles for external RFC programs](https://launchpad.support.sap.com/#/notes/460089).
39+
40+
* Your SAP user account needs access to the `RFC_METADATA` function group and the respective function modules for the following operations:
4641

47-
* Message content to send to your SAP server, such as a sample IDoc file. This content must be in XML format and include the namespace of the [SAP action](#actions) you want to use. You can [send IDocs with a flat file schema by wrapping them in an XML envelope](#send-flat-file-idocs).
42+
| Operations | Access to function modules |
43+
|------------|----------------------------|
44+
| RFC actions | `RFC_GROUP_SEARCH` and `DD_LANGU_TO_ISOLA` |
45+
| BAPI actions | `BAPI_TRANSACTION_COMMIT`, `BAPI_TRANSACTION_ROLLBACK`, `RPY_BOR_TREE_INIT`, `SWO_QUERY_METHODS`, and `SWO_QUERY_API_METHODS` |
46+
| IDOC actions | `IDOCTYPES_LIST_WITH_MESSAGES`, `IDOCTYPES_FOR_MESTYPE_READ`, `INBOUND_IDOCS_FOR_TID`, `OUTBOUND_IDOCS_FOR_TID`, `GET_STATUS_FROM_IDOCNR`, and `IDOC_RECORD_READ` |
47+
| **Read Table** action | Either `RFC BBP_RFC_READ_TABLE` or `RFC_READ_TABLE` |
48+
| Grant strict minimum access to SAP server for your SAP connection | `RFC_METADATA_GET` and `RFC_METADATA_GET_TIMESTAMP` |
4849

49-
* If you want to use the **When a message is received from SAP** trigger, you must also do the following tasks:
50+
* To use the **When a message is received from SAP** trigger, complete the following tasks:
5051

51-
* Set up your SAP gateway security permissions or Access Control List (ACL). In the **secinfo** and **reginfo** files, which are visible in the Gateway Monitor dialog box, T-Code SMGW, follow **Goto > Expert Functions > External Security > Maintenance of ACL Files**. The following permission setting is required:
52+
* Set up your SAP gateway security permissions or Access Control List (ACL). In the **Gateway Monitor** (T-Code SMGW) dialog box, which shows the **secinfo** and **reginfo** files, open the **Goto** menu, and select **Expert Functions** > **External Security** > **Maintenance of ACL Files**.
53+
54+
The following permission setting is required:
5255

5356
`P TP=LOGICAPP HOST=<on-premises-gateway-server-IP-address> ACCESS=*`
5457

5558
This line has the following format:
5659

5760
`P TP=<trading-partner-identifier-(program-name)-or-*-for-all-partners> HOST=<comma-separated-list-with-external-host-IP-or-network-names-that-can-register-the-program> ACCESS=<*-for-all-permissions-or-a-comma-separated-list-of-permissions>`
5861

59-
If you don't configure the SAP gateway security permissions, you might receive this error:
62+
If you don't configure the SAP gateway security permissions, you might receive the following error:
6063

6164
`Registration of tp Microsoft.PowerBI.EnterpriseGateway from host <host-name> not allowed`
6265

6366
For more information, review [SAP Note 1850230 - GW: "Registration of tp &lt;program ID&gt; not allowed"](https://userapps.support.sap.com/sap/support/knowledge/en/1850230).
6467

6568
* Set up your SAP gateway security logging to help find Access Control List (ACL) issues. For more information, review the [SAP help topic for setting up gateway logging](https://help.sap.com/viewer/62b4de4187cb43668d15dac48fc00732/7.31.25/en-US/48b2a710ca1c3079e10000000a42189b.html).
6669

67-
* In the **Configuration of RFC Connections** (T-Code SM59) dialog box, create an RFC connection with the **TCP/IP** type. The **Activation Type** must be **Registered Server Program**. Set the RFC connection's **Communication Type with Target System** value to **Unicode**.
70+
* In the **Configuration of RFC Connections** (T-Code SM59) dialog box, create an RFC connection with the **TCP/IP** type. Make sure that the **Activation Type** is set to **Registered Server Program**. Set the RFC connection's **Communication Type with Target System** value to **Unicode**.
6871

6972
* If you use this SAP trigger with the **IDOC Format** parameter set to **FlatFile** along with the [Flat File Decode action](logic-apps-enterprise-integration-flatfile.md), you have to use the `early_terminate_optional_fields` property in your flat file schema by setting the value to `true`.
7073

7174
This requirement is necessary because the flat file IDoc data record that's sent by SAP on the tRFC call `IDOC_INBOUND_ASYNCHRONOUS` isn't padded to the full SDATA field length. Azure Logic Apps provides the flat file IDoc original data without padding as received from SAP. Also, when you combine this SAP trigger with the Flat File Decode action, the schema that's provided to the action must match.
7275

7376
> [!NOTE]
77+
>
7478
> This SAP trigger uses the same URI location to both renew and unsubscribe from a webhook subscription. The renewal
7579
> operation uses the HTTP `PATCH` method, while the unsubscribe operation uses the HTTP `DELETE` method. This behavior
7680
> might make a renewal operation appear as an unsubscribe operation in your trigger's history, but the operation is
7781
> still a renewal because the trigger uses `PATCH` as the HTTP method, not `DELETE`.
7882
83+
* The message content to send to your SAP server, such as a sample IDoc file. This content must be in XML format and include the namespace of the [SAP action](#actions) you want to use. You can [send IDocs with a flat file schema by wrapping them in an XML envelope](#send-flat-file-idocs).
84+
7985
### SAP compatibility
8086

8187
The SAP connector is compatible with the following types of SAP systems:
@@ -519,7 +525,7 @@ Next, create an action to send your IDoc message to SAP when your [Request trigg
519525
520526
![Screenshot that shows how to create SAP Message server connection.](./media/logic-apps-using-sap-connector/create-SAP-message-server-connection.png)
521527
522-
In SAP, the Logon Group is maintained by opening the **CCMS: Maintain Logon Groups** (T-Code SMLG) dialog box. For more information, review [SAP Note 26317 - Set up for LOGON group for automatic load balancing](https://service.sap.com/sap/support/notes/26317).
528+
In the SAP server, the Logon Group is maintained by opening the **CCMS: Maintain Logon Groups** (T-Code SMLG) dialog box. For more information, review [SAP Note 26317 - Set up for LOGON group for automatic load balancing](https://service.sap.com/sap/support/notes/26317).
523529
524530
By default, strong typing is used to check for invalid values by performing XML validation against the schema. This behavior can help you detect issues earlier. The **Safe Typing** option is available for backward compatibility and only checks the string length. Learn more about the [Safe Typing option](#safe-typing).
525531
@@ -1060,7 +1066,7 @@ To send IDocs from SAP to your logic app workflow, you need the following minimu
10601066

10611067
1. On the **Technical Settings** tab, for **Activation Type**, select **Registered Server Program**.
10621068

1063-
1. For your **Program ID**, enter a value. In SAP, your logic app workflow's trigger is registered by using this identifier.
1069+
1. For your **Program ID**, enter a value. In the SAP server, your logic app workflow's trigger is registered by using this identifier.
10641070

10651071
> [!IMPORTANT]
10661072
> The SAP **Program ID** is case-sensitive. Make sure you consistently use the same case format for your **Program ID**
@@ -1184,7 +1190,7 @@ For production environments, you must create two partner profiles. The first pro
11841190

11851191
1. Select **Standard Outbound Processing**.
11861192

1187-
1. To start outbound IDoc processing, select **Continue**. When processing finishes, the **IDoc sent to SAP system or external program** message appears.
1193+
1. To start outbound IDoc processing, select **Continue**. When the tool finishes processing, the **IDoc sent to SAP system or external program** message appears.
11881194

11891195
1. To check for processing errors, use the **sm58** transaction code (T-Code) with the **/n** prefix.
11901196

@@ -1877,13 +1883,13 @@ The SAP connection parameters for a logic app workflow don't have a language pro
18771883

18781884
### Confirm transaction explicitly
18791885

1880-
When you send transactions to SAP from Logic Apps, this exchange happens in two steps as described in the SAP document, [Transactional RFC Server Programs](https://help.sap.com/doc/saphelp_nwpi71/7.1/22/042ad7488911d189490000e829fbbd/content.htm?no_cache=true). By default, the **Send to SAP** action handles both the steps for the function transfer and for the transaction confirmation in a single call. The SAP connector gives you the option to decouple these steps. You can send an IDoc and rather than automatically confirm the transaction, you can use the explicit **\[IDOC] Confirm transaction ID** action.
1886+
When you send transactions to SAP from Azure Logic Apps, this exchange happens in two steps as described in the SAP document, [Transactional RFC Server Programs](https://help.sap.com/doc/saphelp_nwpi71/7.1/22/042ad7488911d189490000e829fbbd/content.htm?no_cache=true). By default, the **Send to SAP** action handles both the steps for the function transfer and for the transaction confirmation in a single call. The SAP connector gives you the option to decouple these steps. You can send an IDoc and rather than automatically confirm the transaction, you can use the explicit **\[IDOC] Confirm transaction ID** action.
18811887

1882-
This capability to decouple the transaction ID confirmation is useful when you don't want to duplicate transactions in SAP, for example, in scenarios where failures might happen due to causes such as network issues. By confirming the transaction ID separately, the transaction is only completed one time in your SAP system.
1888+
This capability to decouple the transaction ID confirmation is useful when you don't want to duplicate transactions in SAP, for example, in scenarios where failures might happen due to causes such as network issues. When the **Send to SAP** action separately confirms the transaction ID, the SAP system completes the transaction only once.
18831889
18841890
Here's an example that shows this pattern:
18851891

1886-
1. Create a blank logic app and add the Request trigger.
1892+
1. Create a blank logic app workflow, and add the Request trigger.
18871893

18881894
1. From the SAP connector, add the **\[IDOC] Send document to SAP** action. Provide the details for the IDoc that you send to your SAP system.
18891895

0 commit comments

Comments
 (0)