SAP access

In order to access SAP, ensure that the ICAL.Framework.SAP and ICAL.Invoice.SAP assemblies are referenced by your project. These assemblies have a dependency to the SAP connector for .NET that must be installed separately.

To access the SAP system that is configured in your organization configuration, you can use the following code:

using ICAL.Framework.SAP;
using ICAL.Invoices.SAP;
...
SAPComponentFactory sapComponentFactory = 
   ctx.SAPComponentFactory as SAPComponentFactory;
SAPConnectionFactory connectionFactory =
   sapComponentFactory.SAPConnectionFactory;
ISAPConnection con = connectionFactory.GetSAPConnection();
Note The SAPComponentFactory property in ProjectContext is only set if ICAL.Invoices.SAP and all of its dependencies are loaded successfully. If there is an issue, the SAPComponentFactory property is set to null.

Once the SAP connection is successful, you have an instance of ISAPConnection that references the SAP system that is configured for the current organization. Use this as an entry point to create requests for SAP. For more information on this, please refer to the Kofax TotalAgility API documentation.