0

This is the url I try to call:

/sap/opu/odata/sap/ZEITERFASSUNG_SRV/ArbeitszeitenSet?$filter=Pernr eq '00000141' and Datum='20120822'

The fields exist, are filterable and written correctly. If I remove the Date part from the URL it is working. Response I am getting:

<?xml version="1.0" encoding="utf-8"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <code>005056A509B11EE1B9A8FEC11C21178E</code>
    <message xml:lang="de">An Position 24 wurde ein ungültiger Token festgestellt</message>
    <innererror xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
        <transactionid>7D84538F491C0080E00591BF48EADF30</transactionid>
        <timestamp>20170607112124.9987340</timestamp>
        <Error_Resolution>
            <SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (Sys
            <SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/s
        </Error_Resolution>
    </innererror>
</error>

It seems like I can't chain filters with and & or (both not working).

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Felix D.
  • 4,811
  • 8
  • 38
  • 72

1 Answers1

0

I was able to solve the problem by casting the value to datetime in my url.

/sap/opu/odata/sap/ZEITERFASSUNG_SRV/ArbeitszeitenSet?$filter=Pernr eq '00000141' and Datum eq datetime'2012-08-22T15:15:15'&$format=json

somehow the date part is not transmitted to the backend but thats okay since it's not needed.

Felix D.
  • 4,811
  • 8
  • 38
  • 72