cancel
Showing results for 
Search instead for 
Did you mean: 

.net connector 3 - Invalid Delta Manager object ID (2 <=> 1)

Former Member
0 Kudos

Hi,

Here is my sample .net code;

Dim f As IRfcFunction = Nothing

        Dim structImport As IRfcStructure = Nothing

        Dim tblImport As IRfcTable = Nothing

        Try

           'PROD

            Dim destination As RfcDestination = GetRfcDestination("SAP", "SAT", "111111111", "111", "TR", "111.11.1.111", "0", "20", "10")

            f = destination.Repository.CreateFunction("ZFI_SEND_EXPENSE_FROM_WEB_IN")

            Dim rowcount As Integer = dt.Rows.Count

            Dim i As Integer

            For i = 0 To rowcount - 1

                structImport = destination.Repository.GetStructureMetadata("ZFI_MASRAF_IN").CreateStructure()

                structImport.SetValue("FORMNO", dt.Rows(i).Item("SAPFormID"))

                structImport.SetValue("BUZEI", i + 1)

                structImport.SetValue("LIFNR", "00" + dt.Rows(i).Item("employeeNumber"))

                structImport.SetValue("FORMTAR", DateTime.Parse(dt.Rows(i).Item("CreationDate")))

                structImport.SetValue("BLDAT", DateTime.Parse(dt.Rows(i).Item("BelgeTarihi")))

                structImport.SetValue("XBLNR", dt.Rows(i).Item("BelgeNo"))

                structImport.SetValue("DMBTR", dt.Rows(i).Item("MasrafTutar"))

                structImport.SetValue("WAERS", dt.Rows(i).Item("ParaBirimi"))

                structImport.SetValue("KDVGOS", dt.Rows(i).Item("KDV"))

                structImport.SetValue("KOSTL", dt.Rows(i).Item("MasrafYeri"))

                structImport.SetValue("SAKNR", dt.Rows(i).Item("MasrafTipiNo"))

                structImport.SetValue("MTIPI", dt.Rows(i).Item("MasrafTipi"))

                structImport.SetValue("FLAG", "0")

                structImport.SetValue("MTANIM", dt.Rows(i).Item("Aciklama"))

                structImport.SetValue("SIRKET", dt.Rows(i).Item("Sirket"))

                structImport.SetValue("ACIKLAMA", dt.Rows(i).Item("Aciklama"))

                structImport.SetValue("YURTICI", dt.Rows(i).Item("YurtIci"))

                tblImport = f.GetTable("T_EXPENSE")

                tblImport.Append(structImport)

            Next

            f.Invoke(destination)

          

        Catch ex As Exception

            returnm = ex.Message

        Finally

And when I run this code above, it gives Invalid Delta Manager object ID (2 <=> 1) error but still writes into SAP. How can I fix this? I mean what is this error message?

Best Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Patch 3.0.11 should now fix this problem. See SAP note 1794081.

Former Member
0 Kudos

Hi Ulrich,

This is a very good news. How can I get the patch for x64 .NET 4.0?

Thank you.

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Cenk,

simply go https://service.sap.com/connectors -> SAP Connector for Microsoft .NET. In the download section you'll find the latest patch level.

Best regards,

Markus

former_member197445
Contributor
0 Kudos

Apparently that message is returned when an RFC call receives two tables with the same name. 

Perhaps it would help if you would move the statement -- tblImport = f.GetTable("T_EXPENSE")  -- outside/before the FOR NEXT loop.

Former Member
0 Kudos

Hi Case Ahr,

Thank you for your reply. I will try and let you know.

Best Regards.

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

In fact, you can simplify the code even more: delete the line

structImport = destination.Repository.GetStructureMetadata("ZFI_MASRAF_IN").CreateStructure()

Instead you can do something like

tblImport = f.GetTable("T_EXPENSE")

tblImport.Append(rowcount)

For i = 0 To rowcount - 1

     tblImport.CurrentIndex = i

     tblImport.SetValue("FORMNO", dt.Rows(i).Item("SAPFormID"))

     ....

     tblImport.SetValue("YURTICI", dt.Rows(i).Item("YurtIci"))

Next

However, I'm afraid this will probably not fix the problem. We are currently investigating exactly this error, which appears in a few other customer cases, but we cannot yet reproduce it locally at SAP. If the error still appears in your scenario with the simplified code, would you be willing to try out a few NCo patches for us and test whether they fix the problem? (At the moment we think it's a problem in the interaction of the NCo Delta-Manager layer and the R/3 kernel, which happens only in certain special cases.)

Thanks and best Regards, Ulrich Schmidt

NCo Team

Former Member
0 Kudos

Hi Ulrich,

Thanks for your reply. I feel better now when I heard I am not the only one experiencing this problem. Actually this problem occurs on the production SAP not on development. I also could not test what Case Ahrsuggested. I will also try your way and let you know.

Best Regards.

Former Member
0 Kudos

Hi Ulrich,

How can I get the patches?

Best Regards.

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Cenk,

the next patch day for NCo is still a while away. But I can trigger a beta patch, so you can test whether the fix works in your scenario.

What NCo variant do you need (x86/x64, .NET 2.0/4.0) ?

Regards, Ulrich

Former Member
0 Kudos

Hi Ulrich,

I want x64,.net 4.0 please. But using a beta patch on production will be dangerous

Former Member
0 Kudos

Hi Ulrich,

Can I get .NET 4.0 please?

Thank you.