SAP OData Connector

Last update: Download PDF Edit

1 Introduction

This reference guide describes the actions and domain model of the SAP OData Connector module.

The SAP OData Connector is an OData connector written specifically to integrate with SAP back-end systems like SAP Business Suite (SAP ERP 6.0), SAP S/4HANA, SAP S/4HANA Cloud, and SAP SuccessFactors. The SAP OData Connector can be used for all SAP back-end systems that have OData enabled, both in the cloud and on-premises. For ECC, SAP Gateway will be used to expose the traditional BAPI interface as an OData service.

When running the Mendix application in SAP Cloud Platform, you can choose to use the SAP Cloud Platform cloud connector to gain access to your on-premises SAP instance. If you choose to use the SAP Cloud Platform cloud connector, this will invoke the SAP Connectivity Service in the SAP Cloud Platform to find a route to your private SAP OData service. This route is configured from the SAP Cloud Connector running as an agent in your on-premises SAP back-end. If no route is configured, the SAP OData Connector will route requests to the public OData service. For more information, see the SAP Cloud Connector documentation and the SAP OData Connector in the Mendix App Store.

The SAP OData Connector can be used for example in combination with an SAP Data Model of an SAP Fiori Cloud app. For more details, see SAP Data Models. Alternatively, you can generate a data model from the metadata of your OData service, exposed from your SAP back-end system. For more details see How to Use the SAP OData Model Creator.

If you are new to the SAP OData Connector, you can try it out by following our how-to: How to Use the OData Connector. This reference assumes that you know the details of the SAP OData service you want to use.

2 Using the SAP OData Connector

Once you have downloaded the SAP OData Connector from the App Store, it will be imported into your app. You will find it in the Project Explorer under project {Project name} > App Store modules > SAPODataConnector.

2.1 Microflow Actions

The SAP OData Connector module gives you access to additional actions which you can assign to your Microflow Activities. These give you access to the OData services.

The use of each of these actions is described in section 3. Actions.

2.2 Action Parameters

Each of these actions will ask for a number of parameters which will be categorized as either Input or Output. Here is an example of the parameters which are required for the Get List action.

These parameters are described in section 4. Connector Action Parameters.

2.3 Domain Models

This reference guide describes two different domain models.

  1. The SAP Service Domain Model – this is a Mendix domain model which represents the data model of the SAP OData service. This is the one which holds the data you are working with and is described first.

  2. The SAP OData Connector Domain Model – this contains entities which are used by the SAP OData Connector itself: for example, to construct the request which needs to be sent to the OData service. A description of this domain model is included for completeness in section 2.3.2 SAP OData Connector Domain Model

For more information on domain models, see Domain Model in the Mendix Reference Guide.

2.3.1 SAP Service Domain Model

Most of the actions of the SAP OData Connector make use of a domain model representing the SAP service data model. These models contain non-persistable Mendix entities which represent entities in the OData service which is exposed by an SAP back-end system. The entities contain attributes which correspond to the entity properties plus additional attributes which support the SAP OData Connector.

There are two ways to create a domain model to support your app:

  • Download pre-built SAP Fiori Cloud data models from the Mendix App Store. These are available for frequently used SAP services and can be found in the App Store under Connectors > SAP. For more details, see SAP Data Models.

  • Create a data model by inspecting the service metadata. The response from the service can be used in the SAP OData Model Creator to generate a domain model which can be imported into your app. Instructions for doing this are in How to Use the SAP OData Model Creator.

The examples used in this guide are based on the SAP My Tasks for Field Sales Representative (CRM) data model, created from an OData service exposed by the back-end system of www.sapfioritrial.com.

This data model can be obtained in the following ways:

Make sure that you review the value of the constant containing the URL of the SAP service you are using after you have imported the data model into your app.

Part of the data model for this sample data is:

