网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

vba抓取sap系统数据的简单介绍

怎么用VBA获取SAP internal table的资料.

Public Sub get_data(itabtable As Object) Dim vField As Variant Static j As Integer For j = 1 To itabtable.RowCount ThisWorkbook.Sheets(4).Cells(j, 4) = itabtable.Value(j, "GNAMEquot ThisWorkbook.Sheets(4).Cells(j, 5) = itabtable.Value(j, "GUSRquot ThisWorkbook.Sheets(4).Cells(j, 6) = itabtable.Value(j, "GUSRVBquot NextEnd Sub

洪泽ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联公司的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!

如何通过excelVBA进去SAP系统提取相关

Private Sub CommandButton1_Click()Dim Functions As ObjectDim func As ObjectDim iTable As Object' Create the Function control (that is, the high-level Functions collection):Set oFunction = CreateObject("SAP.LogonControl.1")Set oConnection = oFunction.NewConnectionoConnection.client = "100"oConnection.Language = "EN"oConnection.user = "username"oConnection.Password = "password"oConnection.ApplicationServer = "10.1.0.1"oConnection.SystemNumber = "00"result = oConnection.Logon(0, True)Set ofun = CreateObject("SAP.FUNCTIONS")Set ofun.Connection = oConnectionSet func = ofun.Add("ENQUEUE_READ")' Set the export parameters (here, get all customers whose names start with J):func.Exports("GCLIENT") = "100"func.Exports("GUNAME") = ""func.Exports("LOCAL") = "0"Set iTable = func.Tables("ENQ")' Call the function (if the result is false, then display a message):If func.Call = True ThenSet iTable = func.Tables("ENQ") 'ENQ is the internal tableget_data iTableMsgBox "Get Data OK!"ElseMsgBox " Call Failed! error: " '+ func.ExceptionEnd IfoConnection.LogoffEnd SubPublic Sub get_data(itabtable As Object)Dim vField As VariantStatic j As IntegerFor j = 1 To itabtable.RowCountThisWorkbook.Sheets(4).Cells(j, 4) = itabtable.Value(j, "GNAME") '任何一个栏位名称ThisWorkbook.Sheets(4).Cells(j, 5) = itabtable.Value(j, "GUSR")ThisWorkbook.Sheets(4).Cells(j, 6) = itabtable.Value(j, "GUSRVB")NextEnd Sub 查看原帖

[求助]:如何用VBA获取SAP中internal table的数据到excel

Private Sub CommandButton1_Click()Dim Functions As ObjectDim func As ObjectDim iTable As Object' Create the Function control (that is, the high-level Functions collection):Set oFunction = CreateObject("SAP.LogonControl.1")Set oConnection = oFunction.NewConnectionoConnection.client = "100"oConnection.Language = "EN"oConnection.user = "username"oConnection.Password = "password"oConnection.ApplicationServer = "10.1.0.1"oConnection.SystemNumber = "00"result = oConnection.Logon(0, True)Set ofun = CreateObject("SAP.FUNCTIONS")Set ofun.Connection = oConnectionSet func = ofun.Add("ENQUEUE_READ")' Set the export parameters (here, get all customers whose names start with J):func.Exports("GCLIENT") = "100"func.Exports("GUNAME") = ""func.Exports("LOCAL") = "0"Set iTable = func.Tables("ENQ")' Call the function (if the result is false, then display a message):If func.Call = True ThenSet iTable = func.Tables("ENQ") 'ENQ is the internal tableget_data iTableMsgBox "Get Data OK!"ElseMsgBox " Call Failed! error: " '+ func.ExceptionEnd IfoConnection.LogoffEnd SubPublic Sub get_data(itabtable As Object)Dim vField As VariantStatic j As IntegerFor j = 1 To itabtable.RowCountThisWorkbook.Sheets(4).Cells(j, 4) = itabtable.Value(j, "GNAME") '任何一个栏位名称ThisWorkbook.Sheets(4).Cells(j, 5) = itabtable.Value(j, "GUSR")ThisWorkbook.Sheets(4).Cells(j, 6) = itabtable.Value(j, "GUSRVB")NextEnd Sub


新闻名称:vba抓取sap系统数据的简单介绍
网站网址:http://bjjierui.cn/article/ddidcpj.html

其他资讯