We are trying to create service order using BAPI BAPI_ALM_ORDER_MAINTAIN and then once order in created we are again releasing the order in loop.
This BAPI is called via oData service by third party system. When there are multiple orders sent in a single call then we are getting error as Order &1 is locked and cannot be changed. Has anyone faced similar issue and how was it resolved
Could you check that BAdI IBAPI_ALM_ORD_MODIFY is executed before the error, you could add an ENQUEUE lock with delay in a small DO/ENDDO loop to wait for other process to end (but that could cause some erformance problems too, e.g. user locking order with IW32)