cancel
Showing results for 
Search instead for 
Did you mean: 

SAP OData Service - exclude empty filter error

quanto_solutions_ph
Discoverer
0 Kudos

Hello experts,

I got a problem with SAP OData Services (SAP Gateway and CDS Services). If we use a Fiori App with custom fields and try to filter the custom fields with the ‘exclude empty’ filter, it doesn’t work. When I use a Fiori App with a CDS Service and with the filter ‘exclude empty’ the entityset is empty which is not correct. I tried the same with a Fiori App which uses a SAP Gateway Service and the source code throws an exception.

In my Use-Case it´s the standard Fiori App ‘Manage Customer Line Items’. We redefined the SAP standard Gateway Service ‘FAR_CUSTOMER_LINE_ITEMS’ and added two properties to the entity ‘Items’.

If we use the filter ‘exclude empty’ for the two new properties on the Fiori App, the SAP Gateway Service throws an exception. The exception says uncaught_exception.
The error occurs only if we use the filter ‘exclude empty’ every other filter works.

To be more specific, we redefined the method ITEMSET_GET_ENTITYSET in the DPC_EXT class. First, I call the super method in the source code. And the exception occurs in the standard SAP source code when they try to call the method io_tech_request_context->get_filter_expression_tree( ).

When I call the method io_tech_request_context->get_filter_expression_tree( ) in the DPC_EXT class, I can read the filter and use it. My Source Code in the DPC_EXT class works perfectly besides the call of the super method where the exception occurs.

I tried to debug the problem. It looks like the object for the filter (io_tech_request_context) loses the new properties when I call the super method. But the filter string is still correctly.

Can anybody help me with this problem?

Best regards
Philipp

andrefischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Which basis release and SP Level and which SP Level of SAP_GWFND are you using?

quanto_solutions_ph
Discoverer
0 Kudos

Hi Andre,

we use:

SAP-Basis: Release: 754; SP Level:: 0002

SAP S/4 HANA FOUNDATION: Release: 1909; SP Stack: 02 (04/2020) FP

SAP_GWNFD: Release: 754; Level: 0002

Thanks for you help.

Best regards

Philipp

Accepted Solutions (0)

Answers (0)