This domain model generally works in the same way as a Mendix domain model, with entities, attributes, and associations. However, there are two additions to support the SAP OData Connector:

  • Every object is based on an entity which is a specialization of the ComplexType, FunctionParameters, or OdataObject entity. The OdataObject entity adds a meta_objectURI string, which is the URI of the object and can be used in entity manipulation actions, and a meta_etag string that identifies a state of the object. This is used by the OData service when you try to change data to check if it has been changed since it was retrieved by your app.
  • Many objects have attributes which end in …Deferred. These contain URIs which will return a list of objects of an entity type which is associated with the current object. For example: in the domain model above, the Task entity contains an attribute AttachmentsDeferred. This will contain a URI which can be used to return a list of TaskAttachments associated with the current Task object via the Attachments_Task_TaskAttachment association.

2.3.2 SAP OData Connector Domain Model

In addition to the SAP Service Domain Model, there is a domain model which is used internally by the SAP OData Connector to control the connection between your Mendix app and the SAP back-end. The domain model consists of entities and their relationships represented by associations.

Here is the domain model of the SAP OData Connector:

This domain model is part of the SAP OData Connector module and can be found in Project … > App Store module > SAPODataConnector. Each entity (see Entities in the Mendix Reference Guide) contains one or more attributes (see Attributes in the Mendix Reference Guide):

  • ODataObject – represents the generic OData object; all entities which can be manipulated directly in the SAP OData service domain model are specializations of this
    • meta objectURI – the address given by the OData service to the OData object
    • meta_etag – the entity tag (ETag) for the object; this is used for optimistic concurrency control to check that an object has not been changed in the SAP back-end system by another user
  • ResultInfo – holds information about the result of a query
    • totalCount – when a query is executed with $inlinecount=allpages the result returns the total record count for the given criteria; if a ResultInfo entity object is specified, this value will be stored in the totalCount attribute and can be used for paging
  • ComplexType – represents the generic OData service domain model entities which are of type Complex
  • FunctionParameters – represents a wrapper for the parameter entities that need to be passed to OData functions
    • postParameterInline – a boolean which indicates whether the parameters should be posted inline or passed as the body of the POST request; the default value is true
  • RequestParams – passes conditions to the SAP OData Connector actions which change the behavior of the action; pass empty if you want to use the default behavior
    • expectedHttpResult – the expected HTTP result code; normally, an HTTP result code which is not expected will cause an exception; if a different code (between 200 and 400) is passed in this attribute, the action will treat this code as success; setting the expected HTTP response is useful in cases where OData services return codes that differ from the expected ones (for example, 204 “No Content” when no data is available instead of 200 “OK” with an empty result)
    • connectTimeout – limit, in seconds, before creating a connection times out (default 60 seconds)
    • readTimeOut – limit, in seconds, before reading from the connection times out (default 120 seconds)
    • Proxy – used internally
    • manualProxy – used internally
  • Header – add a custom HTTP header that provides more information in an HTTP request
    • Name – the name of the header
    • Value – the value of the header
  • CloudConnector Info – internal use only
  • Cookie – the cookie is maintained internally and is valid for a Mendix session or in the microflow context of a startup microflow or scheduled event
  • CSRFToken – the Cross-Site Request Forgery (CSFR) token is maintained internally and is used to prevent CSRF attacks; a CSFR token is maintained for a Mendix session and is also supported in the microflow context of a startup microflow or scheduled event

3 Actions

This section describes all the actions of the SAP OData Connector. They are categorized as being either for entity and attribute manipulation or helper actions.

Some inputs are necessary for the connector to work and these are marked (required). Other inputs are not required, but in some cases this must be made explicit by setting them to empty.

A more detailed description of the parameters is in section 4. Connector Action Parameters.

3.1 Entity and Attribute Manipulation

3.1.1 Create

