I’m working on a project where I need to automatically update the payment hold indicator that you can see in the MIRO transaction. Right now I have to manually change this field through the UI, but I want to automate this process.
Has anyone found a way to programmatically modify this payment hold status? I’m looking for any of these approaches:
- Using a standard BAPI function
- Calling a function module directly
- Writing custom ABAP code to update the field
I’ve been searching through the function modules but haven’t found anything obvious yet. The field seems to be stored in one of the invoice tables, but I’m not sure about the best practice for updating it safely.
Any suggestions on which direction to take would be really helpful. I want to make sure I’m following SAP standards and not breaking anything in the process.
check table BSIK for vendor line items - there’s a payment block field too. i had luck with FM MR_MIRO_TO_ACCOUNTING but it’s tricky. you could do a direct table update on RBKP, just make sure to wrap it in proper change docs. honestly tho, BDC might be your safest option even if it’s slower.
Had the same requirement last year. After some trial and error, I used function module CHANGE_DOCUMENT_FB60 and it worked. The payment hold flag lives in table RBKP field ZLSPR, but don’t update the table directly - that’s asking for trouble. I identified the invoice document first, then used the change document approach to modify the hold status. Watch out for timing issues though. If the invoice is already in a payment run or has locks, your update will fail. Before you build anything, check SE80 for enhancement spots in MIRO. Sometimes SAP gives you standard enhancement points that are way cleaner than forcing updates through BAPIs or function modules.
hey, you might wanna check out BAPI_INCOMINGINVOICE_CHANGE. i used it b4 to update invoices and payment holds. just make sure you have the invoice doc number and company code handy. test in dev first so ya don’t mess up anything!
Had this same issue a few months ago. Ended up using workflows instead of direct field updates - worked way better. Yeah, the payment hold status is in RBKP-ZLSPR, but I built a custom workflow that triggers on certain conditions and calls the standard SAP processes to update holds. Keeps all the validations and audit trails intact. You could also try BDC to simulate MIRO transactions programmatically. Way more reliable than bypassing the standard flow. Just make sure you handle commit work right and test with different invoice states - parked, posted, processed invoices all behave differently.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.