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: 

Problems at calling RFC through Visual Basic

Former Member
0 Kudos

Hello, I'm connecting to SAP in Visual Basic and i calling a RFC with this code:

Private Sub cmdFunction_Click()

Set dieFunc = FunctionCtrl.Add("KNA1_READ")

dieFunc.Exports("PI_CUSTOMER") = txtcliente.Text

If dieFunc.Call = True Then

'Mostrar resutado

lblSalida.Caption = dieFunc.Imports("PE_KNA1")

Else

MsgBox "Error when accessing function in R/3!"

Screen.MousePointer = vbDefault

Exit Sub

End If

end sub

and diefunc.call always is false.

can somebody help me?

thanks.

Laura Zaragoza

1 REPLY 1

guillaume-hrc
Active Contributor
0 Kudos

If you have a rcent SAPGui (6.20 at least I think), try the External Debugging (Utilities -> Settings -> Debugging) and set a breakpoint (select External).

Good luck!