on 2022 Oct 06 11:19 AM
Hi all,
i've a batch process that needs to insert thousands of record in a UDT of type NoObject AutoIncrement.
SInce i used the 32 bit sdk (prior to SAP 10) insert were very fast.
Now i'm migrating my batch to 64 bit version for SAP 10 FP2202 HF1 SQL.
The same insert in the same UDT using 64bits SDK took abour 1 minute and 18 seconds for a SINGLE record!
How could we solve?
Here my simple code
oSerialTable.UserFields.Fields.Item("U_TIMESTAMP").Value = Utility.GetTimestamp_Short()
oSerialTable.UserFields.Fields.Item("U_ITEMCODE").Value = ItemCode
oSerialTable.UserFields.Fields.Item("U_SERIALNUMBER").Value = SerialNumber
oSerialTable.UserFields.Fields.Item("U_SIM").Value = CStr(Sim)
oSerialTable.UserFields.Fields.Item("U_TIPOEVENTO").Value = CStr(tipoEvento)
oSerialTable.UserFields.Fields.Item("U_DATAEVENTO").Value = DataEventoToUse
oSerialTable.UserFields.Fields.Item("U_TIPOCESPITE").Value = "ND"
oSerialTable.UserFields.Fields.Item("U_ANOMALIA").Value = "N"
'oSerialTable.UserFields.Fields.Item("U_TIPOANOMALIA").Value = TipoAnomalia
'oSerialTable.UserFields.Fields.Item("U_DESCANOMALIA").Value = DescrizioneAnomalia
oSerialTable.UserFields.Fields.Item("U_PROCESSED").Value = "N"
oSerialTable.UserFields.Fields.Item("U_COSTOISTALLAZIONE").Value = Replace(objSerialNumber.installationCost, ".", ",")
Try
lRet = oSerialTable.Add()
If lRet = 0 Then
retMsg = "Codice Articolo: " & ItemCode & " - Seriale: " & SerialNumber & " - EVENTO: " & tipoEvento.ToString() & " AGGIUNTO CON SUCCESSO SU TABELLA " & oSerialTable.TableName
Else
retMsg = "Codice Articolo: " & ItemCode & " - Seriale: " & SerialNumber & " - EVENTO: " & tipoEvento.ToString() & " ERRORE INSERIMENTO SU TABELLA " & oSerialTable.TableName & "- [DI ERROR]: " & oCompany.GetLastErrorDescription
End If
'retMsg = "Codice Articolo: " & ItemCode & " - Seriale: " & SerialNumber & " - EVENTO: " & tipoEvento.ToString() & " AGGIUNTO CON SUCCESSO SU TABELLA " & oSerialTable.TableName
'ReleaseObject(oSerialTable)
Catch ex As Exception
retMsg = "Codice Articolo: " & ItemCode & " - Seriale: " & SerialNumber & " - EVENTO: " & tipoEvento.ToString() & " ERRORE INSERIMENTO SU TABELLA " & oSerialTable.TableName
Return False
End Try<br>
Hi n.piccone,
You are having the same scenario as mentioned in SAP Note 3149188.
Currently, the issue is supposed to be fixed in one of the upcoming patches. If you would like to follow up, kindly create an incident under the component SBO-SDK-DI.
Mention the link of this thread while creating the incident.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Nicola,
I openend the original ticket with SAP, but provided them more information. For example the number of columns and fieldsize is also having an impact. There is no pattern, sometime you add a column and the record add is fast again.
Only viable solution for non-object UDTs is to use SQL to add / update functionality.
User | Count |
---|---|
111 | |
8 | |
8 | |
6 | |
6 | |
5 | |
4 | |
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.