When mapping a query
operation, you can map range parameters in the data source to entity set properties, in
order to support filters. A ranges table describes an ABAP structure that must to be
constructed from the following four components:
- SIGN (sign; I=include, E=exclude)
- OPTION (comparison operator; for example, EQ=equal)
- LOW (lower limit)
- HIGH (upper limit)
Also a structure with prefixes, such as:
matnr_sign, matnr_option,
matnr_low, matnr_high is recognized as a range structure.
Note Not all the OData runtime filter
options are supported. For information about the supported filter options, see SAP Note
number
1671893 
. In addition, you can set your filter at design time
in the Service Builder as constant value. For example
Sign=
'I' ;
Option=
'CP' ;
Low=
'L*'
All
the table's or structure's parameters are greyed out, and their settings are only available
in the Map Range Table dialog. In some cases, the table's parameters are available, but the
structure is not recognized because one of the above listed fields is missing, for example,
Sign is missing, but the others are available; Option, Low
and High. After setting the range table, Service Builder checks all the range fields, and
fields marked as constants are set as the constant value,
Constant.
Setting Ranges Table Parameters
Ranges tables contain additional parameters, typically ones that specify for which
parameter the range is valid. If a range table is not automatically recognized, or if
you want to set a particular table structure as a range table, proceed as follows:
- From the Data source view, select the range table node by choosing the arrow
at the left of the table structure name.
- Click Set/Unset Range Table. Alternatively, drag the
table header of a range (the range table is dragged), and drop it into the same
row as the property you want to map in the Mapping table, the Map
Range Table dialog displays. If Service Builder identifies the
table as range, it provides semantics proposal. The range displays as a set of
brackets on a green button in the Mapping table, and when you select the
button, it opens the Map Range Table dialog.
You can map a single property to the range. The mapping direction for ranges is
always of type,
input. The semantic
specifies how the field is handled and defines its role in the range expression.
Mandatory semantics are
HIGH, LOW, SIGN, and
OPTION according to the ranges table
semantics. For ranges tables, you can also set the semantic Parameter to specify the
ranges table attribute that will be filled with the name of the BAPI or RFC parameter
for which the range is valid. In some cases, populating the range table attribute
with semantics is not correct, therefore you can specify constant values.
The
semantic is subject to the following checks in the Service Builder: