Code: Alles auswählen.
Dim inputTable As Object
Dim i As Integer
Dim material As String
' Die Function-Instanz wird erzeugt
func1 = FunctionCtrl.Add("BAPI_EQUI_GETDETAIL")
' Export-Paramter definieren
func1.Exports("EQUIPMENT") = "P-1000-N999"
inputTable = func1.Tables("DATA_SPECIFIC_EXP")
If Not func1.Call Then
If func1.exception <> "" Then
MsgBox("Fehler: " & func1.exception)
End If
Else
For i = 0 To inputTable.RowCount
material = inputTable(i, "MATERIAL")
txtFunctionOutput.Text = material
Next
End If
Code: Alles auswählen.
Dim Func As SAPFunctionsICX.Function
Private R§Connection As SAPLogonCtrl.Connection
Public iDate As SAPFunctionsOCX.Parameter
Public iTable As SAPTableFactoryCtrl.Table
Code: Alles auswählen.
Private oBAPICtrl As Object 'BAPI Control
Private oConnection As Objec 'Connection object
Private oPersonalData As Object 'Table object
Dim boolLogon As Boolean 'Logon help variable
Const APPID = "Employee Example Program "
Private Sub Form_Load()
'
'Creating BAPI object
Set oBAPICtrl = CreateObject("SAP.BAPI.1")
'
'Creating Connection object
Set oConnection = oBAPICtrl.Connection
cmdList.Enabled = False
mnuEmployeeList.Enabled = False
boolLogon = False
End Sub
Code: Alles auswählen.
'Deklarationen
Public FunctionCtrl As Object
Public sapConnection As Object
Public SilentLogon As Boolean
' FunctionCtrl
FunctionCtrl = CreateObject("SAP.Functions")
sapConnection = FunctionCtrl.Connection
SilentLogon = True
sapConnection.Logon(0, SilentLogon)
FunctionCtrl.Connection = sapConnection