Symptom
- After posting a supplier invoice and maintaining the Official Document Number (ODN) as the Poland KSeF Reference Number, the value does not appear in the generated payment medium during automatic payments.
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
- SAP S/4HANA Cloud Public Edition
- Payment Apps (Public Cloud)
Reproducing the Issue
- Post a supplier invoice (for example, via Create Incoming Invoices) and maintain the KSeF Reference Number for Poland.
- Execute the automatic payment run for the supplier invoice.
- Generate the payment medium/file from the payment run.
- Review the output file and observe that the KSeF Reference Number is not updated in the file.
Cause
The KSeF Reference Number is stored by default in field FPAYP-REF05(35), but standard payment trees do not map this field to any output node; therefore, it is not transferred to the payment medium file.
Resolution
- The KSeF Reference Number is populated in FPAYP-REF05(35) for the relevant payment items.
- Determine where the value should appear in the payment file (for example, in the unstructured remittance information or another dedicated node).
- For standard payment trees, configure the Note to Payee to include FPAYP-REF05(35) using SSCUI 102655 - Adjust Note to Payee.
- Create a copy of the standard Note to Payee SAP_CGI_PL.
- Change the type 1 line 1 (first line) and map &FPAYP-REF05(35)& to populate KSeF Reference Number in the Note to Payee.
- Assign the newly created Note to Payee to the payment method in the SSCUI 101972 - Set Up Payment Methods for Each Country/Region for Payment Transactions
- In the SAP delivered mappings, the usual locations for storing payment references are mapped to the Note to Payee. In DMEE mapping, the source for Note to Payee — structure DMEE_PAYD field TEXT — maps to:
- Node <Ustrd> in ISO 20022 files
- Part "Payment details" in Elixir format - If the value must appear in a different place, copy or create a custom payment mapping in the app Map Format Data for Payments or SSCUI 100558 - Map Format Data for Payments and map source field FPAYP-REF05(35) to the desired node in the mapping structure.
- Execute an automatic payment run and check the payment medium file to verify whether the KSeF Reference Number is updated in the payment file.
See Also
refer to: 3593112 - Legal Adjustments for Poland KSeF Invoicing in FI - Frequently Asked Questions
Grouping Payment Items by KSeF Reference Number in Automatic Payment
Keywords
ODN, official document number, KSeF, payment medium, payment file, automatic payment, APP, FB60, vendor invoice, missing field, DME, PMW, mapping, accounts payable, payment run , KBA , FI-FIO-AP-PAY-2CL , Payment Apps (Public Cloud) , Problem
SAP Knowledge Base Article - Public