cancel
Showing results for 
Search instead for 
Did you mean: 

Field cannot be updated (error -1029) when updating an User Defined Field in a sales order

former_member209954
Participant
0 Kudos
1,243

Hello,

I have an odd problem and I was wondering if anyone know the solution for this.

In short, I have created an application that automates SAP through its DI API to update one User Defined field in a given Sales Order. This application updates about 100 orders a day, give or take, automatically. For some odd reason, every now and then the application fails to update an order, giving one of any of the following errors:

* [RDR1.DiscPrcnt][line: #] , 'Field cannot be updated (ODBC -1029)'

* [ORDR.VatSum] , 'Field cannot be updated (ODBC -1029)'

* [ORDR.DocTotal] , 'Field cannot be updated (ODBC -1029)'

* (-5002) Update of "Address" field is not possible [RDR12.StreetS][line: 0]

However, if I open the offended order using the SAP Client Application and I update the field manually, the field is updated successfully. There is no rhyme or reason about the order status: sometimes the order has been shipped, sometimes it is just open. My understanding is that User Defined fields can be updated even if the order is partially closed - otherwise the SAP client would not allow me to update it. Also, it fails on just a couple of orders every now and then. All others are processed successfully.

I'm using SAP version 10 PL 2

Here is the code I use:

Dim oMyDocument As SAPbobsCOM.Documents = oThirdPartyMgr.sboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)

Dim blnResult As Boolean = oMyDocument.GetByKey(lngSalesOrderEntry)

Dim usfValues As SAPbobsCOM.UserFields = oMyDocument.UserFields

Dim colFields As SAPbobsCOM.Fields = usfValues.Fields

Dim oMyField As SAPbobsCOM.Field = Nothing

If (0 < colFields.Count) Then

For lngFieldIndex = 0 to (colFields.Count - 1)

oMyField = colFields.Item(lngFieldIndex)

With oMyField

If (.Name.ToLower() = strParamName) Then

.Value = strParamValue

Exit For

End If

End With

Next

End If

lngResult = oMyDocument.Update()

Note that:

* The code does not touch discounts

* The code does not touch the Sales Order totals,

* I don't even know what a VatSum is

Any help is greatly appreciated.

Manuel

View Entire Topic
erik_vandongen
Explorer
0 Kudos

Hi There,

We're facing exactly the same issue since we moved from sapb1 9.3 pl6 to pl14.

Did you found a solution for this as I just set the field "Confirmed" to Yes and get the error:
[RDR1.DiscPrcnt][line: #] , 'Field cannot be updated (ODBC -1029)'

Any help is appreciated because our workflow is stuck.

Thank you

former_member209954
Participant
0 Kudos

Hi E. van Dongen,

No solution so far. Every now and then, I have to log on and clean those few failed ones manually. It's painful.

Manuel