Product Information
SAP Cloud for Customer Postal Code Check
Postal Code Check in SAP Cloud For Customer
The SAP Cloud for Customer solution performs a format check on every value entered in a postal code field on the UI.
This check is country specific. The check rule used for each country can be maintained in the Business Configuration in the fine tuning activity ‘Countries -> Edit Countries’.
The fields relevant for the postal code check routine are ‘Postal Code Length’ and ‘Postal Code Check Rule’. While the values ‘0’ to ‘8’ for the Postal Code Check Rule are self explanatory, the Postal Code Check Rule ‘9 – Check against country-specific edit format’ is not.
The Postal Code Check Rule ‘9 – Check against country-specific edit format’ refers to a hard coded check routine that is available in the system for a list of countries that have a more specific postal code format which can not be covered by the generic check rules.
Country Specific Postal Code Check Routines
SAP Cloud for Customer provides a country specific check routine for the following countries.
The formats provided in the list below should be read as follows:
- ‘N’ denotes a digit from ‘0’ to ‘9’
- ‘A’ denotes a capital letter
- Characters written in bold blue denote specific characters that have to be provided exactly this way at this position in the postal code.
For example ‘NN-SAP-A’ denotes a postal code rule that requires two digits at the first two positions, followed by the string ‘-SAP-‘ followed by a capital letter.
If more than one format is listed for a country this means both are valid and the check routine checks that the provided postal code matches one of them.
The country specific postal code formats currently supported by SAP are:
ISO Code | Country | Postal Code Format |
AD | Andorra | ADNNN |
AR | Argentina | ANNNNAAA |
BM | Bermuda | AA NN |
BN | Brunei Darussalam | AANNNN |
BR | Brazil | NNNNN–NNN |
CA | Canada | ANA NAN |
CR | Costa Rica | NNNNN NNNNN-NNNN |
CZ | Czechia | NNN NN |
EC | Ecuador | NNNNNN ECNNNNNN (deprecated 2015) |
FO | Faroe Islands | FONNN |
GB | United Kingdom | AN NAA ANN NAA AAN NAA ANA NAA AANN NAA AANA NAA |
GR | Greece | NNN NN |
IO | British Indian Ocean Territory | BBND 1ZZ |
JP | Japan | NNN–NNNN |
LB | Lebanon | NNNN NNNN NNNN |
MT | Malta | AAA NNNN |
NL | Netherlands | NNNN AA |
PA | Panama | NNNN NNNN–N…N (up to 5 digits after the ‘-‘, P.O. Box addresses only) |
PL | Poland | NN–NNN |
PT | Portugal | NNNN–NNN |
SE | Sweden | NNN NN |
SK | Slovakia | NNN NN |
SO | Somalia | AA NNNNN |
SZ | eSwatini | ANNN |
US | United States | NNNNN NNNNN-NNNN |
For the countries highlighted in yellow the country specific postal code check routine is currently not active in the default Business Configuration delivered by SAP. For a variety of reason a more lenient check rules was chosen as default. If so desired the country specific postal code check routine can be activated in the fine tuning activity.
It is highly discouraged to set the postal code check rule to ‘9 – Check against country-specific edit format’ for any country not in the above list.
To the best of my knowledge the country specific postal code check routines are identical in the SAP Business By design solution.
To the best of my knowledge the country specific postal code check routines are identical in the SAP OnPremise solutions, though I am not as certain about that.
I think this is very helpful. thanks a lot, can i get all the postal code from the site of USPS which is liteblue ?
This document helped me. Thank you.
As per Wikipedia: "All postal codes in Greece are numeric consisting of five digits."
So I don't see why SAP Standard is "NNNN NN"?
Thank you for pointing this out. This was just a typing error in the blog post, it should of course be 'NNN NN'.
The error has been corrected now.