Symptom
During E-Invoice generation in the Manage Electronic Documents app, the system returns Error Code 5002 with the message: "The field Vendor PO Reference date must match the regular expression '^[0-3][0-9]/[0-1][0-9]/[2][0][1-2][0-9].'
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Go to application edocument cockpit.
- Give source document number.
- Submit the edocument under einvoice node.
- Now in application log error
Cause
The error occurs because the Vendor PO Reference Date (PORefDt) included in the eInvoice XML does not comply with the validation rules defined by the tax authority schema.
Resolution
The field PORefDt must be provided in DD/MM/YYYY format, and the accepted year range is 2010–2029. If the source document contains a Vendor PO Reference Date with a year outside this range (for example, 2008), the generated XML fails schema validation and the eInvoice is rejected with Error Code 5002.
Ensure that the Vendor PO Reference Date maintained in the source document is within the supported date range before generating the eInvoice. After correcting the date, regenerate and reprocess the electronic document.
See Also
##3295815 - India eInvoice Automatic Solution: Troubleshooting Guide & FAQ
Keywords
E-Invoice,Manage Electronic Documents,Error Code 5002,Vendor PO Reference Date,PORefDt,Tax Authority Schema,DD/MM/YYYY Format,Historical PO Date,Year Range Validation , KBA , CA-GTF-CSC-EDO-IN-IV , India – E-Invoice , CA-GTF-CSC-EDO-IN-EW , India – E-Waybill , Problem
SAP Knowledge Base Article - Public