Compile SIF using Gateway Direct Connect type to connect with SAP

JC_Hackkett
New Contributor II

I have SIC version 8.2.1

I already created the gateway and is online, is a Direct connect type configured to connect with SAP

I already install the SAP dll in the SIC local

When I try to compile my SIF in the Onestream App asks me for the Gateway, but I can't see my direct connect gateway, only shows the Database Gateway

What I'm doing wrong?

 

Regards

8 REPLIES 8

Steven
Contributor II

@JC_Hackkett  - it sounds like you have a couple of gateways setup in SIC and you are trying to use the direct connect gateway , but you can only use the Database Gateway in your Smart Integration Function.  Is this correct?  What methods are you using?  Can you show a snippet of your SIF code? Did you restart your SIC Connector Gateway after you created the new Gateway?

JC_Hackkett
New Contributor II

Hi @Steven  Thanks for replying

To compile a SIF type direct connect can only be done through ExecRemoteGatewayBusinessRule right?

I created a gateway  type = Web API, not for Data Base, I'm trying to connect to SAP, and I already configured the ERPConnectStandard20.dll in Local SIC and import ERPConnect and ERPconnect.Utils

I created a SIF function to run a RFC, in properties from this SIF I specified ERPConnectStandard20.dll

I created an Extensibility Rule this is the code

Dim objRemoteRequestResultDto As RemoteRequestResultDto = BRApi.Utilities.ExecRemoteGatewayBusinessRule(si, "Test2SIFSap", Nothing, "saptest2", "RunOperation",String.Empty, False, 90)
Smart Integration Function called  'Test2SIFSap
SIC Gateway called saptest2 with a method called RunOperation
 
Whe run the Extensibility , now send me a Smart Integration Connector Gateway general error at: 'saptest2 RemoteCodeExec ID
I wonder if I'm calling the SIF right because I don't think it even compiles
Regards

Hi, Now It's working, I had to create a  Gateway datasource type and it already allowed me to compile it in SIF with the SAP dll. It can NOW connect me and bring information

Hi @JC_Hackkett

I'm facing a similar issue with an SAP connection. I was informed that a Database Type connection needs to be created for SAP for ERPConnect. We have added all the necessary DLLs to the local SIC gateway server, and the BR compiles successfully. However, it seems that the connection to SAP is not being established. Here's what we did:

  1. Created a Gateway of Database Type Connection.
  2. Added all the DLLs.
  3. Created an SIF which compiles successfully.
  4. When the External BR referencing the SIF BR is run, it does not establish a connection with SAP.

Can you please help me understand the steps you took to create a data source if you opted for a direct connection? We were informed that creating a data source is not required.

Hi ashimoga 

  It's correct you don't need create a datasource in Local Gateway Connections.

  If the gateway is online, you have to review the DLLs installed, you need  the librfc32.dll installed too

the link SAP Libraries | Theobald Software Online Help (theobald-software.com)

Thanks @JC_Hackkett . Do we need to buy ERPConnect license for this?

I was also validating this topic. No, it is not necessary
Download the dll from the OneStream marketplace according to the SIC manual, once you copy it into the local SIC configuration xml, automatically add the license.

Validate with the Basic or ABAP people that your login request is being received and the request, whether it is to read a table or request an RFC.
I had to take the error that calls you back

This is an example of how to take the error message that comes to you directly from SAP, use some standard RFC and give access to your SAP connection user.

    Dim r3Conn As New R3Connection(host, systemnumber, username, password, language, client)
    r3Conn.Protocol = ClientProtocol.NWRFC
    r3Conn.Open()
 
    If r3Conn.IsOpen Then
        Dim r3Func As RFCFunction = r3Conn.CreateFunction("BAPI_GL_ACC_GETBALANCE")  
        r3Func.Exports("COMPANYCODE").ParamValue = "XXXX"
        r3Func.Exports("GLACCT").ParamValue = "XXXXXXXXX" 
        r3Func.Exports("FISCALYEAR").ParamValue = "XXXX"
        r3Func.Exports("CURRENCYTYPE").ParamValue = "XX"
        r3Func.Execute()
        Dim balanceDetail As RFCStructure = r3Func.Imports("ACCOUNT_BALANCE").ToStructure()
        Dim returnStruct As RfcStructure = r3Func.Imports("RETURN").ToStructure()
        'This message is from SAP
        Dim message As String = returnStruct("MESSAGE").ToString()
End If

 

Thank you @JC_Hackkett , Let me try this.