Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
prabhu_s2
Active Contributor
Recently I came across an issue with use of Query parameters in Open connectors adapter and decided to write a quick blog post on it. There are few QA threads about the issue in using query parameters but without a resolution note. The blog is focused on an alternate approach to the adapter type "Open connector" - specifically when use of Query parameters.

There are numerous blogs and documents available on Open connectors and its use, hence a quick introduction on Open connectors .

About Open Connectors


Open connectors are services that provides connectivity to third party apps directly from SAP eco-system. It simplifies and accelerates the connectivity to applications using harmonized RESTful APIs. The Open Connectors API services offers pre-built connectors to extensive libraries of over 160 non-SAP cloud applications. Further the pre-built connectors, we can create resources, defining the structure of the request and response payloads and calling the APIs in a harmonized way from any of the SAP products/applications.

Open connector tenant view



 

SAP offers the adapter/Connector type "Open Connector" in the integration platform [CPI/HCI]  to connect to the number of resources.

For more in-depth details on Open connectors please follow the link

Before I get into the details, here is a swagger view of one of the  resource "Incidents" in the connector "ServiceNow"

 



The method GET for the resource "Incidents" responds back the incidents  details. But if a search expression is required to limit the extract or to look for specific objects, we can still use the "where" option. Through this a standalone test is run on the resources offered by the connectors.

The issue - Using Query parameter in CPI adapter type "Open Connector"


ServiceNow is one of the service /connector available in Open connectors. I'm using this service to extract the incident details for building a productivity report. The swagger view for ServiceNow provides option to query the APIs. Through this option we can test the resources of the available services. In my case, using resource 'Incidents' of the service 'ServiceNow'.

Now using CPI, the query parameter in the adapter type "Open Connector" comes handy to limit the extract or look for specific records/incidents- a feature pretty straight forward that supports the Swagger option "where" .

 



Depending on projects and requirements, there are needs to enable the search not just by hardcoding the where clause but enable the dynamic search patterns. In my case, I need to have dynamics query parameter based on the message payload.



But the following error is logged at runtime [when the query parameters are enabled]:

 
com.sap.it.rt.adapter.openconnectors.exceptions.OpenConnectorsException: Invalid Query Parameters Supplied

 

Using search pattern via properties seems not supported at the moment. Defining variable values in the following ${property.value1} or ${header.value1} format is not currently supported - Source

Using HTTP Connectors for Open Connector


HTTP connectors can be implemented in place of the OpenConnectors for using the Query Parameters [until SAP comes with a fix]. This approach helps to set the required query parameter while still achieving connection to Open connector resources and its parameters.



With this approach I'm now able to query the APIs and also access the response headers. This would be one of the ways to access the query parameters for Open Connectors till we see a fix from SAP on future release.

 

 
5 Comments
Labels in this area