SAP Knowledge Base Article - Public

3168744 - API API_BILL_OF_MATERIAL_SRV;V=0002 and Entity MaterialBOM returns error "Invalid parametertype used at function 'lt'"

Symptom

  • API API_BILL_OF_MATERIAL_SRV;V=0002 and Entity MaterialBOM returns error "Invalid parametertype used at function 'lt'" when using GET Method.
  • Not Possible to use Filter ( $filter ) when querying a BOM using the API API_BILL_OF_MATERIAL_SRV;V=0002 and Entity MaterialBOM

Environment

  • Bill of Material
  • SAP S/4HANA, cloud edition

Reproducing the Issue

Call the API API_BILL_OF_MATERIAL_SRV;v=0002 , Entity using the $filter on field LastChangeDateTime using Method GET

Example : /sap/opu/odata/sap/API_BILL_OF_MATERIAL_SRV;v=0002/MaterialBOM?$filter=LastChangeDateTime lt datetime'2022-01-01T11:11:11'

Cause

The field LastChangeDateTime has time ‘DateTimeOffset’

Resolution

Call the API API API_BILL_OF_MATERIAL_SRV;v=0002  using the $filter on field LastChangeDateTime using datetimeoffset instead of datetime using GET Method

Example : /sap/opu/odata/sap/API_BILL_OF_MATERIAL_SRV;v=0002/MaterialBOM?$filter=LastChangeDateTime lt datetimeoffset'2022-01-01T11:11:11'

Keywords

KBA , LO-MD-BOM , Bills of Material , PLM-FIO-BOM , Fiori UI for Material BOM , Problem

Product

SAP S/4HANA Cloud all versions