I need help with customizing withholding tax display during invoice verification. When processing invoices through MIRO transaction, our system shows all withholding tax codes configured for a supplier. However, business users want to see only specific tax codes that match the Purchase Order category being processed.
* Current behavior: All supplier tax codes appear
* Desired: Filter by document type
DATA: lv_po_category TYPE char4,
lt_tax_codes TYPE TABLE OF mwskz.
SELECT SINGLE bsart INTO lv_po_category
FROM ekko WHERE ebeln = gv_purchase_order.
IF lv_po_category = 'ZSER'.
" Show only service-related taxes
APPEND 'T1' TO lt_tax_codes.
APPEND 'T5' TO lt_tax_codes.
ENDIF.
For instance, when a supplier has tax types T1, T5, T8, T9 configured, but the PO category should only allow T1 and T5 to appear in the withholding tax tab.
I attempted using enhancement points MRM_WT_CALCULATION and MRM_DOCUMENT_CHECK but couldn’t achieve the filtering.
Any suggestions on the correct approach? We’re running on S/4HANA system.