cancel
Showing results for 
Search instead for 
Did you mean: 

Very slow performance adding record to UDT when using 64 BIT DI API

n_piccone
Explorer
0 Kudos

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>

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

n_piccone
Explorer
0 Kudos

Thanks for the answer.

We are already at the last PL of SAP B1 10 (FP2202 HotFix 1).

In the meanwhile how could we solve?

There's no workaround and trying to connect using DI API 32 bit doesn't work (Error Interface not registered and so on...)

maik_delly
Active Contributor
0 Kudos

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.