How to filter withholding tax codes in invoice verification based on purchase order category?

Need help with invoice verification customization

I’m working on a requirement where we need to control which withholding tax codes appear during invoice verification (transaction code for goods receipt based invoice verification). Currently when processing invoices for suppliers, all configured withholding tax codes from the vendor master data are displayed.

The business wants to limit these tax codes based on the purchase order category. For instance, if a supplier has withholding tax types 02, 05, 08, and 09 configured, but the PO category should only allow 02 and 05, then only these two should be visible in the withholding tax tab.

I attempted to use enhancement spots MRM_TAX_CALCULATION_UPDATE and MRM_DOCUMENT_VALIDATION but haven’t achieved the desired result.

The goal is to show only relevant tax lines instead of all available ones from vendor master.

We’re running on S/4HANA system. Has anyone implemented similar functionality? What would be the best approach to achieve this filtering?

Any guidance would be appreciated.

I hit the same issue last year and went with a custom user exit in MIRO. Used MV50AFZ1 since you can grab both the PO data and invoice verification context there. The trick is reading the PO category early, then tweaking the internal tax table before it shows up for the user. You’ll want to build a custom table that maps PO categories to allowed withholding tax codes, then filter accordingly. Test it hard with different PO types - some edge cases make the filtering act weird. Way more stable than enhancement spots since it plugs right into the core flow.

try using BADI MRM_WITHHOLDING_TAX instead of those enhance spots. i had similar issues before, and this BADI performs way better for dynamic tax code filtering. you can get the PO category from the doc header and set up your filtering logic there. look into method CHANGE_WITHHOLDING_TAX_ITEMS - that’s where the action is.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.