Skip to Content
author's profile photo Former Member
Former Member

Connection - SAP x

I am using this code to do a connection between SAP and

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim R3 As Object

Dim FBFUNC As Object

Dim exp_numero_msg As String

Dim exp_texto_msg As String

Dim TAB_RET As New DataTable

Dim tabela As DataRow

R3 = CreateObject("SAP.Functions")

R3.Connection.Client = "300"

R3.Connection.System = "MLD"

R3.Connection.ApplicationServer = "SAPDES"

R3.Connection.SystemNumber = 0

R3.Connection.Language = "PT"

R3.Connection.User = "USESAP"

R3.Connection.Password = "SENHA1"

R3.Connection.Logon(0, True)

If R3.Connection.IsConnected Then



FBFUNC.Exports("I_PROGRAMA") = "10"

'tabela. = FBFUNC.tables("T_LANCTO").value

If FBFUNC.Call Then

REM **Mover X para flag de indicação de chamada de função (sucesso)**

'exp_flag_func_ok = "X"

REM **Obter os parâmetros de retorno da função**

exp_numero_msg = FBFUNC.Imports("E_NUM_MSG").value

'exp_texto_msg = FBFUNC.Imports("E_TXT_MSG")

TextBox1.Text = exp_numero_msg

End If

End If

End Sub

Everithing is working perfectly, except the table I need find some information in SAP and put it in a table in

Could someone send some way to do this?

Thank you, very much.

Andre Vilela

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 18, 2008 at 06:48 PM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.