Skip to content

Commit 8c8013a

Browse files
Merge pull request #289022 from ecfan/sap
SAP - Add guidance about changing processing mode when sending IDocs from workflow to SAP
2 parents c667ed0 + bbf5b95 commit 8c8013a

File tree

2 files changed

+51
-31
lines changed

2 files changed

+51
-31
lines changed

articles/logic-apps/connectors/sap-create-example-scenario-workflows.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: daviburg
77
ms.author: daviburg
88
ms.reviewer: estfan, azla
99
ms.topic: how-to
10-
ms.date: 12/12/2023
10+
ms.date: 10/23/2024
1111
---
1212

1313
# Create workflows for common SAP integration scenarios in Azure Logic Apps
@@ -679,13 +679,6 @@ In the following example, the `STFC_CONNECTION` RFC module generates a request a
679679

680680
1. After you send your HTTP request, wait for the response from your workflow.
681681

682-
> [!NOTE]
683-
>
684-
> Your workflow might time out if all the steps required for the response don't finish within the [request timeout limit](../logic-apps-limits-and-config.md).
685-
> If this condition happens, requests might get blocked. To help you diagnose problems, learn how you can [check and monitor your logic app workflows](../monitor-logic-apps.md).
686-
687-
You've now created a workflow that can communicate with your SAP server. Now that you've set up an SAP connection for your workflow, you can try experimenting with BAPI and RFC.
688-
689682
### [Standard](#tab/standard)
690683

691684
1. If your Standard logic app resource is stopped or disabled, from your workflow, go to the logic app resource level, and select **Overview**. On the toolbar, select **Start**.
@@ -707,14 +700,21 @@ You've now created a workflow that can communicate with your SAP server. Now tha
707700

708701
1. After you send the HTTP request, wait for the response from your workflow.
709702

710-
> [!NOTE]
711-
>
712-
> Your workflow might time out if all the steps required for the response don't finish within the [request timeout limit](../logic-apps-limits-and-config.md).
713-
> If this condition happens, requests might get blocked. To help you diagnose problems, learn [how to check and monitor your logic app workflows](../monitor-logic-apps.md).
703+
---
714704

715-
You've now created a workflow that can communicate with your SAP server. Now that you've set up an SAP connection for your workflow, you can try experimenting with BAPI and RFC.
705+
You've now created a workflow that can send IDocs and communicate with your SAP server. Now that you've set up an SAP connection for your workflow, you can try experimenting with BAPI and RFC.
716706

