cancel
Showing results for 
Search instead for 
Did you mean: 

$filter values are truncated when mapped to FILTER_SELECT_OPTIONS

Former Member
0 Kudos
461

Hello gurus!

I have the following issue on our development system.

We have a GW service that implements an EntitySet. The URL contains a $filter instruction that once SAP catches it, it looks like this:

/sap/opu/odata/sap/TEST_SERVICES_SRV/TrimSet?$filter=ChannelId eq '20' and TrimCatId eq 'BASE' and CombinedId eq 'DR3^DTXL2211111111' and GaugeId eq '24' and (ColorId eq 'WWTC' or ColorId eq 'BARE')

Also very important: both the ABAP data elements and the Entity Properties field lengths matches.

ChannelId (max. length = 2)           ==> CHANNEL_ID CHAR 2

CombinedId (max. length = 20)      ==> PROFILE_PSYSTEM CHAR 20

ColorId (max. length = 5)                ==> COLOR_CODE CHAR 5

Once we jump into the debugger, the IO_TECH_REQUEST_CONTEXT input parameter for TRIMSET_GET_ENTITYSET method has an attribute MR_REQUEST (deep structure) which contains TECHNICAL_REQUEST-FILTER_STRING which value matches the $filter expression in the URL

( ( ( ( ( ChannelId eq '20' ) and ( TrimCatId eq 'BASE' ) ) and ( CombinedId eq 'DR3^DTXL2211111111' ) ) and ( GaugeId eq '24' ) ) and ( ( ColorId eq 'WWTC' ) or ( ColorId eq 'BARE' ) ) )

But the issue is that, if we want to get the $filter values as SELECT-OPTION, the internal table FILTER_SELECT_OPTIONS in the MR_REQUEST deep structure already has the values but truncated:

ChannelIdStandard Table[1x4(20)]
TrimCatIdStandard Table[1x4(20)]
CombinedIdStandard Table[1x4(20)]
GaugeIdStandard Table[1x4(20)]
ColorIdStandard Table[2x4(20)]

ChannelId gets truncated from '20' to '2'

SIGNOPTIONLOW
IEQ2

CombinedId gets truncated from 'DR3^DTXL2211111111' to 'DR3^DTXL22'

SIGNOPTIONLOW
IEQDR3^DTXL22

And both ColorId get truncated as well:

SIGNOPTIONLOW
IEQWWT
IEQBAR

We have implemented the following note but the issue was not fixed:

2245413 - Truncated filter values

Symptom

     The filter value of a property type STRING or XSTRING might be truncated.

Reason and Prerequisites

     Program error in the metadata handling

Solution

     Apply this SAP note to your backend system.

   

     After having applied this SAP note, you have to cleanup the metadata cache on your gateway system via transaction /IWFND/CACHE_CLEANUP      and also your backend system via transaction /IWBEP/CACHE_CLEANUP.

https://websmp130.sap-ag.de/sap/support/notes/convert2pdf/0002245413?sap-language=EN

The curious thing is that if we set the max. length to 0 (zero) in the Entity definition, the values are not truncated anymore. Which it is the workaround i have to do while we get this fixed.

Has anyone else experienced this issue??

Thanks in advanced!!

Accepted Solutions (0)

Answers (3)

Answers (3)

TomF
Explorer
0 Kudos

Hi Mario,

Did you find a solution or working note for this?

The notes I found, and mentioned in this discussion, don't provide a solution.

kr,

Tom.

0 Kudos

Hi Mario,

I'm struggling with exactly the same problem. After implementing the notes 2245413 and 2205402 the problem is still happening.

Did you manage to fix it?

Regards,

Fabio Scaravelli

former_member184867
Active Contributor
0 Kudos

Did you check note 2205402 for SP12 of SAP_GWFND  and  note 2232883 for SAP_GWFND SP13.

Refer to thread