Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Showing results for 
Search instead for 
Did you mean: 
Still preparing the Withholding Tax (WHT) reports outside of SAP S/4HANA Cloud? Using the full capabilities of the Advanced Compliance Reporting framework is a move that needs to take place for improving the reporting performance of your organization. This blog post describes how to define a WHT report in case a local solution is not available in the standard system.

Quality tax reporting is a way to bring the tax liability down and to have transparency in the accounting books.

In order to fulfil the tax legislative requirements in an effective way, the Advanced Compliance Reporting framework within SAP S/4HANA Cloud provides a selection of standard reports that can be re-used for localization purposes, in case it is not available as a standard delivery.


You have administrative access to SAP S/4HANA Cloud, and implementation experience on the system. You are also familiar with the implementation of Advanced Compliance Reporting on SAP S/4HANA Cloud.


Business Role Business Role ID
Administrator       .  SAP_BR_ ADMINISTRATOR            .
Configuration Expert – Business Process Configuration  SAP_BR_BPC_EXPERT


We are taking an hypothetical example related to the withholding tax reporting required for Malawi.

The following report should be monthly submitted to the Malawian authorities, and it has the following structure:

  • Report Header:

    • Company Code

    • Company Name

    • Country Key

  • Item Level:

    • Business Partner Country

    • Fiscal Period

    • Withholding Tax Type

    • Withholding Tax Code

    • Base Amount of Transaction

    • Amount of Tax Withheld

    • Withholding Tax Rate

    • Currency Key

This report has to be submitted on a monthly basis for a specific company code. Additionally, correction runs are necessary, because if a tax item is missing from a standard run, it can be corrected with a correction run.

In the following blog we are going to re-use the Generic Withholding Tax Report, available in the Advanced Compliance Reporting list of standard reports, and adapt it to our own requirements.

Let’s get started

Open the Define Compliance Reports App from the Advanced Compliance Reporting group on the FIORI dashboard.

Select the Add button for a new report definition.

Select the Enhanced Report Mode. The advantage of enhancing an existing report is that you are assured that any updates that come for the standard report, will reflect in your new report. In this way, for example, you avoid the inconsistencies that might occur at a system upgrade.

A new window opens up, and there are 7 steps to be accomplished in order to complete the report definition.

Setting up the Report Definition

1. Properties

On the Report Definition screen, enter the Report Description.

 2. Parameters

A list of parameters are available in the Generic Withholding Tax Report. Depending on your needs, use them in the queries that fetch the data for your report or directly in the report definition.

Step 3. Queries

At this step, you create a list of queries to fetch the data from the corresponding data sources, using the filter conditions available. Open a query from this list and filters, conditions and sorting options available for it will be presented.

As you’ll see in the next steps, we are going to use the GET_SUMMARY_WHT_ITEMS query to fetch the withholding tax transactions that took place in a fiscal period and ORG_UNIT_DETAILS for the reporting entity that submits the report to the Malawi authorities.


Step 4. Document Definition

In this step we define the structure of the new report. The standard generic withholding tax report provides 4 types of document definitions that can be adapted to one’s needs. You can remove these reports if not required, else these will be generated.

For example, looking at our requirements at this moment,  let us use the first option, the “Withholding Tax Transactions List”. However this option offers more fields than we need, therefore it needs adaptation.

We will now use the option to export the XSD schema of a document definition, adapt the schema in a local editor and upload it again.

When uploading the new schema, select the “Add with Schema/Query” option.

A new page will open, where the document details are specified as below:

  • Document Type: ALV

  • Document Name: Withholding Tax Transactions List

  • Create Using: Schema

  • Schema ID: add a custom name and select the “Create” button

    • Select the XSD Format

    • Add the Schema Name

    • Browse for the local schema and select upload file

    • Select the entry point and activate the schema

  • Code Page: 4110 (Unicode UTF-8)

  • Visualization Mode: Editable

  • Enhanced Data Preview: Yes

Once the general properties are set for the new document, set up the mapping of the fields from the created schema with the corresponding fields coming from the data sources.

For each field in the schema, set a label, the data source and the corresponding field coming from the data source.

Since we created a new document, the changes that will apply to the standard schema/document will not be applied to our new custom schema.

After completing the mapping, select the “Save Draft” option and let’s move ahead to the step number 5.

Step 5. Correspondence Definitions

Depending on the requirements of the country, it might be necessary to send the tax details to other business partners through business partner correspondence documents. In this example, there is no need to submit tax details to other business partners, but for more details on how to create a correspondence definition, refer to this tutorial.


Step 6. Event Handlers

The purpose of the event handlers is to fulfill the need of specific checks before the report run, during executing queries, before the document generation, validations, updates or defaulting report parameters. More details about event handlers can be found here.

In our example, the following 3 events are inherited from the standard  generic withholding tax report:

Those events will pick data from the new report entity configuration and report parameters.

If you wish to modify the behaviour of an event, use the Custom Fields and Logic app and create a new enhancement implementation using restricted ABAP programming language in the “Advanced Compliance Reporting: Event Handler” business context.

Then, you will have to add the new event implementation to the already existing events list.

Step 7. Reported Items Log

Documents that are generated need to be tracked for the purpose of audit and analysis. The documents taken into consideration for reporting have to be saved into a table that you need to specify. Also, you need to specify the query used for fetching those documents.

In this example, we already have the table ACCT_SRF_REP_ITM created, as well as the DOC_SEL query, therefore no more effort is required here.

Activate the report

After completing all the 7 steps, you need to verify and activate the new report definition.

At this moment, the report definition is done, but in order to run a new report, we need to define a new report category and define the reporting entity that submits those reports to the government or other stakeholders.