Filter Criteria for Query (Magic xpi 4.14)
The Query operation will use the REMOTE_EXECUTE_QUERY function to fetch the data from the SAP server. Here the user can set the values which will be passed as parameters to the Query.
The table of parameters will have the following fields. The rows in the table are populated as per the list of the columns retrieved from the server for the object name specified.
|
|
Parameter
|
This is the name of the column. The column names are fetched from the server for the table specified in the object name. The filter can be defined on this column.
|
Technical Name
|
The technical name of the parameter.
|
Filter string
|
Enter the filter string or you can click to open the Expression Editor to construct the filter string. The value for filter should be enclosed in double quotes.
The filter string should follow the syntax given below. This syntax is as per the SAP API.
<Operator><Space><Value>
For example,
Note that the syntax will not be validated by the Magic xpi Studio as well as Runtime.
|
Instead of defining filters individually on each field, users can define a single filter under the Custom Filter.
The custom filter should follow the syntax given below. This syntax is as per the SAP API.
<Technical Name of Field><Space><Operator><Space><Value>
Multiple fields can also be provided here. The value should be enclosed in double quotes.
For example: SP$00001 BT "19960101" AND "20040101" AND SP$00002 LT "1000" AND SP$00003 GE "003" AND SP$00007 LE "001"

|
-
If a custom filter is added then the filters defined individually on the columns will not be applicable.
-
If the filter is applied on two values for the same field, then it is required to use the BT (Between) operator. For example,
Filter string: BT "19900101" AND "20210404"
Custom filter: SP$00002 BT "19900101" AND "20210404"
-
The GT and LT operators are not supported for the Query operation.
-
If the custom filter string exceeds 72 characters, then the records will not be fetched from the SAP server.
-
It is mandatory to give space between in Technical Name, Operator and Value in the Filter string as well as the Custom Filter as specified in the syntax given above.
-
When retrieving the column list, the aggregate type of columns will not be fetched and hence not be displayed in the column list.
-
The LIKE operator is not supported in the Query operation.
-
The field names with special characters are not supported in Magic xpi.
|
Given below is an example using Filter String

Given below is an example using Custom Filter

For the list of supported query operators in SAP ERP refer to Query Operators Supported in SAP ERP
Since version: 4.13.2