Hook
Until now, the Official Document Numbering (ODN) framework in SAP S/4HANA didn't cover credit memos or reversal documents in Financial Accounting. That has changed: the framework has been extended to support both scenarios natively, and a new BAdI gives you upgrade-safe control over ODN values across every FI entry point.
Scope Note
Scope Note: These enhancements apply to SAP S/4HANA (on-premise) and SAP S/4HANA Cloud Private Edition. Availability starts at 2025 FPS02, and the features are back-ported down to 2023 SPS06, 2022 SPS08, 2021 SPS10, 2020 SPS12, and 1909 SPS14 via SAP Notes 3739128, 3742537, and 3742475. If you're on one of the listed support packages or higher, you don't need to implement the notes — the functionality is already there.
Main Insight
The Official Document Numbering framework in SAP S/4HANA has been extended in three directions at once, and together they close gaps for Financial Accounting.
First, you can now maintain the ODN value and ODN legal timestamp directly on customer credit memos (transaction FB75) and supplier credit memos (transaction FB65) — the same way you already could on invoices. No more workarounds, no more manual post-fix reports.
Second, the same maintenance is available on document reversals. After the reversal is posted, the ODN value can be maintained via transaction FB02 on the reversal document.
Third, and most powerful for anyone with custom fiscal rules: a new BAdI — BADI_FI_AD_ODN_MODIFY — lets you programmatically override the ODN value and legal timestamp for any FI scenario. Derive it from another SAP document, pull it from an external tax portal, or apply your own numbering logic — all without modifying standard code.
Where You'll See It in the System
Credit Memos (FB65 / FB75)
The ODN and legal timestamp fields appear on the Additional Fiscal Data tab of the credit memo entry screen, exactly where you'd expect them alongside the invoice fields:
Document Reversals (FB08)
When you reverse an FI document, the ODN value can be displayed/maintained via transactions FB03/FB02 on the reversal document:
The BAdI: When Standard Isn't Enough
The BADI_FI_AD_ODN_MODIFY BAdI exposes a single method — CHANGE_USER_INPUT_ODN — that fires in every relevant FI scenario:
- Customer Invoice (FB70) and Customer Credit Memo (FB75)
- Supplier Invoice (FB60) and Supplier Credit Memo (FB65)
- Change and Display Documents (FB02, FB03)
- FI Document Reversal (FB08)
- The new ODN Insert report (transaction ODN_FI_INV_INSERT), for overwriting empty records and creating new ones
BAPI_ACC_DOCUMENT_POST(so RFC and IDoc flows are covered too)
Because the same BAdI covers all entry points, you write your logic once and it applies consistently — user entry, batch inserts, and API-driven postings all take the same path.
🔦 Spotlight: Retrofitting Historical Documents
Retrofit is possible. Report
ODN_FI_INV_INSERThandles historical accounting documents that were posted before ODN was enabled — or that are missing values today. It can both overwrite empty records and create fresh ODN entries, and it uses the sameBADI_FI_AD_ODN_MODIFYBAdI, so any custom logic you already implemented applies to the retrofit run as well.
This is a topic in its own right — configuration, selection variants, dry-run vs. commit, and audit considerations. A dedicated deep-dive blog is now available.
📖 Read the deep dive: FI Documents Missing an ODN? The ODN Insert Report Fixes That in One Run →
Practical Takeaway
To adopt the enhancement:
- Confirm your release: 2025 FPS02, or one of the listed support packages with SAP Notes 3739128, 3742537, 3742475 applied
- Enable ODN for the accounting document types used for credit memos and reversals (same customizing path you used for invoices)
- Test end-to-end in FB65 and FB75 — the fields should now be visible and editable
- For reversals, this can be done via FB02
- If you have custom fiscal numbering logic, implement
BADI_FI_AD_ODN_MODIFYinstead of user exits or modifications - For historical documents missing an ODN, run transaction
ODN_FI_INV_INSERTto fill in the gaps
Summary
The Official Document Numbering framework in SAP S/4HANA now covers the full FI document lifecycle: invoices, credit memos, and reversals — with a new BAdI that gives you upgrade-safe control when your country's rules go beyond the standard.
Key Takeaways
- Full coverage for credit memos. FB65 and FB75 now expose ODN and legal timestamp fields natively — no more custom workarounds for supplier and customer credit memos.
- Reversals are no longer a blind spot. FB08 lets you enter a distinct ODN and legal timestamp for the reversal document, which is essential in sequential-numbering jurisdictions.
- One BAdI, all entry points.
BADI_FI_AD_ODN_MODIFYintercepts user entry, batch runs, and BAPI-driven postings — write your logic once, keep it upgrade-safe. - Retrofit is possible. Report
ODN_FI_INV_INSERThandles historical accounting documents that were posted before ODN was enabled or that are missing values. (See the dedicated deep-dive blog for configuration, selection variants, and audit considerations.)
More Information
- Maintain User Input Fields of Official Document Numbering Based On Additional Fiscal Data — SAP Help Portal
- BAdI: Modify ODN Value and Legal Timestamp for Scenarios in Financial Accounting (BADI_FI_AD_ODN_MODIFY) — SAP Help Portal
- SAP Notes: 3739128, 3742537, 3742475
Source link