Parameters
Parameters are placeholders for values that are passed at runtime. The Report service type offers pre-defined service parameters and user-defined custom parameters.
Service Parameters
The following parameters can be added to the URL of Report services:
| Parameter | Description | Example Service URL |
|---|---|---|
| [customParameter] | See custom parameters. | http://example.com:8080/api/v1/services/[service name]/?customParameter=value |
| batchJobName | Name of the background job under which the Report is executed in SAP. | http://example.com:8080/api/v1/services/[service name]/run?batchJobName=XTRACT |
| variant | Name of a variant | http://example.com:8080/api/v1/services/[service name]/run?variant=VAR01 |
Custom Parameters
Custom parameters are user-defined placeholders for values that are passed at runtime. They can be used to create dynamic Selections.
There are two types of custom parameters:
- Scalar parameters represent a single value.
- List parameters represent multiple values separated by commas, e.g.,
[value_1],[value_2],[value_n].
Scalar Parameters
Scalar parameters are single values that are used as placeholders. The placeholders need to be populated with actual values at runtime.
To create a scalar parameter:
- Open the Report tab and navigate to the Custom Parameters section.
- Click [Add Scalar]. A new parameter is added to the list of parameters.
- Select the parameter name and overwrite the parameter name with a name of your choice. This is important for parameter mapping when exposing the service to 3rd party tools or via MCP.
- Select one of the following data types from the Type dropdown:
- Text: Used for any type of SAP selection field.
- Number: Used for numeric SAP selection fields.
- Flag: Used for SAP selection fields that require an ‘X’ (true) or a blank ‘‘ (false) as input value.
- Click [OK].
The parameter is added to the service.
Next, use the custom parameter in Report selections.
List Parameters
List parameters contain multiple values separated by commas e.g., [value_1],[value_2],[value_n]. The placeholders need to be populated with actual values at runtime.
To create a list parameter:
- Open the Report tab and navigate to the Custom Parameters section.
- Click [Add List]. A new parameter is added to the list of parameters.
- Select the parameter name and overwrite the parameter name with a name of your choice. This is important for parameter mapping when exposing the service to 3rd party tools or via MCP.
- Click [OK].
The parameter is added to the service.
Next, use the custom parameter in Report selections.
Pass Values at Runtime
There are two ways to populate parameters with values at runtime:
- Add the parameter / value pairs to the service URL, see Pass Query Parameters.
- Add the parameters / value pairs in the request body of the service call, see Pass Body Parameters.
For more information, see Runtime Parameters.