GeneXus ERP Connector FAQ

Unofficial Content

What is an RFM?

An RFM (RFC-enabled Function Module) is an ABAP function module that can be remotely invoked.  An RFM takes some parameters as input, and after execution, returns some output parameters. You can view an RFM in the SAP system via transaction SE37.

Can I integrate an RFM with GeneXus ERP Connector (for example, ZBAPI or ZRFM)?

Yes, you can. 

So as to be seen by GeneXus ERP Connector, these functions must be published in the BOR (Business Object Repository). This is done in SAP ERP using the following steps (in particular from Stage 3)

Where can I download SAP .Net Connector or SAP Java Connector?

You can download them from http://service.sap.com/connectors.

Which role should I grant to a SAP user to make RFC calls in a SAP System?

To be able to make RFC calls, the SAP user needs the role sap_s_rfcacl

When I select Tools/Application Integration/SAP BAPI Import I receive the Error: Could not load file or assembly ‘sapnco, version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23’ or one of its dependencies. The system cannot find the file specified (EnterpriseInspector).

You must copy the sapnco.dll and sapnco_utils.dll (part of SAP .Net Connector 3.0.13.0 or higher, 32 bits compiled with .NET Framework 2.0, or compiled with Framework 4.0 if you are using GeneXus 15 U1 or up) to the root of GeneXus installation directory. You can download it from http://service.sap.com/connectors

 

When I select Tools/Application Integration/SAP BAPI Import I receive the Error: The type initializer for ‘SAP.Middleware.Connector.RfcDestinationManager’ threw an exception. (sapnco)

Additional Information:

Could not load file or assembly ‘sapnco_utils, version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23’ or one of its dependencies. The system cannot find the file specified (EnterpriseInspector).

You must copy the sapnco_utils.dll (part of SAP .Net Connector 3.0.13.0 or higher, 32 bits compiled with .NET Framework 2.0, or compiled with Framework 4.0 if you are using GeneXus 15 U1 or up) to the root of GeneXus installation directory. You can download it from http://service.sap.com/connectors.

When I select Tools/Application Integration/SAP BAPI Import from GeneXus 15 U1 or up I receive the 
Error: The type initializer for 'SAP.Middleware.Connector.RfcDestinationManager' threw an exception. (sapnco)

From GeneXus 15 U1 or up you need the SAP .Net Connector compiled with Framework 4.0
You must copy the sapnco.dll and sapnco_utils.dll (part of SAP .Net Connector compiled with .NET Framework 4.0) to the root of GeneXus installation directory. You can download it from http://service.sap.com/connectors. 


Detailed Error Message:
The type initializer for 'SAP.Middleware.Connector.RfcDestinationManager' threw an exception. (sapnco)
------------------------------
Product = GeneXus 15
Version = 15.0.107450 U1
------------------------------
Program Location:
   at SAP.Middleware.Connector.RfcDestinationManager.IsDestinationConfigurationRegistered()
 ........
===================================
The type initializer for 'SAP.Middleware.Connector.RfcConfigParameters' threw an exception. (sapnco)
------------------------------
Program Location:
   at SAP.Middleware.Connector.RfcConfigParameters.Initialize()
   at SAP.Middleware.Connector.RfcDestinationManager..cctor()
===================================
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. (sapnco)
------------------------------
Program Location:
   at SAP.Middleware.Connector.RfcConfigParameters.loadConfiguration()
   at SAP.Middleware.Connector.RfcConfigParameters..cctor()

 

When I select Tools/Application Integration/SAP BAPI Import I receive the Error: "Enterprise Inspector License Not Found"

You must request a GeneXus ERP Connector for SAP license through the GeneXus License Manager.

You will find the product to authorize with the product name "ERP Connector".

 

Compiling a GeneXus project which uses a SAP Connector Interface type  External Object I get errors similar to the followingsap\type_SdtSAPGeneralLedgerAccount.cs(66,10): error CS0103: The name  'BUS3006' does not exist in the current context

The reason is that you don't have a GeneXus ERP Connector license. Please request it to keys@genexus.com

In the compilation Output you could find the next error message following the previous one:

error CS0006: NÆo foi poss¡vel encontrar o arquivo de metadados 'bin\GeneXus.Programs.Common.dll'

If you take a look at the generated program with the error (in that case type_SdtSAPGeneralLedgerAccount.cs) you will find the following line:

// ****  Enterprise Connector Licence Not Found  *****

 

Executing a GeneXus .Net application which uses SAP BAPIs as External Objects, I get the following error message: 

Server Error in '/MyGXSAPAppI.NetEnvironment' Application.

Could not load file or assembly 'sapnco, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. The system cannot find the file specified.

You must copy the sapnco.dll and sapnco_utils.dll (part of SAP .Net Connector 3.0.13.0 or higher, 32/64 bits compiled with .NET Framework 2.0) to the web\bin directory of your application. You can download it from http://service.sap.com/connectors.

 

Executing a GeneXus .Net application which uses SAP BAPIs as External Object, I get the following error message:
Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format.

You must check the AppPool used in your web application and set the property Enable 32-Bit Application to true or use the 64bits version of the sapnco_utils.dll. 
 

Executing a GeneXus Java application using SAP BAPIs as External Object, I get the following error message:
NullPointerException
Caused by: java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Review the SAP Java Connector 3.* documentation; your sapjco3 installation folder must be included in the Path system variable.

Executing a GeneXus Java application using SAP BAPIs as External Object, I get the following error message:
NullPointerException

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory

There are different distribution packages for various JRE versions and hardware processors available (AMD, INTELL x86-bit or x64-bit architectures) for SAP Java Connector 3.*; make sure you installed the correct one.

Using a BAPI from a GeneXus Application I get the following error message: Cannot convert null or empty string into a BCD

Please, see the SAC# 41866 - Conversion error using a SAP BAPI imported by GX ERP Connector