Symptom
The query `$filter=Fieldname ne ' '` does not return any results for PDI field.
Environment
SAP Cloud for Customer.
Reproducing the Issue
- Attempt to filter PDI field xxx(Field name) using the query`$filter=xxx(Field name) ne ' '`.
- Observe that the query does not return the expected results.
The issue occurs while filtering PDI fields configured in custom BO's.
Cause
The issue occurs for PDI fields with Data type as string.
Strings are not of fixed length and therefore not supported in such queries.
The field cannot be selected as selection criteria. However, any field which has a data type of SHORTTEXT for example can be selected as selection.
Resolution
String data types can be replaced with fixed length data types such as APC_V_LANGUAGEIND_SHORT_TEXT or Long text etc to make the field filterable for null values.
Keywords
odata, dwb, filter query, string data type, short text, fixed-length data type, contains operator, filtering issue, PDI_string , KBA , LOD-CRM-INT-DWB , Data Workbench , Problem
SAP Knowledge Base Article - Public