Postal Code Verrification Format
Just wondering if anyone knows how to write a script to bring back anything that is NOT in the following format
#A# A#A
(# = any number 0-9)
(A = an letter in the alphabet)
Hi,
In Oracle 10 (and up):
WHERE NOT REGEXP_LIKE ( txt
, '^([[:digit:]][[:alpha:]]){3}$'
)In any version of Oracle:
WHERE TRANSLATE ( UPPER (txt)
, '012345678BCDEDGHIJKLMNOPQRSTUVWXYZ'
, '999999999AAAAAAAAAAAAAAAAAAAAAAAAA'
) = '9A9A9A'Just curious; where is this system used? Canada has just the reverse, letter first. (E.g., Santa Claus's Canadian postal code is 'H0H0H0'.)
Edited by: Frank Kulash on May 3, 2010 2:12 PM
Similar Messages
-
How do I validate a postal code format?
I am trying to use actionscript check a string to see if it
is in a valid Canadian postal code <b>format</b> (ie.
M5R1X2).
The format is 6 characters and is always
Letter,Number,Letter,Number,Letter,Number.
Can anyone help me check each character in a string to see it
they are numbers or letters?
Any help would be appreciated.
Thanks,
TimcheckPCode = function () {
var st:String = arguments[0];
if (arguments[0].length == 6) {
for (var i = 0; i<arguments[0].length; i++) {
t = st.charAt(i);
switchCheck = (i%2 != 0) ? "Even" : "Odd";
if ("Odd" == switchCheck) {
detect = isNaN(t);
} else {
detect = (isNaN(t) == false);
if (!detect) {
break;
return detect;
} else {
return false;
trace(checkPCode("A3M5T3T"));//correct format and incorrect
length
trace(checkPCode("A3M5T3"));//correct format and correct
length
trace(checkPCode("A335T3"));//incorrect format and correct
length -
Hi i would like to format a field which is a postal code in a screen to have something like ''A9A 9A9''
Do you have an idea on how to format the field to have the postal code like that?
Thanks you!set format mask for item
for example
A9A 9A9 -> FMA9A" "9A9
also you can see
http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/format-mask-of-text-item-1649299
and answer
http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/format-mask-of-text-item-1649377 -
Hi Experts
Do you we have any way to convert the Postcode formating
Example if Iam printing the postal code as 12313
and if the county is Australia is
it should be printed as L-12313Check the below link.
http://help.sap.com/saphelp_40b/helpdata/en/d1/803238454211d189710000e8322d00/content.htm
Hope it helps.
Thanks,
Balaji -
HT1918 what is the postal-code for lebanon ? I cand find it :(
what is the postal-code for lebanon ? I cand find it
From a quick search, some of the results that I've found seem to imply that Lebanese addresses can have postal codes, which consist of 8 numbers - the first 4 for the region, the second 4 for the building. Are you being forced to enter a post code ?
What sort of visa card are you trying to add, debit or credit ? If it's a debit card then I don't think that they are still accepted as a valid payment method - they are not listed on this page and there have been a number of posts recently about them being declined
If it's a credit card then is it registered to exactly the same name and address (including format and spacing etc) that you have on your iTunes account, it was issued by a bank in your country and you are currently in that country ? If it is then you could check with the card issuer to see if it's them that are declining it, and if not then try contacting iTunes support and see if they know why it's being declined : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management -
Vendor master data Postal code
Hi,
I am trying to create a new vendor in country Japan (JP).
Postal code settings : Length 7 Rule 2
But when I am creating a Vendor with postal code of length 7, system is automatically adding a hyphen '-' in between and throwing an error message "Postal code XXX-XXXX exceeds 7 characters. Message no. AM656".
I am not sure why is this happening so.OSS note 1381564 - Postal codes
explains that the postal code for Japan is Postal code format for Japan is 'NNN-NNNN'.
and you have to adjust your settings in OY07
to a length of 8 for postal code
and the checking rule should be set to 9. -
Postal code in customer master
hi
i am having a postal code value.
need to place this value in postal code field of customer master while running bdc.
This field is having formating options specific to the country. I may have any number of countries.
How to format the value basing on the country and then consider for the BDC.
any function module or some other procedure
thanks
Ajaynormally not but in asset reporting there seems to be a relation between structure and report-name (not tcode)
go to tcode se11 and search for structures with search term FIAA_SALVTAB* and you'll find some structures.
The last part of the name (RABEST, RABEWG ) is the link to the report (RABEST01, RABEWG01)
hope that helps
Andreas -
Vendor Master - Can Postal Codes be different?
Hi.
A vendor has his office in Country X and the PO Box in Country Y.
So, the Postal Codes will be in different format.
We have two fields in the vendor master (xk02) :
City Postal Code : ADDR1_DATA-POST_CODE1
PO Box Postal code : ADDR1_DATA-POST_CODE2
However, the PO box postal code doesnot accept anything other than the format of the City Postal Code.
Is there a possibility to accomodate both postal codes (in different format eg. NNNN AA and NNNNN)Hi,
Good morning and greetings,
Please go through the following SAP OSS Note
Note 384462 - Master data and addresses
Please reward points if found useful
Thanking you
With kindest regards
Ramesh Padmanabhan -
Wild Card Postal Codes in Transportation Zones and Postal Code Range in TCM
Hello Experts,
I have 2 queries on Postal Codes usability in SAP TM:
1. Postal Code Transportation Zones:
Business Scenario: Some countries have non-numeric Postal Codes and you can not maintain From and To Postal Code range. System supports Postal Code to be entered as Wild Card (XY1*) in Transportation Zone but does not respect them during charge calculation.
2. Postal Code Range in Rate Table:
There are standard Calculation Bases for Source/Destination Postal Code Range but these do not allow maintaining values like Source Postal Code Range (90100-90199) to Destination Postal Code Range (63100-63199). I am unable to understand the use of these 2 calculation bases since they do not accept range.
Kindly suggest.
Thanks and Best Regards,
Vikas ChhabraI start with the first question: Well, well, well. Probably one of the most underestimated topics in the transportation network. A bit of a background: Postal codes are alphanumeric meaning they allow numbers and characters. Of course for some countries only numbers are required and those are pretty easy to handle. Nevertheless, SAP produces global software and there are countries having postal codes with unfixed length, character first, in the middle, at the end. This makes ranges ugly, tough, sometimes impossible.
The range definition works alphanumeric, which is a position to position comparison based on single chars. You can check the inclusion results in excel or with any database. For the zone definition this can mean that you are forced to enter postal codes and no ranges. Of course this blows up the maintenance effort in the beginning, but ensures the correctness.
I was surprised by your comment that the zone definition allows '*' because this would make this whole thing even more complicated and error prone. I tested it and it does not work, at least for Germany. I think in the address definition per country you can define valid formats for postal codes and there '*' is not valid for Germany. The transportation zone location inclusion will not work with pattern!
In case you have manages to maintain this: I would advise to take the effort and enter at least valid ranges. -
Display address omitted postal code for all countries in sapscript
Hi everyone
Does anyone know how to omit the postal code for all countries(eg. US ) when displaying address in sapscript form?
I want to avoid to display postal code even the country is US.
coz my firm doesn't want to show postal code.....
Also, how to use combination keys of PRIORITY parameter?
For example, if i want PRIORITY '1' 'S' 'L' 'N' 'C'
I cannot write like this as following....
/: ADDRESS DELIVERY PARAGRAPH AS <b>PRIORITY 1 S L N C</b> LINES 5
/: ADDRESSNUMBER &VBDKR-ADRNR_WE(K)&
/: FROMCOUNTRY &VBDKR-SLAND&
/: ENDADDRESSHi,
Bold text describes the usage of <b>Priority</b>.
ADDRESS: Formatting of addresses
The command ADDRESS - ENDADDRESS formats an address according to the postal standards of the
destination country defined in the parameter COUNTRY. The reference fields are described in the
structure ADRS. Both constants and symbols can be assigned to the parameters.
Syntax:
/: ADDRESS [DELIVERY] [PARAGRAPH a] [PRIORITY p] [LINES l]
/: TITLE title
/: NAME name1[,name2[,name3[,name4]]]
/: STREET street
/: POBOX PO box [CODE zip code]
/: POSTCODE zip code
/: CITY town1[,town2]
/: REGION region
/: COUNTRY country
/: FROMCOUNTRY from country
/: ENDADDRESS
Both formatting data and address data are given as parameters. Address data is formatted for output in accordance with the parameters COUNTRY, PRIORITY and LINES. If available, the P.O. box is used instead of the street as the default.
DELIVERY: Defines the street address. If this parameter is selected, the system prints the street address on the layout output instead of the P.O. box.
PARAGRAPH: Defines in which paragraph format the address is output. If the parameter is not defined, the address is output in the default paragraph format.
<b>PRIORITY: Defines which address lines can be omitted if necessary. You can enter a combination of the following values:
A form of address
P mandatory blank line 1
Q mandatory blank line 2
2 name2
3 name3
4 name4
L name of country
S line for the street
O line for the city
</b>
LINES: Defines how many lines are available for formatting the address. If all the address data cannot be formatted due to an insufficient number of lines, the data entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command is in a layout set window whose type is not MAIN, the lines available for the address layout are then calculated automatically by means of the current output line item and window size.
TITLE: Required form of address.
NAME: Up to four separate names, separated by commas, can be defined.
STREET: Street specification including address number.
POBOX: Post Office box number.
CODE: P.O. box Postal or ZIP code if it is different from the postal code of the city.
POSTCODE: Postal or ZIP code of the city.
CITY: Up to two place names can be defined.
REGION: Determines the administrative area.
COUNTRY: Specifies the country according to whose specific postal standards the address is formatted.
FROMCOUNTRY: Defines in which language the name of the destination country is formatted. In EC countries, only the international country identification letter is put before the postal code with a hyphen.
Example:
/: ADDRESS
/: TITLE Company
/: NAME Widget Technology, Inc., All Kind of Widgets
/: STREET 1005 Lido Lane
/: POBOX 2935 CODE 94400
/: POSTCODE 94404
/: CITY Foster City
/: REGION CA
/: COUNTRY USA
/: FROMCOUNTRY USA
/: ENDADDRESS
Generates the following address:
Company
Widget Technology, Inc.
All Kind of Widgets
PO box 2935
Foster City, CA 94400
If the supplement DELIVERY is specified for the command ADDRESS, then the street is entered instead of
the PO box.
Company
Widget Technology, Inc.
All Kind of Widgets
1005 Lido Lane
Foster City, CA 94404
Regards,
Sailaja.
Reward points if answer helps you. -
Hello,
Right now I have a postal code field set up to allow a certain format. Right now it will only let the user enter letters, numbers and spaces. I want to put a restriction on the field so that the user cannot enter a space in the field. I am having problems doing this though. Below is the script I am using in the EXIT event. Please let me know if you can offer any help.
Thank you,
NikDK
if
(!(this.isNull)) {
var str = this.rawValue;
if (str.length != 6) {xfa.host.messageBox("Please enter a six character postal code in the format A9A9A9 without spaces. The postal code must begin with R.");
else {
var regExp = /^([R]\d[A-Z]\d[A-Z]\d)$/i;
if (regExp.test(str)) {str
= str.toUpperCase();this.rawValue
= str.substring(0,3) + " " + str.substring(3,6);}
else {xfa.host.messageBox("Please enter the postal code in the format A9A9A9 without spaces. The postal code must begin with R.");You can try placing the below code in Change event with java Script.
This will restrict the input to numbers and letters only.
if (xfa.event.change.match(/[0-9\A-Z\a-z]/) == null)
xfa.event.change = "";
Thanks
Srini -
"IN POSTAL CODE A NUMBER MUST REPLACE 2".
Hi,
While creating shopping cart WE are getting a error "IN POSTAL CODE A NUMBER MUST REPLACE 2".
This error we are getting in basic information in first screen during shopping cart creation.
Note-Recently we have upgraded the system from 4.6c to ECC6.0.we are getting the error after upgrade.
please suggest a solution earliest .it is of high priority
Thanks
MadhavHi
As suggested earlier, Please ensure that user's Postal code starts with the correct format as per the country. Refer OY07 Transaction for more details.
Select for country Canada (CA), go in the details.
There is a tab there for Checks.
Either you can make the changes to country specific-checks changed in SRM / ECC systems.
1) Options to make Postal code mandatory or optional entry
2) Postal code mandatory or optional entry
3) Length of Postal code
check Rule (based on country settings)
Try Making changes there and then you can avoid this error message.
Do let me know.
Regards
- Atul -
Validation of Canadian Postal Codes
Canadian postal codes follow the A9A 9A9 format.
In my display validation pattern, I have text{A9A 9A9}
In my edit validation pattern, I have text{A9A 9A9}|text{A9A9A9}
In my validation pattern, I have text{A9A 9A9}
I also have a JavaScript validation running client side.
It reads:
form1.#subform[0].Section1.PostalCode::validate - (JavaScript, client)
this.rawValue = this.rawValue.toUpperCase();
Given these paramaters, I am stumped as to why I keep getting the following validation error: "The value you entered for Postal Code in valid."
Any thoughts?Your uppercase code should be on the exit event of the field. The validation pattern works by testing against the display pattern.
Or you could put xfa.event.change = xfa.event.change.toUpperCase(); on the change event of the field. -
ITunes Store - Valid Postal Code
I'm trying to set up an account in iTunes Store and I keep encountering the same problem in the form field. It reads in red letters, "The Postal Code must be valid (such as V7H 1V5)." The rest of the form is okay.
I've tried two credit cards and addresses in both Canada and the UK over the past several weeks and get the same message every time (except with a different post code format for the two different countries of course).
The Postal Code I'm entering is correct in both cases and fits the suggested format in both cases as well. I've tried it with and without spaces and upper and lower case letters and can't seem to make sense of it. A google search only returns three pages and I can't find it on your forum so I wonder if I'm making a silly mistake somewhere.
Thanks.Hi,
I had a similar problem. By using "Dr" instead of "Drive" for my address, it worked correctly. I thought of doing this by checking how my address appears on google maps, so you might want to try that as well. -
Hello
I am fairly certain this has been discussed before.
I need ot format addresses and specifically postal codes so that not only our US post office is happy with a specific address/zip code so is the post office of the remote country that the form letter is going to.
I know this has to have been solved many times.I would think some form of a destination resourse file would be appropriate. Not sure how it would all fit together.
One problem that I am failing to understand the postal code comes out the the DB as a string appropriate to the destination country ( formatting "-" removed.) I need to put the hyphens back in a country appropriate way. Since all the postal codes so far are numbers with hyphens as formatting. I thought of using the NumberFormat class to format my postal code. But what about countries that have alpha characters in thier postal code.
I know I am missing something obvious. Not sure what.
Could someone point me in the right direction.In the beginning we were just US 5 digit postal code then when they went to 9 digit us. some one decided the the formatting hyphens needed to be removed. Now we are sending letters to Canada where the hyphen is after the 3rd digit. There are plans for other countries.
I'll see if the architect is willing to revisit stripping out the country specific postal code formatting as this is relevant data. Are there any other options.
Maybe you are looking for
-
Hi tRying to connect my ipad2 to my tv via a apple composite cable. i only get audio no video . anyone got any idea please
-
When I try to run the Mapping Debugger in the 10.1.0.2 client running against a Solaris 5.9 based 9.2.0.6 database, the debugger stops at "Configuring Sources and Targets" and just sits there. I have connected to the Target Schema which does exist an
-
How do I download a movie on iTunes on my ipad, because when it gets to the end of the download it says download error tap to retry but when you retry it still doesn't work.
-
TS1314 where is iphoto cache?
Where is iphot cache located? If you delete this does it delete photos that are stored elsewhere?
-
HT4972 Will I loose my messages if I upgrade my iphone to iOS 5 ??
I have been wanting to upgrade my iphone as I still have 4.2.8 to the iOS5 but I am afraid I will loose my text messages. Will I loose my messages if I upgrade or is their a way to save them before I upgrade ? I need to do this ASAP as I cant get icl