Skip to Content
0
Former Member
Oct 25, 2005 at 03:58 PM

How do I read a R/3 table from VB6 using RFC?

205 Views

I am using a DLL created in VB6 to connect to an R/3 system. I then call several ABAP functions I have written and exchange data. This all works nicely.

I now have a R/3 function into which I pass a parameter, and it gathers some data into a table which has 3 string fields. I want to pass that data back to my VB6 DLL, and read all the records from the table.

Unfortunately I have absolutely no idea where to start. If someone could post an example of reading data directly from a table I would appreciate it.

Here is the function so far. It passes the parameter "scenario" to the ABAP Function, and then needs to read the table directly.

    Dim oR3Func As Object
    Dim oFuncLoadDocument As Object
    .....
    bResult = Logon(oR3Func, "SAP.BAPI.1")
    If bResult Then
        Set oFuncLoadDocument = oR3Func.Add("ZMT_SET_SCENARIO")
        oFuncLoadDocument.exports("SCENARIO") = sScenario
        bResult = oFuncLoadDocument.Call
        ' Retrieve and read table here???
    End If

Kind Regards

Jack