Hi,
I have a problem with using the OData query filter options Substring and SubstringOf. I use them with my SADL-generated OData service on top of an CDS view but allways get a FILTER TREE PROCESSING ERROR.
This query does work with a simple filter statement:
...ZBF_POIPARAM01_SRV/Z_Poitems_Params?$filter=( Material eq 'STANDARD' )
This query fails using SubstringOf:
...ZBF_POIPARAM01_SRV/Z_Poitems_Params?$filter=substring(Material, 0) eq 'STANDARD'
The error message is the following:
<code>/IWBEP/CM_MGW_RT/176</code>
<messagexml:lang="en">Internal error during filter tree processing.</message>
<code>/IWBEP/CX_MGW_TECH_EXCEPTION</code>
<message>Internal error during filter tree processing</message>
<propertyref/>
<severity>error</severity>
<target/>
</errordetail></errordetails>
While debugging the problem in Gateway, I noticed that the filter tree object (EO_FILTER_TREE) was build correctly [image01]. The URL statement (a) was translated into an internal representation (b) wich is semantically identical:
(a) $filter=substringof('STAN', Material) eq true
(b) ((MATERIAL like ‚%STAN%‘) = ‚true‘)
Moreover, all operators and operands (right- and left-side) are mapped correctly.
Later in the debugging processes, the algorithm breaks while checking some conditions x1, x2, x3 and x4 [image02]. The missed conditions prevent a parameter (lo_property) to be allocated. In the further processing this leads to an unallocated parameter lv_path and to the exception.
I have no clue what goes wrong in Gateway while handling this standard statement. Does anybody have already tried it successfully or have deeper understanding of the problem?
Regards, Tobias