The Create operation creates a new object in the SAP back-end system using the OData service. The object is described by an entity in the SAP service domain model.

  • Input
    • Query (required) - A URL which points to the Collection to which the object belongs. The Collection also identifies as an Entity Set in the OData service.
    • Odata object (required) - an object which is a specialization of the OdataObject entity and corresponds to the OData Entity which is being created
    • Request Parameters - This is used to override the default behavior of the action when responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - Boolean
    • Variable - the name which you would like to give to the boolean variable holding the value indicating the success or failure of the create action

For example, this connector can be used to create a task using the SAP My Tasks for Field Sales Representative (CRM) service. In this case the Query is

@CRM_TASK.CRM_TASK + '/' + toString(CRM_TASK.EntitySetNames.Tasks)

@CRM_TASK.CRM_TASK is the constant in the SAP Service Data Model which identifies the Service Root for this OData service.

CRM_TASK.EntitySetNames.Tasks is the name of the Tasks collection listed in the EntitySetNames enumeration of the SAP Service Data Model.

The Odata object is an object of entity type Task. This can be created, by using, for example, the Create Object action.

3.1.2 Delete

The Delete operation deletes an existing entity instance in the SAP back-end system using the OData service.

  • Input
    • Odata object (required) - The Mendix representation of the object which you wish to delete
    • Request Parameters - This is used to override the default behavior of the action when responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - Boolean
    • Variable - the name which you would like to give to the boolean variable holding the value indicating the success or failure of the delete action

For example, this connector can delete a task using the SAP My Tasks for Field Sales Representative (CRM) service.

3.1.3 Execute entry

The Open Data Protocol (OData) includes standard CRUD (Create, Retrieve, Update, and Delete) operations that map to the HTTP methods POST, GET, PUT/MERGE, and DELETE. These are supported in the SAP OData Connector as individual activity actions. In addition, SAP allows you to use additional custom operations (service operations) which cannot be mapped to the standard CRUD operations. These service operations are exposed through the OData service and are invoked by the HTTP methods GET or POST.

The service operations which are supported by the OData service are listed in the enumeration FunctionNames which is imported as part of the SAP service domain model.

The Execute entry action allows you to invoke these service operations on the SAP back-end system. It returns an object from the OData service.

  • Input
    • Url (required) - the URL of the service operation. This is generally SERVICEROOT/[function name]
    • Http method (required) - GET or POST: the method used to invoke the service operation. GET is usually used to retrieve data and POST is usually used to create data
    • Function parameters (required): Additional parameters which the service operation needs in order to retrieve, update, or create the correct data. The name of the relevant Function Parameters entity, imported into your app as part of the SAP service data model, will be [function name]Parameters. The attributes of this entity will indicate the parameters which are required by the service operation
    • Request Parameters - This is used to override the default behavior of the action when responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Response type (required) - the type of entity which represents the object which is returned
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - Object: an object which has the same type as the entity type which was passed as Response type
    • Variable - the name which you would like to give to the object which is returned by the OData service operation

3.1.4 Execute list

This performs the same action as the Execute entry action, but this is used where the expected result from the service operation is a list, rather than a single item.

  • Input
    • Url (required) - the URL of the service operation
    • Http method (required) - GET or POST: the method used to invoke the service operation. GET is usually used to retrieve data and POST is usually used to create data
    • Function parameters (required): Additional parameters which the service operation needs in order to retrieve or create the correct data. The name of the relevant function parameters entity, imported into your app as part of the SAP service domain model, will be [function name]Parameters. The attributes of this entity will indicate the parameters which are required by the service operation
    • Request Parameters - This is used to override the default behavior of the action when responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Response type (required) - the type of entity which represents the objects in the list which is returned
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - List
    • Variable - the name which you would like to give to the list of objects which is returned by the OData service operation

3.1.5 Get Entry

The Get Entry operation gets a single existing entity instance from the OData service.

  • Input
    • Url (required) - The URL of the object to be retrieved
    • Response type (required) - the type of entity which represents the object which is returned
    • Request Parameters - This is used to override the default behavior of the action in responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - Object: an object which has the same type as the entity type which was passed as Response type
    • Variable - the name which you would like to give to the object which is returned by the OData service

