cancel
Showing results for 
Search instead for 
Did you mean: 

Close Production Order impossible with DI API on 9.1

bruno_peyron
Active Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

bruno_peyron
Active Participant
0 Kudos

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

Answers (2)

Answers (2)

JoergAldinger
Active Contributor
0 Kudos

Hello Bruno:

This bug was fixed with 9.1 PL 9.

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

Best regards,

Joerg.

pedro_magueija
Active Contributor
0 Kudos

Hi Joerg,

Thanks for taking the time to share this information with us.

Cheers.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

pedro_magueija
Active Contributor
0 Kudos

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

bruno_peyron
Active Participant
0 Kudos

Hi Pedro

it work fine in 9.0 and earlier version but not in 9.1 !!

I want to close a released productionOrder with some transaction (i can do it on SAP but not with DI API)

Best regards


pedro_magueija
Active Contributor
0 Kudos

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