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

Hi everyone,

I’m working on an S/4HANA system and need help with invoice verification functionality. Our business users want to control which withholding tax codes appear during the invoice posting process based on the purchase order category.

Currently, when processing invoices for suppliers, all configured withholding tax codes from the vendor master data are displayed. However, we need to show only specific tax codes that match the purchase order category being processed.

For instance, if a supplier has withholding tax codes RT, ST, PT, and QT configured, but the current PO category should only use RT and ST, then only these two should appear in the withholding tax section.

I attempted to implement this using enhancement spots MRM_WT_SPLIT_UPDATE and MRM_HEADER_CHECK, but these don’t seem to be triggering the desired filtering behavior.

Has anyone successfully implemented similar functionality? I’m looking for guidance on the right approach or alternative BAdIs that might work for this scenario.

Any suggestions would be greatly appreciated!

Had this exact issue 6 months ago. Skip the enhancement spots - use user exit MV50AFZ1 with table customization through SPRO instead. Create a custom table that links PO categories to withholding tax codes, then modify the invoice verification screen to read from this table at runtime. You need to intercept the call before the system pulls WHT codes from vendor master. We also tweaked some standard field symbols in include MV50AFZ1 to filter the internal table feeding the dropdown. Took some debugging but works perfectly now. Just test it thoroughly in sandbox first - this hits core FI-MM integration points.

check out BADI MRM_WITHHOLDING_TAX - it controls which WHT codes show up during invoice verification. had the same issue last year and this fixed it. you can filter by PO category in method GET_WITHHOLDING_TAX_INFO. way cleaner than messing with enhancement spots.

Been dealing with these filtering requirements for years - manual coding gets messy fast. Every SAP update breaks your enhancements and you’re back to debugging.

I’d pull this logic outside the system completely. Set up automation that monitors invoice verification and applies filtering rules before data hits the screen.

Create a workflow that reads PO categories, matches them to predefined tax code mappings, and feeds only relevant codes back to verification. You’re not touching core SAP functionality at all.

I’ve automated similar scenarios where business rules override standard SAP behavior. You can modify filtering logic anytime without breaking production.

You also get better visibility into what’s filtered and why. Way easier to troubleshoot than digging through ABAP debugger sessions.

Latenode handles SAP integrations well - connects directly to system APIs and manipulates data flows in real time.