<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>David Burg's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/david_burgs_blog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/feed.xml</link>
    <description>Azure Logic App engineering and Enterprise Integration in the Cloud</description>
    <lastBuildDate>Thu, 20 Jun 2019 17:56:03 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>This blog has moved</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/this-blog-has-moved</link>
      <pubDate>Thu, 20 Jun 2019 10:39:15 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=2155</guid>
      <description><![CDATA[The date has finally come for the move of this dev blog off the MSDN platform. After considering...]]></description>
      <content:encoded><![CDATA[The date has finally come for the move of this dev blog off the MSDN platform. After considering several options, I am moving to LinkedIn articles for sharing future updates about Azure, Logic Apps, BizTalk, B2B integration, iPaaS, XML, SAP, Flat File, .NET, APIM, Azure Functions, etc... Please go in the future to https://www.linkedin.com/today/author/daviburg

Some of the blog content I am re-posting as article with updates to LinkedIn. Most of the content has not been re-posted yet remains here in a read-only archive format. Comments are also been locked as part of the blog migration, so please reach out to your customer support contact for assistance with Microsoft products and services.

I would like to thank the over 2 500 users visiting this blog over the past month and hope to find them again at the new location.

You can find further information about the migration of dev blogs from MSDN Services Status Twitter account:

https://twitter.com/MSDNService/status/1116801471008296960

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Large request upcoming support for Azure Logic App SAP Connector</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/large-request-upcoming-support-for-azure-logic-app-sap-connector</link>
      <pubDate>Fri, 10 May 2019 10:19:33 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=2095</guid>
      <description><![CDATA[I've completed the development work for the support of large requests in Azure Logic App SAP...]]></description>
      <content:encoded><![CDATA[I've completed the development work for the support of large requests in Azure Logic App SAP Connector. With this upcoming new feature, users will be able to send requests to SAP and the On-Premises Data Gateway via an Azure Storage Blob SAS URI like this:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/Annotation-2019-05-06-142558.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/Annotation-2019-05-06-142558.png" alt="" width="630" height="424" class="alignnone size-full wp-image-2105" /></a>

Please note that the Blob itself and its SAS URI need to be generated prior to calling this SAP Connector Send API. Luckily, we have <a href="https://docs.microsoft.com/en-us/connectors/azureblob/">native Azure Storage Blob connector</a> available to do this directly the Logic App.

Furthermore to make the contract explicit, an advanced parameter for Content-Type will be added:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/Content-type.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/Content-type.png" alt="" width="621" height="356" class="alignnone size-full wp-image-2115" /></a>

The content type for sending requests via Blob should be set to <code>text/uri-list</code>:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/test-uri-list.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/test-uri-list.png" alt="" width="613" height="308" class="alignnone size-full wp-image-2125" /></a>

In-line request payloads are supported up to 2.5 MB. For classic in-line XML payload, the content type should be set to <code>application/xml</code>:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/XML-type.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/XML-type.png" alt="" width="578" height="59" class="alignnone size-full wp-image-2135" /></a>

However to preserve backward compatibility, the default assigned content type of <code>text/plain</code> will also be supported for either of classic in-line XML payload or the new request payload via storage blob SAS URI. I recommend setting the content type explicitly to avoid ambiguity in your requests.

Do note that the On-Premises Data Gateway will be updated in the future to include the matching SAP Adapter code to handle the new request format, download the request payload from the Azure Storage blob and forward the request to SAP. (This update is not available at the time this blob post is been written).]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting SAP configuration for Azure Logic App SAP trigger</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/troubleshooting-sap-configuration-for-azure-logic-app-sap-trigger</link>
      <pubDate>Thu, 09 May 2019 12:40:32 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1965</guid>
      <description><![CDATA[When you create a Logic App with the SAP connector trigger "When a message is received from SAP",...]]></description>
      <content:encoded><![CDATA[When you create a Logic App with the SAP connector trigger "When a message is received from SAP", the configuration of SAP is non-trivial, especially for engineers not familiar with SAP.

The first step is to create the connection itself. As you add for the first time either a trigger or an action from the SAP connector it will prompt you to create a connection, which if you don't all the connection parameters quite right may fail. In case you do not get all the error details in the Logic App Designer, enable network tracing under the F12 debugging tools of your internet browser (<a href="https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide/network">details for Edge network tracing here</a>, <a href="https://developers.google.com/web/tools/chrome-devtools/network/">details for Chrome network tracing here</a>). Reproduce the connection creation failure and look for an HTTP call failure, look then at the response payload for that failure. You might find there for instance a failure to locate assembly SAP .NCo, and need to follow <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-using-sap-connector#prerequisites">prerequisite step of download and install the latest SAP client library</a>.

You will need from SAP the program id to which you will register your RFC Server, aka tp partner in SAP terminology. If you don't have one already, create a new TCP/IP type connection in SM59 opcode (Configuration of RFC Connections) of the SAP Logon GUI.

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/Configuration-of-RFC-connections.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/Configuration-of-RFC-connections.png" alt="" width="743" height="478" class="alignnone wp-image-1975 size-full" /></a>

The activation type for that new destination must be "Registered Server Program".

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/RFC-destination.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/RFC-destination.png" alt="" width="705" height="715" class="alignnone wp-image-1985 size-full" /></a>

When you use the SAP built-in "Connection Test" for that RFC connection prior to creating the Logic App with the SAP trigger, you should get an error "Program ID not registered". This is also the error you get if you disable or delete the Logic App later.

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/TP-program-id-not-registered.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/TP-program-id-not-registered.png" alt="" width="736" height="600" class="alignnone size-full wp-image-1995" /></a>

Then you enter the required details of your registration in the Logic App SAP trigger - SAP gateway host, service name or port, program id. Optionally you may provide a filter array of SAP action URIs so only specific RFC/BAPI/IDOC calls are sent to your Logic App. Once you save your new Logic App with its trigger, the RFC Server registration will happen.

As you save the Logic App the trigger registration call is asynchronous. So you need to look at the trigger history (under the Logic App Summary Evaluation) to confirm it was successful.

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/See-Trigger-history.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/See-Trigger-history.png" alt="" width="354" height="248" class="alignnone size-full wp-image-2015" /></a>

This is an example with a failed registration, that was followed by a successful registration, followed by a successful call by SAP of Logic Apps (the entry tagged 'Fired').

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/trigger-history.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/trigger-history.png" alt="" width="542" height="118" class="alignnone size-full wp-image-2005" /></a>

Here is the input details of a subscribe call for a new trigger:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/subscribe-input-details.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/subscribe-input-details.png" alt="" width="394" height="367" class="alignnone size-full wp-image-2055" /></a>

You may have succeeded saving the Logic App itself because the connection and parameters were valid as far as Logic App can assert, but the asynchronous registration may fail, which Logic App designer doesn't know.

Here for instance the On-Premises Data Gateway was not connected to the VPN on which the SAP system resides, so the registration call timed out on failure to reach the IP address:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/subscribe-failure-details-timeout.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/subscribe-failure-details-timeout.png" alt="" width="515" height="324" class="alignnone size-full wp-image-2025" /></a>

Then connecting the OPDG to the SAP VPN, the registration succeeded. Note the specific response code 'Created', indicating that the OPDG did not have such SAP webhook registered before and created it accordingly:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/subscribe-success-details.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/subscribe-success-details.png" alt="" width="338" height="139" class="alignnone size-full wp-image-2035" /></a>

Note also the renewal internal of 5 minutes. This is to ensure that if the OPDG malfunctions for some reason, such as event of the hosting machine restarting, the webhook registration is repaired within 5 minutes of the OPDG coming back online. If you have an high availability setup of the OPDG, the fail-over OPDG will receive the renewal notice and realizing the webhook is not in its list will create it again. Here is an example respond for a renewal when the registration was already active (no call made to SAP in this case), note how the response code is different, 'OK' and not 'Created':

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/renewal-success.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/renewal-success.png" alt="" width="284" height="163" class="alignnone size-full wp-image-2045" /></a>

In case you are troubleshooting your OPDG, have restarted the machine or the service and want to test the subscription call immediately, you can disable and re-enable the Logic App with the SAP trigger to force the immediate call to subscribe.

Now with the Logic App registered as RFC Server on the given program ID, you can return to SAP Logon GUI and test the connection successfully:

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/connection-test-success.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/connection-test-success.png" alt="" width="513" height="405" class="alignnone size-full wp-image-2065" /></a>

You can then proceed for a more thorough test by calling an actual RFC in SE37, Function Module op code. Don't forget to provide the matching Program ID as RFC target system. A good start is STFC_CONNECTION. See details of that in earlier post about <a href="https://blogs.msdn.microsoft.com/david_burgs_blog/2019/04/17/responding-back-to-sap-from-logic-app/">responding back to SAP</a>.

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/success.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/success.png" alt="" width="656" height="436" class="alignnone size-full wp-image-2075" /></a>

Now sometimes the trigger registration by Logic App succeed and yet the SAP connection test still fails. You may be able to locate with the help of a SAP BASIS engineer error in the SAP Gateway logs such as:

LOCATION    SAP-Gateway on host

SAP*****.*****.cloudapp.

net / sapgw00

ERROR       registration of tp DAVIBURG-P722 from host ??? not allowed

TIME        Tue May 07 18:49:57 2019

RELEASE     753

COMPONENT   SAP-Gateway

VERSION     2

RC          720

&nbsp;

MODULE      D:/depot/bas/753_REL/src/krn/si/gw/gwxxrd.c

LINE        4184

COUNTER     900142

A couple of configuration aspects of SAP should be investigated in such case, starting with the SAP gateway security parameters. Please refer to the SAP documentation <a href="https://help.sap.com/doc/saphelp_nw73/7.3.16/en-US/48/ad5b358bc96744e10000000a421937/content.htm?no_cache=true">https://help.sap.com/doc/saphelp_nw73/7.3.16/en-US/48/ad5b358bc96744e10000000a421937/content.htm?no_cache=true</a>

Also, the SAP user account you are using to connect to SAP must be allowed to register as RFC Server. The user account may have for instance the role SAP_BC_AI_LANDSCAPE_DB_RFC to authorize this. This can be configured in either of SU01 (single user) or SU10 (bulk edit of users).

<a href="https://msdnshared.blob.core.windows.net/media/2019/05/SAP-role-assignment.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/05/SAP-role-assignment.png" alt="" width="741" height="398" class="alignnone size-full wp-image-2085" /></a>]]></content:encoded>
    </item>
    <item>
      <title>SAP Connector update, Gateway update release, SNC support, Strong/Safe Type</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/sap-connector-ga-gateway-update-release-snc-support-strong-safe-type</link>
      <pubDate>Fri, 03 May 2019 16:52:20 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1955</guid>
      <description><![CDATA[Wow, what a day!

An update to the On-Premises Data Gateway containing many improvements for SAP...]]></description>
      <content:encoded><![CDATA[Wow, what a day!

An update to the On-Premises Data Gateway containing many improvements for SAP Connector for Azure Logic Apps is now live at:

<a href="https://www.microsoft.com/en-us/download/details.aspx?id=53127">https://www.microsoft.com/en-us/download/details.aspx?id=53127</a>

Furthermore we are deploying the update to the SAP Connector at this moment. We expect the deployment to reach all regions by early next week.

Then, with the combination of both these updates you have now support for Kerberos-based SNC (Secured Network Communication).

Also included the availability of Strong Typing vs "Safe" Typing, as described in <a href="https://blogs.msdn.microsoft.com/david_burgs_blog/2019/03/29/continued-strongly-typed-date-time-and-numerical-fields-from-sap-dats-tims-and-numc-support-in-azure-logic-apps-sap-connector/">earlier posts in this blog</a>.

We've improved the error response model of the connector to follow <a href="https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses">error condition response</a>. Please note that the gateway update works in concert with the connector update for that, for the gateway will generate the specific exception details which the connector will use to fill the content of the error response.

Also included the improvement to error response from Logic Apps to SAP described in <a href="https://blogs.msdn.microsoft.com/david_burgs_blog/2019/04/16/new-logic-app-connector-error-responses-to-sap/">earlier post</a>.]]></content:encoded>
    </item>
    <item>
      <title>Responding back to SAP from Logic App</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/responding-back-to-sap-from-logic-app</link>
      <pubDate>Wed, 17 Apr 2019 13:06:40 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1875</guid>
      <description><![CDATA[So you've registered SAP as a trigger in Azure Logic Apps, enabling SAP to call it as for any other...]]></description>
      <content:encoded><![CDATA[So you've registered SAP as a trigger in Azure Logic Apps, enabling SAP to call it as for any other RFC. But how do you parse the SAP request and respond back to it with actual content and not just a vanilla OK?

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/Receiving-from-SAP.jpg"><img width="1024" height="945" class="alignnone size-large wp-image-1885" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/Receiving-from-SAP-1024x945.jpg" /></a>

If you enable the support for multiple RFCs by your Logic App for SAP to call, you need to arrange your logic by Action Uri, that trigger output json parameter which will contain which RFC got call by SAP. For this example we'll just consider a single RFC as a simplification - STFC_CONNECTION. The trigger has been configured for this one only, using the trigger input parameter action URI which causes the SAP Adapter in the On-Premises Data Gateway to act as a filter rejecting calls to other RFCs by SAP. [You can see an example of that in the summary picture at the bottom of this post.]

The next step is to get the XML payload of the SAP RFC call. This is in the trigger output Content parameter <code>@triggerBody()?['Content']</code>, but natively as a string (because Json doesn't have a type for XML). So you want to cast the type to XML with <code>@xml(triggerBody()?['Content'])</code>.
Now Logic App knows this is XML as visible in the designer run history view:

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/extract-the-xml-content.jpg"><img width="1024" height="556" class="alignnone size-large wp-image-1905" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/extract-the-xml-content-1024x556.jpg" /></a>

To manipulate the XML we can use the X-PATH native support, and here we'll extract the SAP RFC STFC_CONNECTION request text value with <code>@{xpath(xml(triggerBody()?['Content']),'string(/*[local-name()=\"STFC_CONNECTION\"]/*[local-name()=\"REQUTEXT\"])')}</code>

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/xpath-to-the-value.jpg"><img width="1024" height="569" class="alignnone size-large wp-image-1915" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/xpath-to-the-value-1024x569.jpg" /></a>

Now we can use this extracted value to form a dynamic response to SAP with <code>@{variables('REQUTEXTValue')}</code>, such as in <code>&lt;STFC_CONNECTIONResponse xmlns=\"https://Microsoft.LobServices.Sap/2007/03/Rfc/\"&gt;&lt;ECHOTEXT&gt;@{variables('REQUTEXTValue')}&lt;/ECHOTEXT&gt;&lt;RESPTEXT&gt;Received&lt;/RESPTEXT&gt;&lt;/STFC_CONNECTIONResponse&gt;</code>

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/response-run.jpg"><img width="1024" height="909" class="alignnone size-large wp-image-1935" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/response-run-1024x909.jpg" /></a>

Calling from SAP Logon we can see the dynamic echo response:

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/SAP-Logon-echo-response.jpg"><img width="914" height="928" class="alignnone size-full wp-image-1895" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/SAP-Logon-echo-response.jpg" /></a>

For a more complete manipulation of the input request, consider converting the request XML to Json (<a href="https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#json">https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#json</a>) or transforming the XML with XSLT (<a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-enterprise-integration-maps">https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-enterprise-integration-maps</a>).

Here is the designer view for this whole Logic App:

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/whole-logic-app-for-response.jpg"><img width="644" height="1024" class="alignnone size-large wp-image-1925" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/whole-logic-app-for-response-644x1024.jpg" /></a>]]></content:encoded>
    </item>
    <item>
      <title>New Logic App connector error responses to SAP</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/new-logic-app-connector-error-responses-to-sap</link>
      <pubDate>Tue, 16 Apr 2019 14:28:17 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1825</guid>
      <description><![CDATA[The next update to On-Premises Data Gateway SAP Adapter component for Azure Logic Apps SAP connector...]]></description>
      <content:encoded><![CDATA[The next update to On-Premises Data Gateway SAP Adapter component for Azure Logic Apps SAP connector will include implementation of error condition translation to ABAP exception or BAPI return depending of what is available in the invoked RFC metadata. This will come in use when using the SAP trigger of the connector (when a message is received from SAP - <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-using-sap-connector#receive-from-sap">https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-using-sap-connector#receive-from-sap</a>) and an error condition is met, such as the RFC is excluded per the user provided SAP Action filter array, such as when the response XML payload is not valid, etc.

For basic RFCs where no BAPI return is available, an ABAP exception will be raised. This will be the case for <span>STFC_CONNECTION</span> and alike RFCs.

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/Annotation-2019-04-04-164826.jpg"><img width="1024" height="657" class="alignnone size-large wp-image-1835" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/Annotation-2019-04-04-164826-1024x657.jpg" /></a>

For RFCs with BAPI return, both SAP TABLE and STRUCTURE types (table and export directions) will be supported, for all of BAPIRETURN, BAPIRET1 and BAPIRET2 types.

<span>BAPI_PO_GETITEMS</span> is an example of RFC using <span>BAPIRETURN type table. </span>

<span>APAR_EBPP_BALANCES <span style="float: none;background-color: #ffffff;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">is an example of RFC </span>using BAPIRET1 type export structure.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/BAPI-return-structure.jpg"><img width="1024" height="576" class="alignnone size-large wp-image-1845" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/BAPI-return-structure-1024x576.jpg" /></a>

<span> 1119_getdetail is an example of RFC using BAPIRET2 type table. In the SAP Logon GUI you need to open the returned table to see the response details:</span>

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/BAPI-return-table-part-1.jpg"><img width="683" height="1024" class="alignnone size-large wp-image-1855" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/BAPI-return-table-part-1-683x1024.jpg" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/BAPI-return-table-part-2.jpg"><img width="1024" height="216" class="alignnone size-large wp-image-1865" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/BAPI-return-table-part-2-1024x216.jpg" /></a>

When the error response is not sufficient to determine the issue, refer to the SAP extended logs for the , which you can enable per the new SAP log file section of earlier blog post <a href="https://blogs.msdn.microsoft.com/david_burgs_blog/2018/08/15/new-extended-log-file-for-sap-connector-in-on-premises-data-gateway-coming-in-september/">https://blogs.msdn.microsoft.com/david_burgs_blog/2018/08/15/new-extended-log-file-for-sap-connector-in-on-premises-data-gateway-coming-in-september/</a>.]]></content:encoded>
    </item>
    <item>
      <title>SAP Type handling connection parameter</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/sap-type-handling-connection-parameter</link>
      <pubDate>Wed, 03 Apr 2019 11:52:11 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1795</guid>
      <description><![CDATA[From our internal testing, the new connection parameter (Safe Typing check-box):



The change...]]></description>
      <content:encoded><![CDATA[From our internal testing, the new connection parameter (Safe Typing check-box):

<a href="https://msdnshared.blob.core.windows.net/media/2019/04/Connection-Typing-parameter.jpg"><img width="800" height="503" class="alignnone wp-image-1815" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/04/Connection-Typing-parameter-1024x644.jpg" /></a>

The change is about to merge to our master branch for deployment in the following days. The update to the connector in the cloud will work in pair with a pending update to the On-Premises Data Gateway, while remaining backward compatible with current version of the gateway.]]></content:encoded>
    </item>
    <item>
      <title>Continued: Strongly typed date, time and numerical fields from SAP DATS, TIMS and NUMC support in Azure Logic Apps SAP connector</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/continued-strongly-typed-date-time-and-numerical-fields-from-sap-dats-tims-and-numc-support-in-azure-logic-apps-sap-connector</link>
      <pubDate>Fri, 29 Mar 2019 17:06:30 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1785</guid>
      <description><![CDATA[We're about to release the type handling improvements for Azure Logic App SAP connector previously...]]></description>
      <content:encoded><![CDATA[We're about to release the type handling improvements for Azure Logic App SAP connector <a href="https://blogs.msdn.microsoft.com/david_burgs_blog/2018/08/28/strongly-typed-date-and-time-fields-for-sap-connector-and-numc-fields/">previously announced here</a>.

The connection will have a new Boolean (true-false) parameter “SafeTyping”, enabling to treat DATS and TIMS as string rather than their XML equivalents xs:date and xs:time (where xmlns:xs="https://www.w3.org/2001/XMLSchema"). This is an opt-in behavior as we encourage our user to use strong types for early detection of issues. BizTalk Server users will recognize the name but be aware this only applies to date and time, not to NUMC as per earlier note we are handling NUMC as text value and not attempting to coerce them into integers.
<pre>     "SafeTyping": {
       "type": "bool",
       "uiDefinition": {
         "displayName": "Safe Typing",
         "description": "Use strong types if false, otherwise use string as safe type.",
         "tooltip": "Enables safe typing, which treats types as string instead of strong types (e.g. Date, Time, Datetime), relaxing type and value validations.",
         "constraints": {
...
           "required": "false",
...
         }
       },
       "defaultValue": "false"

     }</pre>
&nbsp;

This parameter will affect the behavior of all of schema generation, send message (both the payload been sent and the response been received) and trigger.

&nbsp;

For schema, with “SafeTyping” enabled, the DATS and TIMS SAP types will map to XML string fields with length restrictions only, like this:
<pre>     &lt;xs:element minOccurs="0" maxOccurs="1" name="UPDDAT" nillable="true"&gt;
       &lt;xs:simpleType&gt;
         &lt;xs:restriction base="xs:string"&gt;
           &lt;xs:maxLength value="8" /&gt;
         &lt;/xs:restriction&gt;
       &lt;/xs:simpleType&gt;
     &lt;/xs:element&gt;
     &lt;xs:element minOccurs="0" maxOccurs="1" name="UPDTIM" nillable="true"&gt;
       &lt;xs:simpleType&gt;
         &lt;xs:restriction base="xs:string"&gt;
           &lt;xs:maxLength value="6" /&gt;
         &lt;/xs:restriction&gt;
       &lt;/xs:simpleType&gt;
     &lt;/xs:element&gt;</pre>
With strong typing (default of “SafeTyping” false), DATS and TIMS will map to the more straightforward XML types:

&lt;xs:element minOccurs="0" maxOccurs="1" name="UPDDAT" nillable="true" type="xs:date" /&gt;

&lt;xs:element minOccurs="0" maxOccurs="1" name="UPDTIM" nillable="true" type="xs:time" /&gt;

&nbsp;

Then for sending messages, SAP DATS and TIMS response with “SafeTyping” enabled will look like this:

&lt;DATE&gt;99991231&lt;/DATE&gt;

&lt;TIME&gt;235959&lt;/TIME&gt;

With strong typing (default of “SafeTyping” false), DATS and TIMS will comply to matching XML type format:

&lt;DATE&gt;9999-12-31&lt;/DATE&gt;

&lt;TIME&gt;23:59:59&lt;/TIME&gt;

See <a href="https://www.w3schools.com/XML/schema_dtypes_date.asp">https://www.w3schools.com/XML/schema_dtypes_date.asp</a> for reference.

&nbsp;

Samples for minimum values

&lt;DATE&gt;00010101&lt;/DATE&gt;

&lt;TIME&gt;000000&lt;/TIME&gt;

vs

&lt;DATE&gt;0001-01-01&lt;/DATE&gt;

&lt;TIME&gt;00:00:00&lt;/TIME&gt;

&nbsp;

Of interest is the default value by SAP for these fields when the fields are not null:

&lt;DATE&gt;00000000&lt;/DATE&gt;

&lt;TIME&gt;000000&lt;/TIME&gt;

vs

&lt;DATE d2p1:nil="true" xmlns:d2p1="https://www.w3.org/2001/XMLSchema-instance"&gt;&lt;/DATE&gt;

&lt;TIME&gt;00:00:00&lt;/TIME&gt;

Our strong type handling here maps SAP’s default date of 000000000 to XML nil because XML does not allow year, month or date value of 0 and does not have a special initial value other than nil equivalent to SAP’s all zeroes. TIMS SAP default of 000000 is a valid XML time value of 00:00:00.

The same applies when SAP has all spaces stored in the DATS – TIMS fields, XML time will come up as 00:00:00 but date will be nill.

&nbsp;

Note that for NUMC fields the original 0s from SAP will be preserved and no trimming will occur. E.g.:

&lt;AGMT_ITEM&gt;0&lt;/AGMT_ITEM&gt;

Will be now:

&lt;AGMT_ITEM&gt;00000&lt;/AGMT_ITEM&gt;

&nbsp;

Also we had a bug not translating the SAP null values to XML nil. We use to generate empty string values like this:

&lt;ADDR_NO xmlns="https://Microsoft.LobServices.Sap/2007/03/Types/Rfc/"&gt;&lt;/ADDR_NO&gt;

&lt;FORMOFADDR xmlns="https://Microsoft.LobServices.Sap/2007/03/Types/Rfc/"&gt;&lt;/FORMOFADDR&gt;

Which will now be corrected to:

&lt;ADDR_NO d3p1:nil="true" xmlns:d3p1="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://Microsoft.LobServices.Sap/2007/03/Types/Rfc/"&gt;&lt;/ADDR_NO&gt;

&lt;FORMOFADDR d3p1:nil="true" xmlns:d3p1="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://Microsoft.LobServices.Sap/2007/03/Types/Rfc/"&gt;&lt;/FORMOFADDR&gt;

Allowing to distinguish between empty string and null values.]]></content:encoded>
    </item>
    <item>
      <title>Logic Apps SAP connector BAPI support - going under the hood</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/logic-apps-sap-connector-bapi-support-going-under-the-hood</link>
      <pubDate>Wed, 06 Mar 2019 10:54:59 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1765</guid>
      <description><![CDATA[In the series of posts about Logic Apps SAP connector I am talking today about some details of the...]]></description>
      <content:encoded><![CDATA[In the series of posts about Logic Apps SAP connector I am talking today about some details of the implementation for the support of BAPIs.

Similar to my recent post on IDoc action url and schema generation (<a href="https://blogs.msdn.microsoft.com/david_burgs_blog/2019/03/04/logic-app-sap-connector-idoc-support-going-under-the-hood/">IDoc post</a>), when you are using BAPIs with Logic Apps SAP connector, you will need an action URL to identify the BAPI such as:

<code>https://Microsoft.LobServices.Sap/2007/03/Bapi/BUS6010/CHECK/BAPI_ACC_ACTIVITY_ALLOC_CHECK</code>
<ul>
 	<li><code>https://Microsoft.LobServices.Sap/2007/03</code> is the namespace prefix for SAP uri in BizTalk &amp; Logic Apps;</li>
 	<li><code>/Bapi</code> is the node for all BAPIs (vs /Idoc, /Rfc, etc.);</li>
 	<li><code>/BUS6010</code> is the Business Object upon which the BAPI acts;</li>
 	<li><code>/CHECK</code> is the Method performed on the Business Object;</li>
 	<li><code>/BAPI_ACC_ACTIVITY_ALLOC_CHECK</code> is the RFC backing the BAPI action.</li>
</ul>
Business Object tree for picking the BAPI is built using the response to RFC RPY_BOR_TREE_INIT (<a href="https://www.sapdatasheet.org/abap/func/RPY_BOR_TREE_INIT.html">external documentation link</a>) with no input filter, looking at the output table BOR_TREE. SHORT_TEXT field is used for the names of sections and objects. A section is any row which CHILD field value is non-zero. You can use the PARENT field for a given Business Object if you need help figuring out which node it will show under in the picker UI of Logic Apps Designer.

Method will be queried using RFC SWO_QUERY_METHODS (<a href="https://www.sapdatasheet.org/abap/func/swo_query_methods.html">external documentation link</a>) with the Business Object passed as value for the input parameter OBJTYPE and X value for input parameter TEXT to get the text output as well. The returned INFO table will be read, filtered to ABAPTYPE F only. The field METHOD contains the Method name we will use. This same response will provide the backing RFC name in the field ABAPNAME.

Note that Business Object name, Method name and RFC name are all passed through <a href="https://docs.microsoft.com/en-us/dotnet/api/system.xml.xmlconvert.encodename?view=netframework-4.7.2">.NET XmlConvert.EncodeName</a> to ensure no illegal XML character conflicts.

We may be using SWO_QUERY_API_METHODS in the future to enable a BAPI query feature.]]></content:encoded>
    </item>
    <item>
      <title>Logic App SAP connector IDoc support - going under the hood</title>
      <link>https://docs.microsoft.com/archive/blogs/david_burgs_blog/logic-app-sap-connector-idoc-support-going-under-the-hood</link>
      <pubDate>Mon, 04 Mar 2019 21:52:46 GMT</pubDate>
      <dc:creator><![CDATA[David Burg]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/david_burgs_blog/?p=1755</guid>
      <description><![CDATA[While working on a customer inquiry, I recently investigated the details of our logic for IDoc...]]></description>
      <content:encoded><![CDATA[While working on a customer inquiry, I recently investigated the details of our logic for IDoc support, including browsing which are available in the SAP system, forming the hierarchical view to pick an action URL from and generating the metadata / XML schema for the request-response payload. The following details are not a public contract, rather insights as to the current implementation which may help the readers in their use of the connector and troubleshooting of possible issue. These details are subject to change as we work on performance or functional improvements, while the external interface would remain the same.

Programmatically the SAP Adapter for Logic Apps SAP connector is using RFC IDOCTYPES_FOR_MESTYPE_READ (gets the list of IDoc types, filter criteria * i.e. wildcard for all, <a href="https://www.sapdatasheet.org/abap/func/idoctypes_for_mestype_read.html">external doc link</a>), IDOCTYPES_LIST_WITH_MESSAGES (a bit strange way we are getting the SAP version release list, e.g. 700, 720, …), IDOC_RECORD_READ (gets the control segments and more by IDoc record types version, e.g. 2 or 3 - <a href="https://www.sapdatasheet.org/abap/tabl/edi_verrec-version.html">external doc link for the version here</a>, <a href="https://www.sapdatasheet.org/abap/func/idoc_record_read.html">external doc link for the RFC</a>), IDOCTYPE_READ_COMPLETE (gets the specific idoc e.g. DELVRY01, ACC_DOCUMENT03) which can then be reproduced in SAP GUI using SE37 (Function Builder) F8 Test Function Module.

When you look at an action URL for an XML request message sent to or received from SAP via the connector, like this:

<code>https://Microsoft.LobServices.Sap/2007/03/Idoc/3/DELVRY01//702/Send</code>
<ul>
 	<li><code>/Idoc</code> is the root node for all IDocs (vs. /Rfc, /TRfc, etc);</li>
 	<li><code>/3</code> is the record types version for common segment definitions obtained via IDOC_RECORD_READ;</li>
 	<li><code>/DELVRY01</code> is the IDoc type which definition will be read with IDOCTYPE_READ_COMPLETE;</li>
 	<li><code>/702</code> is the SAP version release.</li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>