717-
---
707+
#### Workflow timeout issues
708+
709+
Your workflow times out in any of the following scenarios:
710+
711+
- All the steps required for the response don't finish within the [request timeout limit](../logic-apps-limits-and-config.md). If this condition happens, requests might get blocked. To help you diagnose problems, learn [how to check and monitor your logic app workflows](../monitor-logic-apps.md).
712+
713+
- Your SAP system's processing mode is set to the default **Trigger immediately** setting, which causes your SAP system to block the inbound call for IDoc transmission until an IDoc finishes processing.
714+
715+
If your SAP system is under load, for example, when your workflow sends a batch of IDocs all at one time to SAP, the queued IDoc calls time out. The default processing mode causes your SAP system to block the inbound call for IDoc transmission until an IDoc finishes processing. In Azure Logic Apps, workflow actions have a 2-minute timeout, by default.
716+
717+
To resolve this problem, follow the [steps in the **Prerequisites** section that change the setting to **Trigger by background program**](sap.md#prerequisites).
718718

719719
<a name="safe-typing"></a>
720720

articles/logic-apps/connectors/sap.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: daviburg
77
ms.author: daviburg
88
ms.reviewer: estfan, azla
99
ms.topic: how-to
10-
ms.date: 04/18/2024
10+
ms.date: 10/24/2024
1111
---
1212

1313
# Connect to SAP from workflows in Azure Logic Apps
@@ -206,6 +206,23 @@ SAP upgraded their .NET connector (NCo) to version 3.1, which changed the way th
206206

207207
* 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](/connectors/sap/#actions) that you want to use. You can [send IDocs with a flat file schema by wrapping them in an XML envelope](sap-create-example-scenario-workflows.md#send-flat-file-idocs).
208208

209+
* For scenarios where you want to send IDocs from your logic app workflow to SAP, change your SAP processing mode from the default **Trigger immediately** setting to **Trigger by background program** so that your workflow doesn't time out.
210+
211+
If your SAP system is under load, for example, when your workflow sends a batch of IDocs all at one time to SAP, the queued IDoc calls time out. The default processing mode causes your SAP system to block the inbound call for IDoc transmission until an IDoc finishes processing. In Azure Logic Apps, workflow actions have a 2-minute timeout, by default.
212+
213+
To change your SAP system's processing mode, follow these steps:
214+
215+
1. In SAP, find the SAP partner profile, and open the **Partner profiles** settings. You can use the **we20** transaction code (T-Code) with the **/n** prefix.
216+
217+
1. On the **Inbound options** tab, under **Processing by Function Module**, change the setting to **Trigger by background program** from **Trigger immediately**.
218+
219+
The **Trigger by background program** setting lets the underlying IDoc transport tRFC call **`IDOC_INBOUND_ASYNCHRONOUS`** to complete immediately, rather than block the connection until the IDoc finishes processing. However, this setting works only if the IDoc doesn't include the [Express behavior overwriting segment, per SAP Support Note 1777090 - IDocs are processed immediately despite having the "Trigger by background program" option selected in WE20 - SAP for Me](https://me.sap.com/notes/0001777090).
220+
221+
For more information, see the following resources:
222+
223+
- [SAP Support Note 1845390 - Poor performance when posting IDocs with report RBDAPP01 - SAP for Me](https://me.sap.com/notes/1845390/E)
224+
- [SAP Support Note 1333417 - Performance problems when processing IDocs immediately - SAP for Me](https://me.sap.com/notes/1333417/E)
225+
209226
<a name="network-prerequisites"></a>
210227

211228
### Network connectivity prerequisites
@@ -608,9 +625,9 @@ For a Standard workflow that runs in single-tenant Azure Logic Apps, you can ena
608625

609626
<a name="test-sending-idocs-from-sap"></a>
610627

611-
### Set up and test sending IDocs to your workflow from SAP
628+
### Set up and test sending IDocs from SAP to your workflow
612629

613-
Follow these steps only for testing your SAP configuration with your logic app workflow. Production environments require additional configuration.
630+
To send IDocs from SAP to your logic app workflow, follow these steps to set up and test your SAP configuration with your logic app workflow. These steps apply only to testing as production environments require additional configuration.
614631

615632
To send IDocs from SAP to your workflow, you need the following minimum configuration:
616633

@@ -645,7 +662,7 @@ This destination identifies your logic app workflow as the receiver port.
645662
> receive the following errors in the tRFC Monitor (T-Code SM58) when you attempt to send an IDoc to SAP:
646663
>
647664
> * **Function IDOC_INBOUND_ASYNCHRONOUS not found**
648-
> * **Non-ABAP RFC client (partner type ) not supported**
665+
> * **Non-ABAP RFC client (partner type) not supported**
649666
>
650667
> For more information from SAP, review the following notes (login required):
651668
>
@@ -688,31 +705,31 @@ This destination identifies your SAP system as the sender port.
688705

689706
1. To test your connection, select **Connection Test**.
690707

691-
#### Create receiver port
708+
#### Create sender port
692709

693710
1. In SAP, open the **Ports In IDOC processing** settings. You can use the **we21** transaction code (T-Code) with the **/n** prefix.
694711

695712
1. Select **Ports** > **Transactional RFC** > **Create**.
696713

697-
1. In the settings box that opens, select **own port name**. For your test port, enter a **Name**. Save your changes.
714+
1. In the settings box that opens, select **own port name**.
698715

699-
1. In the settings for your new receiver port, for **RFC destination**, enter the identifier for [your test RFC destination](#create-rfc-destination).
716+
1. For your test port, enter a **Name** that starts with **SAP**. Save your changes.
717+
718+
All sender port names must start with the letters **SAP**, for example, **SAPTEST**.
719+
720+
1. In the settings for your new sender port, for **RFC destination**, enter the identifier for [your ABAP connection](#create-abap-connection).
700721

701722
1. Save your changes.
702723

703-
#### Create sender port
724+
#### Create receiver port
704725

705726
1. In SAP, open the **Ports In IDOC processing** settings. You can use the **we21** transaction code (T-Code) with the **/n** prefix.
706727

707728
1. Select **Ports** > **Transactional RFC** > **Create**.
708729

709-
1. In the settings box that opens, select **own port name**.
710-
711-
1. For your test port, enter a **Name** that starts with **SAP**. Save your changes.
712-
713-
All sender port names must start with the letters **SAP**, for example, **SAPTEST**.
730+
1. In the settings box that opens, select **own port name**. For your test port, enter a **Name**. Save your changes.
714731

715-
1. In the settings for your new sender port, for **RFC destination**, enter the identifier for [your ABAP connection](#create-abap-connection).
732+
1. In the settings for your new receiver port, for **RFC destination**, enter the identifier for [your test RFC destination](#create-rfc-destination).
716733

717734
1. Save your changes.
718735

@@ -732,7 +749,10 @@ This destination identifies your SAP system as the sender port.
732749

733750
#### Create partner profiles
734751

735-
For production environments, you must create two partner profiles. The first profile is for the sender, which is your organization and SAP system. The second profile is for the receiver, which is your logic app resource and workflow.
752+
For production environments, you must create the following two partner profiles:
753+
754+
- One profile for the sender, which is your organization and SAP system.
755+
- One profile for the receiver, which is your logic app resource and workflow.
736756

737757
1. In SAP, open the **Partner profiles** settings. You can use the **we20** transaction code (T-Code) with the **/n** prefix.
738758

@@ -748,7 +768,7 @@ For production environments, you must create two partner profiles. The first pro
748768

749769
1. Save your changes.
750770

751-
If you haven't [created the logical system partner](#create-logical-system-partner), you get the error, **Enter a valid partner number**.
771+
If you didn't [create the logical system partner](#create-logical-system-partner), you get the error, **Enter a valid partner number**.
752772

753773
1. In your partner profile's settings, under **Outbound parmtrs.**, select **Create outbound parameter**.
754774

@@ -960,7 +980,7 @@ You can control this tracing capability at the application level by adding the f
960980

961981
A new folder named **NCo**, or whatever folder name that you used, appears for the application setting value, **C:\home\LogFiles\NCo**, that you set earlier.
962982

963-
1. Open the **$SAP_RFC_TRACE_DIRECTORY** folder, which contains the following :
983+
1. Open the **$SAP_RFC_TRACE_DIRECTORY** folder, which contains the following files:
964984

965985
* NCo trace logs: A file named **dev_nco_rfc.log**, one or multiple files named **nco_rfc_NNNN.log**, and one or multiple files named **nco_rfc_NNNN.trc** files where **NNNN** is a thread identifier.
966986

0 commit comments

Comments
 (0)