请注意,您必须对要放入一个单元格的所有文本使用“双引号”,然后用 0X09 和 0X0A 将单元格分别连接到下一列和下一行。请查看下面的代码,因为它用两行填充了两个单元格:CONSTANTS: nextC TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab, nextR TYPE abap_char1 VALUE cl_abap_char_utilities=>newline, quot TYPE abap_char1 VALUE '"'. DATA: buffer TYPE string. CONCATENATE quot 'R1C1L1' nextR 'R1C1L2' quot nextC quot 'R1C2L1' nextR 'R1C2L2' quot INTO buffer.阅读更多
请尝试使用以下脚本:Dim sapConn As Object \声明连接对象 Set sapConn = CreateObject("SAP.Functions") \创建 ActiveX 对象 sapConn.Connection.user = "用户名" sapConn.Connection.Password = "xxxx" sapConn.Connection.client = "客户端号" sapConn.Connection.ApplicationServer = "应用服务器” sapConn.Connection.Language = "PT" If sapConn.Connection.Logon(0, True) True Then //在此处检查连接 MsgBox "无法登录到 SAP" Else MsgBox "登录成功!!" End If Dim rfcAcctDocCheck As Object Dim oAcctHeader As Object Dim otAcctAR, otAcctGL, otAcctAP, otAcctAMT, otReturn As Object Set rfcAcctDocCheck = sapConn.Add("BAPI_ACC_DOCUMENT_CHECK") Set oAcctHeader = rfcAcctDocCheck.Exports("DOCUMENTHEADER") Set otAcctGL = rfcAcctDocCheck.Tables("ACCOUNTGL") Set otAcctAR = rfcAcctDocCheck.Tables("ACCOUNTRECEIVABLE") Set otAcctAP = ... 阅读更多
在结构中指定表时的基本规则是,您必须为此字段指定一个非唯一约束。TYPES: myType TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEY然后在结构定义中使用它:TYPES: BEGIN OF ty_itab, ….. myTable type myType, …….. TYPES: END OF ty_itab。