The following example illustrates how the REST operation ExecuteTableQuery can be used to read data from an SAP table. Initially, a JSON string with the query parameters is created using the JavaScript function JSON.stringify. The JS object defines the SAP table (T001) as well as additional query parameters, such as RowCount for the number of records returned.
Javascript.
The JSON return data looks as shown below:
Using of ECS Application and Tabe Settings
To access a specific ERPConnect Services (ECS) Application, use the property applicationName.
The following sample shows how to use table settings like rowCount, orderClause, customFunction and fields.
Javascript.
Example with RESTClient
RESTClient is an add-on for many browsers that enables you to call REST Services. The following screenshot shows how to extract data from an SAP Table using the ECS REST services.