When I use the Tax report and print it , i need to add the BP Card name on the printout of this report.
Howeever, I dont see either any database related to BP from where I can use the CardName.
How to do this ? Also, for such standard reports is there any way for me to get to its SQL ?
Any help will be appreciated.
Thank You all.
The tax report on SAP Business One is rather complex. The reason for this is that any document could have multiple tax codes assigned, a different one for each row for example. The journal (transaction) table JDT1 does not store the tax code and therefore the only way to "simulate" the tax report will be a complex one. I have written one specific to a customers' requirements and it was not easy.
If you want to see how SAP generates the tax report, in SQL Server Management Studio, go to the database and select views, and there you will find 5 views that are used as the basis for creating the final query for the tax report as follows:
These will give you all the documents needed to then create the actual tax report. You will need to add the BP name into the select statements of the above views.
Do not change these views or mess with the standard SAP Business One structures. Copy the select statements and create your own Stored Procedure with temp tables to store the data and then Execute the stored procedure from a query in SAP Business One.