Skip to Content
avatar image
Former Member

Close Production Order impossible with DI API on 9.1

Hi,

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 20, 2015 at 07:37 AM

    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 ???

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 17, 2015 at 04:09 PM

    Hello Bruno:

    This bug was fixed with 9.1 PL 9.

    Official note: http://service.sap.com/sap/support/notes/2185191

    Best regards,

    Joerg.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 13, 2015 at 07:42 AM

    Hi Bruno,

    I'd recommend testing on a 9.0 system to check if there was a change in behavior of the API. Also what was the status of the ProductionOrder you are trying to close?


    Best regards,

    Pedro Magueija


    View Pedro Magueija's profile on LinkedIn

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Bruno,

      Perhaps then it's best to open a ticket with SAP Support. I'd send them the sample code and explain the different behavior.

      If you do so, please share the answer here afterwards.

      Cheers.


      Best regards,

      Pedro Magueija


      View Pedro Magueija's profile on LinkedIn