Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RFC_READ_TABLE In Visual Basic

Former Member
0 Kudos
964

Hi experts, I was trying to use the RFC_READ_TABLE more than once but I couldn't

I have this code:

Set Functions = CreateObject("SAP.Functions") Functions.Connection.System = "Tenaris - TEST" 'Ambiente en SAP

Functions.Connection.client = xxxx

Functions.Connection.user = xxxx

Functions.Connection.Password = xxxx

Functions.Connection.Language = xxxx

Set RfcCallTransaction = Functions.Add("RFC_READ_TABLE")

Set strExport1 = RfcCallTransaction.exports("QUERY_TABLE")

Set strExport2 = RfcCallTransaction.exports("DELIMITER")

Set strExport3 = RfcCallTransaction.exports("NO_DATA")

Set strExport4 = RfcCallTransaction.exports("ROWSKIPS")

Set strExport5 = RfcCallTransaction.exports("ROWCOUNT")

Set tblOptions = RfcCallTransaction.Tables("OPTIONS")

Set tblFields = RfcCallTransaction.Tables("FIELDS")

Set tblData = RfcCallTransaction.Tables("DATA")

strExport1.Value = xxxx

strExport2.Value = xxxx

strExport3.Value = xxxx

strExport4.Value = xxxx

strExport5.Value = xxxx

tblOptions.AppendRow

tblOptions(1, "TEXT") = xxxx

tblFields.AppendRow

tblFields(1, "FIELDNAME") = xxx

If RfcCallTransaction.Call = True Then

If tblData.ROWCOUNT > 0 Then

Dim DatTxt, OutputTxt As String

For intRow = 1 To tblData.ROWCOUNT

VG = tblData(intRow, "WA")

Next

Else

MsgBox "No records returned"

End If

Else MsgBox "Error en la Query"

End If

I need to made more than one query but without logoff, do you know if there's some how to do it?

6 REPLIES 6

former_member186338
Active Contributor
0 Kudos
163

Sorry, but your question has no relation to the tag:

EPM Add-In for Excel

former_member186338
Active Contributor
0 Kudos
163

What do you mean by "trying to use the RFC_READ_TABLE more than once"

Matt_Fraser
Active Contributor
0 Kudos
163

Hi Vadim,

What tag would you suggest for this question? I was looking for something related to .NET Connector, but that doesn't seem to exist anymore.

Cheers,
Matt

former_member186338
Active Contributor
0 Kudos
163

Hi matt.fraser ,

I don't know what is the correct tag, but it's absolutely not EPM Add-In for Excel (Excel BPC Client)

Number of similar questions were asked in ABAP Development

Matt_Fraser
Active Contributor
0 Kudos
163

I've moved it there, though I'm not convinced that's the right tag. Perhaps a moderator over there will have a better idea.