Logic App SAP connector IDoc support - going under the hood
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, external doc link), 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 - external doc link for the version here, external doc link for the RFC), 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:
/Idocis the root node for all IDocs (vs. /Rfc, /TRfc, etc);
/3is the record types version for common segment definitions obtained via IDOC_RECORD_READ;
/DELVRY01is the IDoc type which definition will be read with IDOCTYPE_READ_COMPLETE;
/702is the SAP version release.