那位大侠做过在VB里CALL SAP里的Function,给个例子可以吗?谢谢了!

liangsonliu 2003-10-16 07:51:37
那位大侠做过在VB里CALL SAP里的Function,给个例子可以吗?谢谢了!
...全文
33 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
chumliu 2003-10-16
  • 打赏
  • 举报
回复
Dim Functions As Object
Dim GetCustomers As Object
Dim Customers As Object
Dim customers1 As Object
Dim Connection As Object
Private Sub SAPLogonControl1_Click()

Set Functions = SAPFunctions1
Set Functions.Connection = SAPLogonControl1.NewConnection
Functions.Connection.System = "W01"
Functions.Connection.ApplicationServer = "192.168.1.78"
Functions.Connection.SystemNumber = 0
Functions.Connection.User = "xxx"
Functions.Connection.Password = "xxxxxx"
Functions.Connection.Client = "202"
If Functions.Connection.Logon(form1.hWnd, True) = False Then
MsgBox "联接SAP失败!"
Exit Sub
End If
Set GetCustomers = Functions.Add("Z_MM_YKT_LL_1")
GetCustomers.Exports("MBLNR") = mblnr.Text (此处出现91错误)
GetCustomers.Exports("ZEILE") = zeile.Text
GetCustomers.Exports("USERID") = userid.Text
GetCustomers.Exports("USERNAME") = username.Text
If GetCustomers.Call = True Then
MsgBox " 已成功记录! "
Else
MsgBox " 记录失败!请检查凭证号和项目号是否正确 "
End If
Functions.Connection.Logoff

End Sub

2,679

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 ERP/CRM
社区管理员
  • ERP/CRM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