cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve Table contents with RFC Server

Former Member
0 Kudos

Hi all,

I have implemented a RFC Server connection but when I read table content this is empty.

This is the code:

' Implementation of Server Methods

' Implementation of remote function module SD_RFC_CUSTOMER_GET

Protected Overrides Sub Sd_Rfc_Customer_Get( _

ByVal Kunnr As String, ByVal Name1 As String, ByRef Customer_T As RFCCUSTTable)

' TODO: add your server code here

Dim customer As RFCCUST

For Each customer In Customer_T

Console.WriteLine(customer.Kunnr)

Next

End Sub

For Kunnr and Name1 the value are correct but for Customer_T there is not any value.

Any suggestion?

Thanks in advance,

Michele.

Accepted Solutions (1)

Accepted Solutions (1)

reiner_hille-doering
Active Contributor
0 Kudos

In the original RFC_CUSTOMER_GET the parameter Customer_T has "out" sematics, so the function implementing it has to fill the data, not the caller.

If you change your code so that the table is filled and execute the function from SE37, you should see that data that comes back:

Protected Overrides Sub Sd_Rfc_Customer_Get( _

ByVal Kunnr As String, ByVal Name1 As String, ByRef Customer_T As RFCCUSTTable)

' TODO: add your server code here

If (Customer_T = Nothing) Then

Customer_T = New RFCCUSTTable

End If

Dim customer As New RFCCUST

customer.Name1 = "Test"

Customer_T.Add(customer)

End Sub

Answers (0)