on 2025 May 02 7:11 AM
Hi All,
We are currently implementing custom post-processing logic for the output payment file generation.
However, we're facing an issue when a single payment includes multiple invoices.
The behavior we're experiencing is:
Three separate output files are being generated.
File 1 includes details of only the first invoice.
File 2 includes the first and second invoices.
File 3 includes all three invoices.
Our objective is to generate a single output file that contains all invoices related to the payment.
We have attempted debugging the process, but the BAdI (Business Add-In) we’re using is not getting triggered during this execution, even though the output files are being generated.
Has anyone encountered this issue before or have any insight on:
Why the BAdI might not be triggered?
How we can ensure that all invoice details are captured once in a single output file?
We referred the below link to Creating Custom Post-processing of the Output Payment File:
Any guidance or suggestions would be greatly appreciated.
Thanks in advance!
Request clarification before answering.
To the question, why multiple files are being generated, this usually happens when:
Here are common causes as to why the BAdI not triggered
1. Wrong BAdI Implementation Point
Ensure you're using the correct BAdI for post-processing:
For payment media output, the relevant BAdIs are typically:
If you're using Output Management (BRF+ based) in S/4HANA Cloud, the BAdI should be BADI_PAYM_OUTPUT_POSTPROCESSING. If this BAdI isn’t triggered, check whether your output type is correctly assigned to the payment method and whether the output determination is set to “Send Immediately.”
2. Output Triggered at Invoice Level
If the output is being triggered per invoice, the BAdI won’t consolidate all invoices into one file. You need to:
Follow the below process so that you will get answer to the question "How to ensure a single output file per Payment
A. Group Invoices in BAdI Logic
In your BAdI implementation use the payment run ID or payment document number to group all related invoices. Accumulate invoice data in an internal table. Generate the output file only once per payment document.
B. Use BRF+ Output Control
If you're using SAP S/4HANA Output Management, configure BRF+ rules to trigger output only once per payment document. Avoid multiple output triggers for each invoice.
C. Check Output Parameter Settings
In the Manage Output Parameter Determination app ensure the output type is set to trigger once per payment. Avoid using invoice-specific conditions unless absolutely necessary.
Finally, the link you referred to is part of SAP’s Localization Self-Service Learning Journey, which focuses on customizing output formats. However, it doesn’t cover the execution logic or BAdI behavior in depth. For that, you’ll want to explore:
This page explains:
This guide walks through:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your question. I hope this still provides some help.
Here is how this works and why you see the issue:
In S/4HANA Public Cloud, the payment medium workbench generates one output file per payment order.
The references provide more details:
I am happy to help if you have further questions.
Best regards
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.