Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7887385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:33:58+00:00 2026-06-03T05:33:58+00:00

I have an old program pushing some data from a Microsoft SQL server database

  • 0

I have an old program pushing some data from a Microsoft SQL server database to SAP. It uses Microsoft .NET Data Provider for mySAP Business Suite to connect to SAP and up to the moment it has worked perfectly.

Now, as a part of an improvement plan, I’ve been ask to migrate from Microsoft driver to the new SAP .NET Connector, version 3.0. Since I didn’t have any experience with either Microsoft connector neither with SAP connector, I started from the documentation. Even though I think I’ve done my homework I’m getting an error that I’m not able to solve or find any information about.

My main function:

    log.Debug("Get the SAP destination")
    Dim destination As RfcDestination = RfcDestinationManager.GetDestination("SAP")

    log.Debug("Fetch the function metadata")
    Dim rfcFunction As IRfcFunction = destination.Repository.CreateFunction("Z_TEC_CAT")

    log.Debug("Set the import parameters")
    Dim am As RfcStructureMetadata = destination.Repository.GetStructureMetadata("ZTEC_CAT")
    Dim exportTable As IRfcTable = rfcFunction.GetTable("ZTEC_CAT")
    FillIrfTable(exportTable, invoices)

    log.Debug("Invoking the function Z_TEC_CAT")
    rfcFunction.Invoke(destination)

A helper to populate the table that I have to send to SAP:

    Private Sub FillIrfTable(ByVal sapTable As IRfcTable, ByVal dt As DataTable)

    log.Debug("Started FillIrfTable")
    For Each row As DataRow In dt.Rows
        sapTable.Append()
        Dim index As Integer = 0
        Do While (index < dt.Columns.Count)
            Dim columName As String = dt.Columns.Item(index).ColumnName
            Dim columnValue = row.Item(index)
            sapTable.SetValue(columName, columnValue)
            index = (index + 1)
        Loop
    Next

    log.Debug("Completed FillIrfTable")

End Sub

When the exportable variable is empty, I get a NO_DATA exception and everything is fine, but when the table has records, it throws:

Failed calling SAP Function Module Z_TEC_CAT
SAP.Middleware.Connector.RfcAbapException: BDC_OPEN_ERROR
    at SAP.Middleware.Connector.RfcConnection.ThrowRfcErrorMsg()
    at SAP.Middleware.Connector.RfcConnection.RfcReceive(RfcFunction function)
    at SAP.Middleware.Connector.RfcFunction.RfcDeserialize(RfcConnection conn, IRfcIOStream stream)
    at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn, IRfcIOStream stream, RFCID rid)
    at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn)
    at SAP.Middleware.Connector.RfcFunction.Invoke(RfcDestination destination)

Does anyone know what can be happening? Any suggestion will be greatly appreciated.

Thank you,

Jan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:33:59+00:00Added an answer on June 3, 2026 at 5:33 am

    After a week of fighting agains this I’ve found out what was going on and I think that publishing it may help others not to spend a lot of time on it.

    It looks like the SAP Connector inserts a space in the call (Microsoft connector doesn’t), and because of that, the SAP system couldn’t map the parameter(the exportTable) I was sending to it and failed.

    The SAP programmer on the other end has modified the function so now it is aware of the space and everything works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have rewritten an old program and designed a new database for it. I
I have an old, third party, command line, proprietary program which I'm calling from
I have old code that uses size_t which IIRC comes from cstring.h. On OS
I have an old program that uses XUL and Mozilla Prism to display a
I have a large old program which has some rather complex graphical displays (all
I have a old program in which some library function is used and i
I have an old program written in Dataflex/PowerFlex from back in the mid 90's
I have a program, which uses quickreports 5 to generate some reports. The program
I have an old Fortran program for reading records from text files. The records
Converting an old program into an ASP.NET c# site. I have a table full

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.