Generic withholding tax reporting helps you configure based on your country/region-specific or company-specific requirements.
The report identifies withholding tax-relevant transactions for the reporting period and generates an ALV output that lists these transactions and groups them based on organizational unit, business partner, tax type, and tax code.
This report can be used to report only extended withholding tax documents or line items. However, withholding tax certificate cannot be generated with the standard solution.
In this blog post, I will cover a simple way to extend the generic withholding tax report (GENC_WHT) and add new correspondence section to generate withholding tax certificate.
1. Go to Tcode SEGW and create SAP Gateway Service. For this example, we will refer Mexico Gateway Service. Gateway service FDP_FIWTMX_CERT (which is available from SAP S/4HANA 1809 OP Onwards).
2. Expand the SAP Gateway Service and go through the Data Model, Associations, Entity Sets and Association Sets. In Entity Type – Query Node will be used for passing filter from DRC(Formerly known as ACR ). In case of Mexico we will generate the certificate for every Unique Supplier, company code, language and Withholding tax Income Type
3. Navigate to Runtime Artifacts and Use class CL_FDP_FIWTMX_CERT_DPC_EXT to populate data in the certificate
4. Implement the method MXWHTHEADERSET_GET_ENTITY to populate data in the certificate
5. Note the Service name and maintain it in the Adobe Form.
6. Go to Tcode SFP, enter the form name as FIWTMX_CERT to refer already developed Mexico Certificate.
7. The Form should be of type XFA2, maintain the SAP Gateway Service Name FDP_FIWTMX_CERT_SRV.
8. Go to Utilities and download the form layout. The layout should be downloaded with XDP extensions.
9. Extend the generic withholding tax reporting (GENC_WHT_V0)
10. Create a New document in the correspondence section in your report definition and provide the following details.
i. Correspondence ID – ZCORSP
ii. Form Template – FIWTMX_CERT
iii. Query ID – GET_SUMMARY_BP_ITEMS
iv. Correspondence Name – Mexico Supplier Certificate
v. Output Type – ACCT_WHT(Specifically created for Withholding tax certificate)
11. Click on the correspondence line and map the query columns. This unique combination will decide on number of output forms in the correspondence section.
12. Download XSD as shown below(The report should be open in Edit Mode)
13. After downloading the XSD, open Adobe LiveCycle Designer. Open the earlier downloaded layout for Form and perform mapping
14. Right click on the data connection and add New data connection, choose XML schema and upload the XSD(which was downloaded from Extended Report Definition).
15. Perform the mapping and upload the layout in Tcode SFP and activate the Form.
16. Go to SPRO and navigate to path below, click on New Entry and maintain the custom form details: Cross-Application Components > Output Control > Assign Form Templates
17. Extend generic reporting category and maintain the extended report definition in the activity section.
18. Go to Run Compliance section and enter the report name
19. Choose the extended reporting activity and execute the report
20. You can view the correspondence form in the business partner Reporting Section
21. Once you click on the display Icon, it will trigger the class CL_FDP_FIWTMX_CERT_DPC_EXT and the form will be populated