For example, this connector can get details of a task using the SAP My Tasks for Field Sales Representative (CRM) service. This can often be done by passing the meta_objectURI attribute of an object, in this case a Task, which you have already retrieved.

For a task with the reference guid’00505697-47E6-1EE7-BED1-6C5662A87345’, the URL would be set to:

@CRM_TASK.CRM_TASK + '/' + toString(CRM_TASK.EntitySetNames.Tasks) + '(guid%2700505697-47E6-1EE7-BED1-6C5662A87345%27)'

This produces the GET request https://www.sapfioritrial.com/sap/opu/odata/sap/CRM_TASK/Tasks(guid'00505697-47E6-1EE7-BED1-6C5662A87345') and, if the task exists, returns it.

3.1.6 Get List

The Get List action gets a list of objects described by a type of entity in the domain model from the SAP OData service. This action uses filters (SQL queries) to control which objects are returned. The entity collection is described by an entity in the SAP service domain model which you have imported into your app.

  • Input
    • Query (required) - the query which will return a list of entity instances from the OData service. See section 4.1.1 Query for more information
    • Response type (required) - the type of entity which represents the objects which are returned
    • Request Parameters - This is used to override the default behavior of the action when responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Parent - If the Get List action returns a list of objects which all have a single parent object (an object which is linked as one parent to many objects of Response type) then you can pass the parent object here and Get List will make the associations. Set this to empty if it is not required
    • Result info - This is an object of type ResultInfo where the number of items in the list is returned. Note that the query should include $inlinecount=allpages in order to return the total number of items in the list. Set this to empty if it is not required
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - List
    • Variable - the name which you would like to give to the list of objects which was returned from the query

For example, to return a list of my tasks, sorted in descending order of CreatedAt using the SAP My Tasks for Field Sales Representative (CRM) (CRM_TASK) service, you could enter the following Query:

@CRM_TASK.CRM_TASK + '/' + toString(CRM_TASK.EntitySetNames.Tasks) + '?' + '$orderby=CreatedAt%20desc' + '&' + '$filter=MyTask%20eq%20true' + '&' + '$inlinecount=allpages'

The Response Type would be CRM_TASK.Task. Request Parameters, Parent, and Result info can be set to empty Use SAP cloud connector should be set to False.

3.1.7 Refresh

This action refreshes local data which is cached in objects within the Mendix domain model and may have become ‘dirty’ or in some other way is not the same as the data held in the SAP back-end system.

  • Input
    • Odata object (required) - The Mendix representation of the object containing the ‘dirty’ data which you wish to refresh by retrieving it from SAP using the OData service
    • Request Parameters - This is used to override the default behavior of the action when responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - Boolean
    • Variable - the name which you would like to give to the boolean variable which indicates the success or failure of the refresh action.

3.1.8 Update

The Update operation changes the attributes of an existing entity instance in the SAP back-end system using the OData service.

  • Input
    • Odata object (required) - The Mendix representation of the object containing the updated data which you wish to update.
    • Request Parameters - This is used to override the default behavior of the action in responding to conditions such as timeouts and HTTP responses. To keep the standard behavior, set it to empty
    • Use SAP cloud connector - False if you want to use a publicly accessible service, True if you need to access your on-premises SAP back-end system via the SAP Cloud Connector
  • Output
    • Return type - Boolean
    • Variable - the name which you would like to give to the boolean variable indicating the success or failure of the update action

For example, this connector can update details of a task using the SAP My Tasks for Field Sales Representative (CRM) service.

3.2 Helper Actions

3.2.1 Add basic authentication

This action is a specialized version of the Add header action. It allows an authentication request to be made without having to manually encode the parameters as Base64. This header will have a name of ‘Authorization’ and a value which is the encoding of the Username and Password passed to the action.

  • Input
    • Request Parameters (required) - The request parameters are passed as an object of entity type RequestParams. This can be created by using the Create request params action
    • Username (required) - The user to be authenticated
    • Password (required) - The password for the user to be authenticated
  • Output
    • Return type - Boolean
    • Variable - the name which you would like to give to the boolean variable indicating the success or failure of the authentication action

