cancel
Showing results for 
Search instead for 
Did you mean: 

DI API Create OWOR : Invalid node index

aurelie_arcos
Explorer
0 Kudos
1,144

Hello,

I create production orders vi DI API. It worked well, but since we've migrate to SAP B1 9.3 PL09, we encouter a random issue.

Sometimes, when we do the creation of the Production Order object, we have the -5002 error with this text : Invalid node index; object: %s, node: %s [OWOR.ItemCode][line: 1]

If a I retry to create the same Production Order, it is well created...

This probleme occurs more often and often when we do a big generation of production orders.

There is SDK upgrades in 9.3 which impose limits ?

Can you help me with this error message please ?

Thank you by advance for your help !

Please find below my code :

(...)

SAPbobsCOM.ProductionOrders oWOR = (SAPbobsCOM.ProductionOrders) company.GetBusinessObject(BoObjectTypes.oProductionOrders);

oWOR.DueDate = StartDate;

oWOR.ProductionOrderOrigin = (BoProductionOrderOriginEnum) 0;

oWOR.ItemNo = ItemCode;

oWOR.PlannedQuantity = QteOf ;

oWOR.ProductionOrderStatus = 0;

oWOR.ProductionOrderOriginEntry = Docentry;

oWOR.UserFields.Fields.Item("U_NumLancement").Value =sNomLct;

if (oWOR.Add() != 0) {

company.GetLastError(out iErrCode, out sErrMsg);

application.StatusBar.SetSystemMessage ("SOS:impossible de creer OF pour " + ItemCode + "/" + iErrCode.ToString() + ":" + sErrMsg ,BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);

++iNbErr; }

else { ++iNbOFCrees ; }

Accepted Solutions (0)

Answers (2)

Answers (2)

david_zapata
Explorer
0 Kudos

Excuse me, were you able to resolve this error? Can you share your solution with me because I have the same problem but I can't find documentation about it.

david_zapata
Explorer
0 Kudos

Disculpa, pudiste resolver este error? ,  me puedes compartir tu solución porque tengo el mismo problema pero no encuentro documentación al respecto.

Saludos.