- Home
- Avatax transactions request and response database logs
Avatax log requests
The solution can record tax calculations in database tables. This feature is enabled from the setting shown below.
If logging requests is not required for reports or other tasks, we recommend keeping it off, to reduce transaction calculation time and database space.
The log database tables can be removed anytime if you need to free space or want to clear the log.
Consider this sample AR Invoice to check how logs are saved.
Transaction logs are saved on the following tables
@ARGNS_ATX_LOG
This is the header of the transaction log.
To link this transaction to the SAP document, you can use the following columns:
U_DocCode is the document code. Depending on the configured field to be used as the Avatax Document Code, you can use this field to match the document.
For example this query will get the log header for the SalesInvoice with document number 1582 that was committed to Avatax.
Keep in mind having multiple calculations for a single document will propduce multiple logs.
SELECT * FROM [@ARGNS_ATX_LOG]
WHERE U_DocType='SalesInvoice' and U_DocCode='1234' and U_Commit=1
@ARGNS_ATX_LOG1
Log1 table contains the Avatax calculation lines. This will include SAP document body lines and document freights (additional expenses).
Column U_Ref1 indicates to what document line or freight the request line is linked to.
body0 indicates the row is related to document body line 0 (INV1.LineNum=0).
freight0 is linked to additional expense with line number 0 (INV3.LineNum=0).
SELECT * FROM [@ARGNS_ATX_LOG1]
Where Code='2542'
@ARGNS_ATX_LOG2
Log2 table contains the Avatax calculation details, that are the jurisdictions and tax calculated for every line in the details (Log1).
You can link details for every line using the U_No field.
Here are the tax calculation details for document 2542 and line body 0
SELECT *
FROM [@ARGNS_ATX_LOG1]
JOIN [@ARGNS_ATX_LOG2] ON [@ARGNS_ATX_LOG2].Code=[@ARGNS_ATX_LOG1].Code AND [@ARGNS_ATX_LOG2].U_No=[@ARGNS_ATX_LOG1].U_No
Where [@ARGNS_ATX_LOG1].Code='2542' AND [@ARGNS_ATX_LOG1].U_Ref1='body0'
Delete log tables
If you need to clear log data, follow this steps.
On SAP, go to Tools->Customization Tools->Object Registration Wizard
Select the AvaTaxLog object and delete it
Now go to tables:
Tools->Customization Tools->User Defined Tables - Setup
Here right click on the three Log tables and click Remove, then Update.
Now tables are deleted, and you need to restart the add-on in order to have the tables created again by the solution