3.2.2 Add header

One or more headers can be provided to the SAP OData Connector actions by adding them to RequestParameters. HTTP headers may be required to control the behavior of service operations that you invoke with Execute entry or Execute list.

When you need to pass additional HTTP headers in an SAP OData Connector action, you do not pass the headers directly as a single parameter. The headers are associated with a RequestParams object and it is this object which is used as a parameter to the action. This enables a variable number of headers to be passed easily to an action.

  • Input
    • Request Parameters (required) - The request parameters are passed as an object of entity type RequestParams. This can be created by using the Create request params action
    • Name (required) - the name of the HTTP header field
    • Value (required) - the value of the HTTP header field
  • Output
    • Return type - Boolean
    • Variable - the name which you would like to give to the boolean variable indicating the success or failure of the add header action

For example, a service operation may require your email address (me@here.com) to be passed in the “From” HTTP header. In this case you would create a RequestParams object and use Add header to add a header with Name=‘From’ and Value=‘me@here.com’.

This header is automatically associated with the RequestParams object.

3.2.3 Create request params

This creates a RequestParams object which can be used to control the behavior of other SAP actions such as Get entry. It is also needed before you can create HTTP headers using Add header.

  • Input - There are no inputs required for this connector
  • Output
    • Return type - SAPODataConnector.RequestParams
    • Variable - the name which you would like to give to the RequestParams object which is returned by this action

3.2.4 Get Latest Http Response

This action returns the HTTP Response to the last OData action that was performed. It is mainly used within exception handling to manage any errors which are returned to the microflow.

  • Input - This action does not take any input parameters
  • Output
    • Return type - System.HttpResponse
    • Variable - the name which you would like to give to the HttpResponse object which is returned by this action

For example, you could catch an exception on Get List and display an error message to the user.

4 Connector Action Parameters

This section describes in more detail each of the parameters which is used by one or more of the actions described in section 3. Actions.

Every Action of the SAP OData connector will ask for a set of parameters. For example, Get List:

The parameters can be entered using the drop down, clicking the Edit or Select… buttons, or typing directly into a text field.

Within the edit box, you can type your parameter. As is standard in Mendix, certain characters (for example [@ $ .]) will trigger a pop-up window to help you select the right values. This can also be triggered using Ctrl+Space. Typing while this pop-up window is open will filter the list of possibilities. For example, you can type (the beginning of) entitysetnames and the pop-up window will allow you to select the collection of entity set names which you want.

Press Enter to select the highlighted item.

4.1 Input Parameters

4.1.1 Query

This is the OData query which identifies what data should be returned. This query formats an SQL query such as “SELECT * FROM EntitySet WHERE (foo) ORDER BY (bar) …” into a OData GET request like “GET ~/EntitySet?$filter=foo&$orderby=bar…“. It is the responsibility of the developer to ensure that the query is constructed correctly.

The format of the Query is:

@SERVICEROOT + '/' + toString(COLLECTIONNAME) + '?' + 'QUERYPARAMETERS'

The Query edit box will help you by offering suggestions as described above.

@SERVICEROOT is a constant which is created in the SAP Service Data Model and has a value which is the root URL of the OData service, for example: https://www.sapfioritrial.com/sap/opu/odata/sap/CRM_TASK

COLLECTIONNAME can be found in the enumeration EntitySetNames which lists all the collections in the SAP Service Data Model, for example: the collection Tasks will be shown as @SERVICEROOT.EntitySetNames.Tasks

