Tag: 汁液

Retreive使用Excel通过macros在SAP中显示文本字段

我试图运行SAP脚本logging来自动收集显示多个项目编号的文本。 当我检查它时,这是我得到的代码: If Not IsObject(application) Then Set SapGuiAuto = GetObject("SAPGUI") Set application = SapGuiAuto.GetScriptingEngine End If If Not IsObject(connection) Then Set connection = application.Children(0) End If If Not IsObject(session) Then Set session = connection.Children(0) End If If IsObject(WScript) Then WScript.ConnectObject session, "on" WScript.ConnectObject application, "on" End If session.findById("wnd[0]").maximize session.findById("wnd[0]/tbar[0]/okcd").text = "CS03" session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/ctxtRC29N-STLAN").setFocus session.findById("wnd[0]/usr/ctxtRC29N-STLAN").caretPosition […]

Excel没有数据读取行,然后跳过这一行

我有我的代码问题。 我需要它来读取成本中心和物料编号,然后在SAP中查看。 它是完美的。 问题在于用户应该能够手动input材料和价格,而不需要成本中心和材料编号。 程序应该看到这一行,然后转到下一行。 现在,当遇到空行时,它停止从SAP加载信息。 我知道为什么这样做,但我似乎无法弄清楚如何纠正它。 在下面的代码中,您可以看到代码。 问题是“While”声明。 Sub StartExtract() Dim currentline As Integer ' This is the system to connect to W_System = "PE1400" ' We start looking for order numbers from line 6 in the sheet currentline = 6 While Cells(currentline, 1).Value <> "" ' Run the actual GUI script RunGUIScript currentline […]

VBA到SAP // RFCfunction模块,以表格作为input参数

我想通过RFC连接器将数据从Excel发送到SAP。 对于RFCfunction模块,我必须填写一个表作为input参数。 STFC_DEEP_TABLE RFCfunction模块STFC_DEEP_TABLE 。 不幸的是,我的VBA代码在带有错误的with语句处停止: “对象variables或块variables未设置”。 见下文。 请,有人可以帮我吗? 哪里不对? Sub RFC_DEEP_TABLE() Dim sapConn As Object Set sapConn = CreateObject("SAP.Functions") If sapConn.Connection.Logon(0, False) <> True Then MsgBox "Cannot Log on to SAP" End If Dim objRfcFunc As Object Set objRfcFunc = sapConn.Add("STFC_DEEP_TABLE") With objRfcFunc .Exports.Item("IMPORT_TAB").value("STR") = "X" 'Objectvariable oder With-Blockvariable nicht festgelegt End With If […]