SAP Knowledge Base Article - Public

3060986 - Error - "Property PurchaseOrder not found in type TimeSheetEntry" when using Timesheet API .

Symptom

While trying to filter the timesheet record using the field purchase order in API API_MANAGE_WORKFORCE_TIMESHEET the following error occurs "property PurchaseOrder not found in type TimeSheetEntry"

/sap/opu/odata/sap/API_MANAGE_WORKFORCE_TIMESHEET/TimeSheetEntryCollection?$filter=PurchaseOrder eq 'XXXXXXXXXX'

Environment

SAP S/4HANA Cloud

Reproducing the Issue

Execute the URL /sap/opu/odata/sap/API_MANAGE_WORKFORCE_TIMESHEET/TimeSheetEntryCollection?$filter=PurchaseOrder eq 'XXXXXXXXXX'  in postman tool.

Cause

The filed purchase order is not enabled as filterable in API API_MANAGE_WORKFORCE_TIMESHEET.

You can check the fields enabled for the filter using below URL  in Timesheet API,

/sap/opu/odata/sap/API_MANAGE_WORKFORCE_TIMESHEET/$metadata


Resolution

Currently Only fields PersonWorkAgreementExternalID, CompanyCode, TimeSheetRecord, PersonWorkAgreement, TimeSheetDate, TimeSheetStatus are enabled as filterable.

As a workaround you can create a custom CDS view using the view I_TimeSheetRecord ,in which you can sort the required fields.

Please find the sap help documentation for the CDS I_TimeSheetRecord view below,

SAP Help Documentation - Manage Workforce Timesheet API

See Also

SAP API HUB Documentation - API_MANAGE_WORKFORCE_TIMESHEET

SAP Help Documentation - Manage Workforce Timesheet API


Keywords

Property PurchaseOrder not found in type TimeSheetEntry, Filter, Timesheet API, API_MANAGE_WORKFORCE_TIMESHEET, ?$filter, CA-TS-S4, S4_PC. , KBA , CA-TS-S4 , Cross Application Timesheet in S/4HANA , Problem

Product

SAP S/4HANA Cloud Public Edition all versions