cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Property Naming Conventions in Service Consumption Model Leading to Filter Errors

rcaziraghi
Participant
0 Kudos

Hello SAP Community,

I am encountering a peculiar issue while working with a Service Consumption Model in my SAP BTP, ABAP environment. I have imported metadata from an on-premise endpoint (that I'm connecting to) that utilizes camelCase notation in its properties (example: <Property Name="OrderNumber" ... />). However, when the Service Consumption Model is generated, it automatically converts these names into a format separated by underscores in the generated files, and this is causing me filtering issues.

Here is what happens, step by step:

  1. The original property in the endpoint metadata and the CDS abstract entity (created in BTP ABAP afterwards) is named using camelCase, for example, "OrderNumber".
  2. After importing this metadata into my Service Consumption Model, the property is transformed to "order_number" in the generated model class structure (referenced in the Service Consumption Model).
  3. When I attempt to use this property in a filter (using the Fiori preview app), the condition name within my query class filter implementation is automatically converted to uppercase, resulting in "ORDERNUMBER", without the underscores.
  4. Unless I change the filter condition name to "ORDER_NUMBER", it throws an error, stating that the property "ORDERNUMBER" does not exist.

For reference, my situation closely resembles the examples provided in the following SAP sample exercises:

Has anyone faced a similar issue or have any insights on how to ensure that the filter works correctly regardless of the notation? I am particularly looking for a solution or workaround that would allow the service consumption model to accurately interpret the property without causing errors in the filter conditions. I would also like to maintain the camelCase notation for the properties in the service binding created based on the CDS abstract entity.

If any further information is required, please ask. Thank you in advance for your assistance and insights!

Rafael

Accepted Solutions (0)

Answers (0)