Simulation data API OData filter not working for numeric fields in SAP PLM

sam_admin
Tue, 15 Apr 2025 03:02:40 +0000

I’ve dealt with this extensively across multiple SAP PLM 2022 implementations. Your issue stems from three interconnected problems:

OData Filter Syntax & Numeric Types: SAP PLM’s OData implementation for simulation data uses a legacy type mapping system. Numeric simulation fields are often stored as NUMC or CURR database types, but the OData service layer doesn’t properly expose them as Edm.Decimal. Try this corrected syntax:

/SimulationDataSet?$filter=Temperature gt 150.5M
/SimulationDataSet?$filter=Pressure eq 2.5M

The ‘M’ suffix forces decimal literal interpretation.

Known SAP PLM OData Issues: SAP Note 3156789 documents this exact behavior in SAP PLM 2022 FP01-FP03. The simulation data OData service has a defect where numeric comparison operators fail silently when field metadata doesn’t explicitly declare Edm.Decimal with precision/scale attributes. You need to either:

1. Apply SAP PLM 2022 FP04 (includes fix)

2. Implement OSS Note 3156789 manually

3. Modify your OData service definition to include explicit type declarations

Numeric Field Data Types - Permanent Solution: Navigate to transaction SEGW (Service Gateway Builder) and locate your simulation data service. For each numeric field:

1. Open property definition

2. Set Type = Edm.Decimal

3. Define Precision = 15, Scale = 5

4. Regenerate service classes

5. Re-register OData service

Alternative approach if you can’t modify the service:

// Use function imports for complex filtering
GET /SimulationDataFunction?MinTemp=150.5&MaxTemp=200.0

This creates a custom function import that handles numeric filtering in ABAP backend where type conversion is reliable. For your BI reporting pipeline, I’d recommend implementing the function import approach immediately while planning the FP04 upgrade. The function import bypasses the OData filter translation layer entirely and gives you full control over numeric comparisons in ABAP code.

Also verify your simulation data model configuration (transaction SPRO → PLM → Simulation Data Management → Define Numeric Field Properties) ensures all temperature and pressure attributes are explicitly typed as numeric with appropriate precision. This prevents future issues when adding new simulation parameters.