# Receiving iDOCs from SAP in Ignition SCADA

**URL:** <https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793>\
**Category:** Ignition\
**Created:** [September 10, 2024, 12:51pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793 "2024-09-10T12:51:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aron\_Grzywaczewski](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@Aron\_Grzywaczewski](https://forum.inductiveautomation.com/u/Aron_Grzywaczewski)\
**Post date:** [September 10, 2024, 12:51pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/1 "2024-09-10T12:51:34Z")

</div>

Hi is there an existing adapter in Ignition SCADA that can receive the iDOCs from SAP?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 10, 2024, 12:56pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/2 "2024-09-10T12:56:42Z")

</div>

Nothing built in, but maybe this means something to you? [IDOC Integration from SAP to Ignition for MES Implementation - #2 by MESConsultant](https://forum.inductiveautomation.com/t/idoc-integration-from-sap-to-ignition-for-mes-implementation/91857/2)

Sounds like maybe they set up an endpoint in Ignition using the WebDev module that SAP could HTTP POST to?

---

<div class="post-metadata">

**Author:** ![MESConsultant](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@MESConsultant](https://forum.inductiveautomation.com/u/MESConsultant)\
**Post date:** [September 10, 2024, 1:16pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/3 "2024-09-10T13:16:36Z")

</div>

Yes, we used the SAP to WEBDEV to Ignition database.

---

<div class="post-metadata">

**Author:** ![Aron\_Grzywaczewski](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@Aron\_Grzywaczewski](https://forum.inductiveautomation.com/u/Aron_Grzywaczewski)\
**Post date:** [September 10, 2024, 1:16pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/4 "2024-09-10T13:16:39Z")

</div>

Yes, this sounds right, Setup WebDev module that SAP could HTTP Post to and then I could parse the XML payload in ignition and insert into database or do whatever I want with the data.

Alternative is to develop bespoke service in Visual Studio that implements interface which parses the data and saves it in the database.

---

<div class="post-metadata">

**Author:** ![Aron\_Grzywaczewski](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@Aron\_Grzywaczewski](https://forum.inductiveautomation.com/u/Aron_Grzywaczewski)\
**Post date:** [September 10, 2024, 1:17pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/5 "2024-09-10T13:17:52Z")

</div>

would you be able to provide some high level examples with the parser? Obviously not sharing any business sensitive data.

---

<div class="post-metadata">

**Author:** ![MESConsultant](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@MESConsultant](https://forum.inductiveautomation.com/u/MESConsultant)\
**Post date:** [September 10, 2024, 1:29pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/6 "2024-09-10T13:29:34Z")

</div>

Honestly, after receiving the XML, we haven’t completed the rest yet. Other tasks came up, but we aimed to do it using the Python XML library.

---

<div class="post-metadata">

**Author:** ![Noah\_Casey](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@Noah\_Casey](https://forum.inductiveautomation.com/u/Noah_Casey)\
**Post date:** [September 10, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/7 "2024-09-10T14:09:11Z")

</div>

As MESConsultant said:

> Honestly, after receiving the XML, we haven’t completed the rest yet. Other tasks came up, but we aimed to do it using the **Python XML library**.

Go this route use the Python XML library it's what we did from there I've converted data to JSON, as well as moving it into other tables.

Another note: Currently what I have through webdev is the data is received and stored as VARBINARY in a cache table with another column called process\_time a script then runs to process the XML --\> JSON/Moved to a table then process\_time is updated instead of NULL. This script helps to always keep the newest data processing and it wont reprocess older data.

When converted to JSON I use the markdown tool to display the data.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 10, 2024, 2:50pm UTC](https://forum.inductiveautomation.com/t/receiving-idocs-from-sap-in-ignition-scada/95793/8 "2024-09-10T14:50:59Z")

</div>

> [@MESConsultant](#):
>
> using the Python XML library.

You really shouldn't, especially if there's any international characters in your traffic. Use java's XML libraries instead. Some functions to get you started:

[https://www.automation-pros.com/ignition/xml.py](https://www.automation-pros.com/ignition/xml.py)
