Requirements
.Net Framework 4.0+ installed on your computer.
Download the service
Download the service from the downloads section, and copy the files to the desired location at your file system where the service will be running. You need only one instance of the service running at your environment, for each SAP Database Company.
Install
Open a Command Prompt console (cmd) as Administrator (windows start button, then type cmd, right click on the menu and Run as Administrator). Go to the path where you downloaded the installer, for example: C:\argentis\avataxExentService\Service Locate where you have the InstallUtil.exe executable, provided with the .net framework. It will be in a path like C:\Windows\Microsoft.NET\Framework\v4.0.30319 Install the service by using the command
32 bits: C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil Argentis.AvataxEventService.exe 64 bits: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil Argentis.AvataxEventService.exe
Your console will look like: You can now control (start, stop) Argentis Avatax Event Service from the Windows Services screen.
Installing multiple Avatax Event Service instances
If you want to have the Avatax Event Service running for more than one SBO Company, you need a new different service instance for each database. You can create new Avatax Event Services instances by using the sc.exe command from windows (usually located in c:\windows\system32) To create new service instances:
- Copy or download the Avatax Event Service executable files to a different directory, for example /aes2
- Open a cmd console, go to the directory, and install the service under a different name, by using the following command.
Replace here the service name with the name you want to use, we suggest keeping the version in the name.
Also replace the executable location with the location where you are installing the service.
sc create "Argentis Avatax Event Service vXX.XX.XX.XX" binpath="C:\services\avatax\aes2\Argentis.AvataxEventService.exe"
After installing the service you will see the second instance available to run
If you want to change the service description, that for default is blank, you can use this sc command to set the desired description.
sc description "Argentis Avatax Event Service vXX.XX.XX.XX" "Avatax Event Service Description"
- After installing, you need to configure the .config file for this service instance, and point to the second SAP Company database.
Configure the Database
You need to create the Database Table Queue and edit the SBO_SP_TransactionNotification stored procedure.
For SQL Server
Use this script to create the Queue table from SQL Server Management Studio, connected to your SAP company.
CREATE TABLE [dbo].[Queue]( [ID] [int] IDENTITY(1,1) NOT NULL, [object_type] [varchar](20) NOT NULL, [list_of_key_cols_tab_del] [varchar](255) NOT NULL, [Time] [datetime] NOT NULL, [transaction_type] [varchar](1) NOT NULL, [app_name] [varchar](255) NOT NULL, [list_of_cols_val_tab_del] [varchar](255) NOT NULL, [retries] [int] NOT NULL ) ON [PRIMARY]
And add this script to the SBO_SP_TransactionNotification stored procedure in your SAP Company DB:
--Avatax Event Service Post Transaction Notification INSERT INTO "Queue" ([Time],[object_type],[transaction_type],[list_of_key_cols_tab_del],[list_of_cols_val_tab_del],[app_name],[retries]) VALUES (GETDATE(), @object_type, @transaction_type, @list_of_key_cols_tab_del, @list_of_cols_val_tab_del, app_name(),0)
For HANA
Create the Queue table:
CREATE COLUMN TABLE "APPAREL_DEV_US"."Queue" ( "ID" INTEGER CS_INT GENERATED BY DEFAULT AS IDENTITY NOT NULL , "object_type" NVARCHAR(20) NOT NULL , "list_of_key_cols_tab_del" NVARCHAR(255) NOT NULL , "Time" DATE NOT NULL , "transaction_type" NVARCHAR(1) NOT NULL , "app_name" NVARCHAR(255) NOT NULL , "list_of_cols_val_tab_del" NVARCHAR(255) NOT NULL , "retries" INTEGER CS_INT NOT NULL , PRIMARY KEY ("ID")) UNLOAD PRIORITY 5 AUTO MERGE ;
And alter the SBO_SP_TransactionNotification procedure, including the following:
--Avatax Event Service Post Transaction Notification INSERT INTO "Queue" ("Time", "object_type", "transaction_type", "list_of_key_cols_tab_del", "list_of_cols_val_tab_del", "app_name", "retries") SELECT CURRENT_DATE, object_type, transaction_type, list_of_key_cols_tab_del, list_of_cols_val_tab_del, SESSION_CONTEXT('APPLICATION'), 0 FROM Dummy;
Now check the configuration section