Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Close Production Order impossible with DI API on 9.1


Since I upgrade my customer from B1 9.0 to 9.1 Patch 4,I can't close ProductionOrder  witch have transaction

My code is :

Dim OrdreFabrication As ProductionOrders = DirectCast(oCompany.GetBusinessObject(BoObjectTypes.oProductionOrders), ProductionOrders)

If OrdreFabrication.GetByKey(Docentry) Then

     If OrdreFabrication.ProductionOrderStatus = BoProductionOrderStatusEnum.boposReleased Then

          OrdreFabrication.ProductionOrderStatus = BoProductionOrderStatusEnum.boposClosed

           If OrdreFabrication.Update <> 0 Then

                SBO_Application.StatusBar.SetText(String.Format("ERROR : {0}", oCompany.GetLastErrorDescription), BoMessageTime.bmt_Short, BoStatusBarMesspe.smt_Error)

          End If

      End If

End if

I have this error message : Action is valid for planned or released production orders with no transactions  [WOR1.PlannedQty][line: 1] , 'Row no. 1'

Is it a bug or a new process exist to close a productionorder with transaction,(this object has no method "close" only (add, update and Cancel method)

Best regards

Former Member
Former Member replied

That's a SAP BUG.

It's impossible to close on 9.1 version a production order create before the 9.1.version

Solution : Close manually the production order directly on SAP B1

Why SAP don't test this case in DI API ???

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question