QUERYPARAMETERS are the parameters of the OData query which identify which objects should be returned. Please note:

  • The OData service will define how entities and attributes can be used. For example, the metadata for the service will include a boolean indicating whether an attribute is filterable and/or sortable
  • The $expand=[entity] parameter will return associated (child) entity objects as part of a single query instead of having to retrieve them via a second query; for example, $expand=TaskStatus added to a query on the Tasks collection will return a list of Tasks and all the TaskStatus objects associated with them

For example, to return a list of my tasks, sorted in descending order of CreatedAt from our SAP My Tasks for Field Sales Representative (CRM) (CRM_TASK) service, you could enter the following query:

@CRM_TASK.CRM_TASK + '/' + toString(CRM_TASK.EntitySetNames.Tasks) + '?' + '$orderby=CreatedAt%20desc' + '&' + '$filter=MyTask%20eq%20true' + '&' + '$inlinecount=allpages'

This is the equivalent of the SQL SELECT statement:

SELECT * FROM Tasks WHERE MyTask=true ORDER BY CreatedAt DESC

The $inlinecount=allpages clause asks OData to return a count of the number of objects returned in the list. This will be stored in SAPODataConnector.ResultInfo.totalCount.

You can find more information about OData queries in OData Query Options.

4.1.2 Response type

When an object is returned from an OData service, your app needs to know to which entity type it should map the returned data. The Response type is passed so that the response from the SAP back-end system can be validated. The Select… button will present you with a list of possible entities. This should match the Collection that you used in the query or URL.

4.1.3 Odata object

This is an object which is based on an entity type which is a specialization of the OdataObject entity in the SAP OData Connector domain model. These entities are the ones created in the domain models which you can download from the App Store or import via the SAP OData Model Creator. Objects which are not based on a specialization of the OdataObject entity cannot be used here.

4.1.4 Url

This is the parameter used within an action when:

  • A specific object on the OData service is referenced

  • A service operation is used to return an object

When you are referencing an object, the format of the URL is:

@SERVICEROOT + '/' + toString(COLLECTIONNAME) + '/' + OBJECTINSTANCE

@SERVICEROOT is a constant which is created in the SAP Service Data Model and has a value which is the root URL of the OData service, for example: https://www.sapfioritrial.com/sap/opu/odata/sap/CRM_TASK

COLLECTIONNAME can be found in the enumeration EntitySetNames which lists all the collections in the SAP Service Data Model, for example: the collection Tasks will be shown as @SERVICEROOT.EntitySetNames.Tasks

OBJECTINSTANCE is generally available as an attribute of an entity object.

Alternatively, you can obtain the entire URL from attributes of an object. For example, the meta_objectURI attribute of an object is the full URL to the instance of the object which is held by the OData service.

4.1.5 Http method

This is the method used to obtain data from the OData service using a service operation, when standard CRUD methods cannot be used. This is either GET or POST.

4.1.6 Function parameters

These are the parameters which are required when a service operation (function) is invoked by Execute list or Execute entry to obtain data from the OData service when standard CRUD methods cannot be used. These parameters are defined by the OData service operation.

The SAP data model will contain entities, specializations of the FunctionParameters entity, which contain the attributes required for each of the functions exposed by the OData service. These entities will be called [function name]Parameters, where [function name] is the name of the exposed SAP OData service listed in the FunctionNames enumeration which is part of the SAP data model.

Before you pass the function parameters you will need to set the value of the postParameterInline attribute. Set it to:

  • true - (default) the parameters will be sent as part of the HTTP GET or POST instruction
  • false - the parameters will be sent in the HTTP body after the HTTP headers

For example: in the CRM_TASK SAP service domain model there is a function called TaskFollowUpTransTypes. This has an associated entity, TaskFollowUpTransTypesParameters, which is a specialization of the SAP OData Connector entity FunctionParameters. This function parameter entity indicates that you need to supply an odata_Guid and a TransactionType.

To use this function you will need to create an object of entity type TaskFollowUpTransTypesParameters with the correct values for odata_Guid, TransactionType, and postParameterInline using the Create object action. You can then use these parameters when you invoke the function using Execute list.

