How to filter withholding tax types in MIRO based on purchase order category?

I need help with a business requirement in our S/4HANA system. When processing invoice receipts through MIRO transaction, the system shows all withholding tax codes that are configured for a particular supplier. However, my business users want to see only specific withholding tax types that match the purchase order category being processed.

For instance, when we have a supplier configured with withholding tax codes 02, 05, 08, and 09, but the current PO category should only display codes 02 and 05 in the withholding tax section.

I attempted to use enhancement points MRM_WT_SPLIT_UPDATE and MRM_HEADER_CHECK but these didn’t produce the expected results. The goal is to hide certain withholding tax lines based on the purchase order type context.

Has anyone successfully implemented this kind of filtering logic? What would be the best approach to achieve this functionality?

Any guidance would be appreciated.

Best regards

Had the exact same issue two years back with our procurement team. You’re right - those enhancement points won’t work for this. We solved it using the BADI MRM_WITHHOLDING_TAX. This BADI lets you control withholding tax determination during invoice processing. You can access both the PO category and supplier’s withholding tax codes from there. Here’s what we did: created a custom table mapping PO categories to allowed withholding tax codes. Then used that mapping in the BADI to filter out unwanted codes before they hit MIRO. Had to tweak the screen logic too so filtered codes don’t show in the dropdown. Just heads up - test this thoroughly, especially if you’ve got complex procurement with different document types. Also think about existing invoices and make sure your solution handles cases where no matching codes exist.