|
1 | 1 | ---
|
2 | 2 | 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. |
4 | 4 | services: logic-apps
|
5 | 5 | ms.suite: integration
|
6 | 6 | author: divyaswarnkar
|
7 | 7 | ms.author: divswa
|
8 | 8 | ms.reviewer: estfan, daviburg, azla
|
9 | 9 | ms.topic: how-to
|
10 |
| -ms.date: 08/22/2022 |
| 10 | +ms.date: 01/23/2023 |
11 | 11 | tags: connectors
|
12 | 12 | ---
|
13 | 13 |
|
14 | 14 | # Connect to SAP from workflows in Azure Logic Apps
|
15 | 15 |
|
16 | 16 | [!INCLUDE [logic-apps-sku-consumption](../../includes/logic-apps-sku-consumption.md)]
|
17 | 17 |
|
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/). |
19 | 19 |
|
20 | 20 | ## Prerequisites
|
21 | 21 |
|
22 | 22 | * 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).
|
23 | 23 |
|
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. |
25 | 25 |
|
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. |
27 | 27 |
|
28 | 28 | * If you're running your logic app workflow in multi-tenant Azure, review the [multi-tenant prerequisites](#multi-tenant-azure-prerequisites).
|
29 | 29 |
|
30 | 30 | * 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).
|
31 | 31 |
|
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. |
33 | 33 |
|
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: |
46 | 41 |
|
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` | |
48 | 49 |
|
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: |
50 | 51 |
|
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: |
52 | 55 |
|
53 | 56 | `P TP=LOGICAPP HOST=<on-premises-gateway-server-IP-address> ACCESS=*`
|
54 | 57 |
|
55 | 58 | This line has the following format:
|
56 | 59 |
|
57 | 60 | `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>`
|
58 | 61 |
|
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: |
60 | 63 |
|
61 | 64 | `Registration of tp Microsoft.PowerBI.EnterpriseGateway from host <host-name> not allowed`
|
62 | 65 |
|
63 | 66 | For more information, review [SAP Note 1850230 - GW: "Registration of tp <program ID> not allowed"](https://userapps.support.sap.com/sap/support/knowledge/en/1850230).
|
64 | 67 |
|
65 | 68 | * 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).
|
66 | 69 |
|
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**. |
68 | 71 |
|
69 | 72 | * 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`.
|
70 | 73 |
|
71 | 74 | 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.
|
72 | 75 |
|
73 | 76 | > [!NOTE]
|
| 77 | + > |
74 | 78 | > This SAP trigger uses the same URI location to both renew and unsubscribe from a webhook subscription. The renewal
|
75 | 79 | > operation uses the HTTP `PATCH` method, while the unsubscribe operation uses the HTTP `DELETE` method. This behavior
|
76 | 80 | > might make a renewal operation appear as an unsubscribe operation in your trigger's history, but the operation is
|
77 | 81 | > still a renewal because the trigger uses `PATCH` as the HTTP method, not `DELETE`.
|
78 | 82 |
|
| 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 | + |
79 | 85 | ### SAP compatibility
|
80 | 86 |
|
81 | 87 | 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
|
519 | 525 |
|
520 | 526 | 
|
521 | 527 |
|
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). |
523 | 529 |
|
524 | 530 | 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).
|
525 | 531 |
|
@@ -1060,7 +1066,7 @@ To send IDocs from SAP to your logic app workflow, you need the following minimu
|
1060 | 1066 |
|
1061 | 1067 | 1. On the **Technical Settings** tab, for **Activation Type**, select **Registered Server Program**.
|
1062 | 1068 |
|
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. |
1064 | 1070 |
|
1065 | 1071 | > [!IMPORTANT]
|
1066 | 1072 | > 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
|
1184 | 1190 |
|
1185 | 1191 | 1. Select **Standard Outbound Processing**.
|
1186 | 1192 |
|
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. |
1188 | 1194 |
|
1189 | 1195 | 1. To check for processing errors, use the **sm58** transaction code (T-Code) with the **/n** prefix.
|
1190 | 1196 |
|
@@ -1877,13 +1883,13 @@ The SAP connection parameters for a logic app workflow don't have a language pro
|
1877 | 1883 |
|
1878 | 1884 | ### Confirm transaction explicitly
|
1879 | 1885 |
|
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. |
1881 | 1887 |
|
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. |
1883 | 1889 |
|
1884 | 1890 | Here's an example that shows this pattern:
|
1885 | 1891 |
|
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. |
1887 | 1893 |
|
1888 | 1894 | 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.
|
1889 | 1895 |
|
|
0 commit comments