on 2020 Nov 18 11:08 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.