Skip to Content

Hello community,

in an e-mail wrotes me Stefan Geiger about different behaviour after installing the actual SAP GUI for Windows 7.50 with the changed ActiveX controls. This means the old ActiveX controls bases on Classic RFC library and the new ActiveX controls bases on SAP NetWeaver RFC library.

  1. The length of a return value from a table was with the old ActiveX controls corresponding to the content, but with the new ActiveX controls corresponding to the definition.
  2. The setting of a value from a table column doesn’t work anymore with the new version.

For my test scenario I use an enviroment which I described here.

Here my analysis about this behaviour:

Value Length

With the old ActiveX controls delivers the call of RFC_READ_TABLE with the table USR01 exact the length of the table USR01 plus delimiters:

But with the new ActiveX controls delivers the same program the length of the data structure (UC):

If you transfer a great data volum, it could be give some memory problems.

Set Value of a Table Column

With the old ActiveX controls you can set a value of a table column. Here a snippet with AutoIt:

$Row = $ReadTableFunc.Tables("FIELDS").Rows.Add
$Row = $ReadTableFunc.Tables("FIELDS").Rows.Add

This delivers in the SAP system this:

But with the new ActiveX controls delivers the same program this:

It seems that it is not possible to set the value of a table column at the moment.


The Test Program

To test this different behaviour I use an AutoIt script which calls RFC_READ_TABLE with the table USR01. The code is commented and really easy to understand.


  AutoItSetOption("MustDeclareVars", 1)

  ;-Sub Main------------------------------------------------------------
  Func Main()

    Local $SAPFunc = 0, $Connection = 0, $SAPConnection = 0
    Local $ReadTableFunc = 0, $Param = 0, $Table = 0
    Local $RowCount = 0, $DataLine = "", $i = 0

    ;-Get SAP.Functions-------------------------------------------------
    $SAPFunc = ObjCreate("SAP.Functions.Unicode")
    If Not IsObj($SAPFunc) Then
      MsgBox(0, "Hint", "Can't create SAP.Functions.Unicode object")

    ;-Get SAP.LogonControl connection-----------------------------------
    $Connection = $SAPFunc.Connection
    If Not IsObj($Connection) Then
      MsgBox(0, "Hint", "Can't get SAP.LogonControl connection")

    ;-Set connection parameters-----------------------------------------
    $Connection.Client = "001"
    $Connection.User = "BCUSER"
    $Connection.Password = "minisap"
    $Connection.Language = "EN"
    $Connection.System = "NSP"
    $Connection.HostName = "ABAP"
    $Connection.SystemNumber = 0

    ;-Connect SAP system------------------------------------------------
    $SAPConnection = $Connection.Logon(0, -1)
    If $SAPConnection = 0 Then
      MsgBox(0, "Hint", "Can't logon to the SAP system")

    ;-Get ABAP function module RFC_READ_TABLE---------------------------
    $ReadTableFunc = $SAPFunc.Add("RFC_READ_TABLE")
    If Not IsObj($ReadTableFunc) Then
      MsgBox(0, "Hint", "Can't get the function module")

    ;-Define export parameters------------------------------------------
    $ReadTableFunc.Exports("QUERY_TABLE").Value = "USR01"
    $ReadTableFunc.Exports("DELIMITER").Value = "~"

    ;-Call ABAP function module RFC_READ_TABLE to read table USR01------

    ;-Show the content of the table-------------------------------------
    $Table = $ReadTableFunc.Tables("DATA")
    If IsObj($Table) Then
      $RowCount = $Table.RowCount
      For $i = 1 To $RowCount
        $DataLine = $Table.Value($i, "WA")
        MsgBox(0, "Data", "Length: " & StringLen($DataLine) & @CrLf & _



  If @AutoItX64 Then
    MsgBox(0, "Version", "AutoIt " & @AutoItVersion & " x64")
    MsgBox(0, "Version", "AutoIt " & @AutoItVersion & " x86")




I asked about the future of ActiveX controls here. I wrote a recommendation about the ActiveX controls here. And a few tips how to work with it eg. here and here. I was surprised about the further development of the ActiveX controls with the SAP GUI for Windows 7.50, because for a long time it looked as if no changes could be expected.


2017/09/26: With the SAP GUI for Windows 7.50 PL 2 from 2017/09/12 the error is fixed. Thanks to Badari, Gaurav and Shruthi for the efforts.



To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Frank Krause

    Hello Stefan,

    thank you for this great post.
    I would like to quickly comment from SAP side:

    • The change you explain above is mentioned in our note “2256415 – Adaptation of RFC controls (Logon, Function, Table and BAPI) to use SAP NetWeaver RFC Library”
    • We do not intend to “revive” these controls, but we are keeping them alive for compatibility
    • The background of the switch to SAP NetWeaver RFC is the fact that the classical RFC library (librfc32.dll) – which had been used by these controls in the past – is no longer supported

    Best regards,

    1. Stefan Schnell Post author

      Hello Frank,

      thank you very much for your reply.

      Thanks also for the clear words that the controls should not be revived – that is good to know.


  2. Badari Nath J

    Hi Stefan,

    We are from SAP GUI Controls development team and we have developed these new ActiveX controls based on SAP NetWeaver RFC library.

    Thanks a lot for sharing your observations. We have fixed both the issues observed by you.

    We have also released SAP Note 2483700 to address these issues.

    We would like to share test binaries with you so that you can recheck and share your feedback.

    It would be good if you can share you mail id so that we can share test binaries which contains fixes for both the issues.

    Please feel free to share your feedback/observations while using the new ActiveX controls based on SAP NetWeaver RFC library.

    Thanks a lot for your efforts in sharing your feedback.

    Please feel free to reach out to us in case if you need any further clarification about the new NWRFC based ActiveX controls.

    Thanks and Regards,

    Badari Nath(, Gaurav and Shruthi.


  3. Badari Nath J

    Hi Stefan,

    You are welcome.

    Feel free to get back to us in case if you need any clarification on these new SAPNRFC based activeX controls.

    Thanks and Regards,

    Badari Nat


Leave a Reply