SIC and SAP CreateFunction from ERPConnectStandard20.dll
Hi there!
I am using OS v8.1 and SIC with latest ERPConnectStandard20.dll and the other dlls.
I can connect to SAP and retrieve data using READTABLE.
Now I am trying to use CreateFunction but I am struggling.
In my Smart Integration Function I have this :
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.Common
Imports System.Globalization
Imports System.IO
Imports System.Linq
'Added for SAP ERP Connect
Imports Microsoft.VisualBasic
Imports ERPConnect
Imports ERPConnect.Utils
Namespace OneStream.BusinessRule.SmartIntegrationFunction.SAPTest8
Public Class MainClass
Public Shared Function RunOperation() As DataTable
Dim r3Conn = New R3Connection("1.1.1.1", "00", "user", "pass", "EN", "224")
r3Conn.Protocol = ClientProtocol.NWRFC
r3Conn.Open()
Dim r3Func As RFCFunction = r3Conn.CreateFunction("BAPI_MATERIAL_GET_DETAIL")
r3Func.Exports("MATERIAL").ParamValue = "1001"
r3Func.Execute()
Return r3Func.Imports("MATERIAL_GENERAL_DATA").ToTable()
End Function
End Class
End NamespaceAnd in the Connector BR I have this line :
Dim rDto As RemoteRequestResultDto = BRApi.Utilities.ExecRemoteGatewayBusinessRule(si, remoteBusinessRule, remoteFunctionArguments, sicGatewayName, sicRemoteRuleFunction, String.Empty, False, sicTimeout)It is not working as the ToADOTable is not working anymore.
Return r3Func.Imports("TOTALS_SPL").ParamValue.ToADOTable()Can someone help me on this SIF to return the datatable?
And then to make it read by the Connector BR.
Thanks