4.1.8 Request parameters

These are parameters which are used within the SAP OData Connector action to override the default behavior of the action. This should be passed as an object of entity type RequestParams.

The parameters which can be changed are:

  • Expected HTTP result - this is used to set the expected success code where this diverges from the specification. For example, the expected result from Create is 201 “created” but a service may have been configured to return 200 “OK”
  • Connection Timeout - how long the action should wait before assuming that the connection has timed out (default 60 seconds)
  • Read Timeout - how long the action should wait for a response to a request (default 120 seconds)
  • Proxy - override the default proxy settings for this action

This is also the parameter which is passed when an SAP OData Connector action requires additional HTTP headers. The Header objects are attached to the RequestParams object via the Header_RequestParams association.

For example, you may be initiating a service operation using the Execute entry action. This service operation requires an additional HTTP header. You also want to set the timeout for receiving the data to 10 seconds, and treat a 204 No Content as a success. You can do this by:

  • Creating a RequestParams object using the Create request params action. This will return an object of type RequestParams
  • Use Change Object on your new object to set the attribute readTimeout to 10 and attribute expectedHttpResult to 204
  • Use Add header to add the required HTTP header. This can be done repeatedly to add as many HTTP headers as are needed by the service operation being invoked by Execute entry.
  • Invoke the service operation with Execute entry using the required URL, HTTP method, Function parameters, and the Request parameters and associated HTTP headers which you created above.

Request parameters can also be set to empty if no headers are needed and the default action behavior is used.

4.1.9 Parent

This is an object which should be associated as the parent of a list of objects returned from the Get List action.

Within the Mendix domain model representing an OData service, there are associations set up between the entities. However, these associations are not set when you get data from an OData service. The associations which exist within the OData service are held as …Deferred attributes within the entity object. When a list of objects is returned, you can set up an association to a parent object within the Mendix domain model. A parent object is an object of an entity type which is at the one end of a one-to-many association to another entity type.

Set this to empty if it is not required.

For example, Account is the parent entity of task via the Tasks_Account_Task association in the CRM_TASK domain model.

For example, you want to retrieve all the Tasks which are associated with the ‘My Account’ account via the Tasks_Account_Task association. By passing the taskDeferred URL to the Get List action as the URL and passing the Account entity as Parent, the Get List action will set the Task_Account_Task association between all the Tasks retrieved and the Account.

4.1.10 Result info

This is an object of type ResultInfo where the number of items in the list is returned. It is used for the Get List action. Note that for a Get List the query should include $inlinecount=allpages in order to return the total number of items in the list.

Set this to empty if it is not required.

4.1.11 Use SAP cloud connector

This is a Boolean parameter which tells the SAP OData Connector where your SAP OData services are hosted. It should be set to:

  • False if you want the action to use a publicly accessible service
  • True if you want the action to access your on-premises SAP back-end system via the SAP Cloud Connector

For more information, see the SAP Cloud Connector.

4.1.12 Username

This is a username used for creating an authorization HTTP header field.

4.1.13 Password

This is the password associated with a username and is used for creating an authorization HTTP header field.

4.1.14 Name

This is the name of an HTTP header field which is a component of the HTTP header which is part of an HTTP message. It is used to provide an operating parameter for an HTTP transaction.

4.1.15 Value

This is the value of an HTTP header field which is a component of the HTTP header which is part of an HTTP message. It is used to provide an operating parameter for an HTTP transaction.

4.2 Output Parameters

4.2.1 Return type

This is the type of data which will be returned from the action. There are three types of data:

  • boolean - indicating the success or failure of the action
  • object - an object of an entity type which is either in the SAP service domain model, or in the SAP OData Connector domain model
  • list - a list of objects of the same type, defined by an entity type in the SAP service domain model

4.2.2 Variable

This is the name that you give the result of your Activity. This can be used later in the Microflow to drive logic or to return data. Mendix will suggest a name for you, but you can change it if you want to.