Logic Apps SAP connector BAPI support - going under the hood
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 (IDoc post), when you are using BAPIs with Logic Apps SAP connector, you will need an action URL to identify the BAPI such as:
https://Microsoft.LobServices.Sap/2007/03/Bapi/BUS6010/CHECK/BAPI_ACC_ACTIVITY_ALLOC_CHECK
https://Microsoft.LobServices.Sap/2007/03
is the namespace prefix for SAP uri in BizTalk & Logic Apps;/Bapi
is the node for all BAPIs (vs /Idoc, /Rfc, etc.);/BUS6010
is the Business Object upon which the BAPI acts;/CHECK
is the Method performed on the Business Object;/BAPI_ACC_ACTIVITY_ALLOC_CHECK
is the RFC backing the BAPI action.
Business Object tree for picking the BAPI is built using the response to RFC RPY_BOR_TREE_INIT (external documentation link) 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 (external documentation link) 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 .NET XmlConvert.EncodeName to ensure no illegal XML character conflicts.
We may be using SWO_QUERY_API_METHODS in the future to enable a BAPI query feature.
Comments
- Anonymous
June 20, 2019
This blog has been moved off the MSDN platform. Find further content and update at https://www.linkedin.com/today/author/daviburgComments are locked as part of the blog migration, so please reach out to your customer support contact for assistance with Microsoft products and services.