Symptom
When generating a payment medium file, the Message ID (MsgId) duplicates a value that was previously generated in the legacy system and submitted to the bank, causing the bank to reject the file due to a duplicate Message ID.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Create a payment run in the Manage Automatic Payments app.
- Generate the payment medium file.
- Compare the Message ID (MsgId) in the generated file with the Message ID from a payment file previously generated in the legacy system.
- Observe that the MsgId values overlap, resulting in a duplicate Message ID.
Cause
The MsgId in the payment medium file is mapped to FPAYHX-RENUM, which is a sequential number that restarts from the beginning in the new system. After migration, the number range in the new system overlaps with the values already used in the legacy payment files submitted to the bank, resulting in duplicate MsgId values.
Resolution
There are two possible approaches to resolve the duplication:
-
Add a constant prefix to the MsgId in the format mapping, so that the generated MsgId takes a form such as "1" concatenated with FPAYHX-RENUM. This ensures the new sequence does not overlap with the values previously generated in the legacy system. Note that if pain.002 (payment status report) is used, the standard logic expects the MsgId to match the original RENUM value. Changing the MsgId format may prevent the system from automatically identifying and matching payments based on MsgId, so this should be evaluated before implementation.
-
Contact the bank to request a reset of the duplicate check on their side. A one-time reset may be possible. This approach avoids any change to the SAP configuration.
Keywords
MsgId, Message ID, payment medium file, FPAYHX-RENUM, duplicate, migration, pain.001, pain.002 , KBA , FI-AP-AP-B1 , Payment transfer (w/o DE, US) , Problem
SAP Knowledge Base Article - Public