请注意,您必须对要放入一个单元格的所有文本使用“双引号”,然后分别使用 0X09 和 0X0A 连接单元格以获取下一列和下一行。查看以下代码,因为它用 2 行填充两个单元格: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 = "username" sapConn.Connection.Password = "xxxx" sapConn.Connection.client = "client#" sapConn.Connection.ApplicationServer = "Application Server” 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。