SAP Knowledge Base Article - Public

3614100 - How to retrieve open maintenance orders using API in SAP S/4HANA Cloud Public Edition

Symptom

While using API_MAINTENANCEORDER to retrieve open maintenance orders with attribute system status text, got error "Query operation on element 'SYSTEMSTATUSTEXT' of entity 'A_MAINTENANCEORDER' not implemented".

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

API Request:

GET <host>/sap/opu/odata/sap/API_MAINTENANCEORDER;v=2/MaintenanceOrder?$filter=SYSTEMSTATUSTEXT ne 'TECO'

Cause

The field 'SYSTEMSTATUSTEXT' is not supported for query operation with API_MAINTENANCEORDER.

Resolution

Use 'MaintOrdProcessPhaseCode' as a workaround. Field 'MaintOrdProcessPhaseCode' is maintenance order phase code. For completed maintenance orders, the MaintOrdProcessPhaseCode value should be '09' (Completion), which contains four sub-phases:

  • Technically Complete (Order)
  • Work Not Performed (Order)
  • Closed (Order)
  • Deletion Flag (Order)

To retrieve open orders, set Query parameter MaintOrdProcessPhaseCode not equal to 'Completion'. Example:

GET <host>/sap/opu/odata/sap/API_MAINTENANCEORDER;v=2/MaintenanceOrder?$filter=MaintOrdProcessPhaseCode ne '09'

See Also

Help documentation:

Maintenance Process Phases

Read All Maintenance Orders (Version 2)

Keywords

API, maintenance order, open work orders, SYSTEMSTATUSTEXT, MaintOrdProcessPhaseCode, filter, query operation, A_MAINTENANCEORDER. , KBA , PM-FIO-2CL , Fiori User Interface (UI) for PM (Public Cloud) , PM-WOC-MO-2CL , Maintenance Orders (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions