Introduction

For my needs, I adapted an example rule from coresuite customize. I think, it’s a small and convenient rule: Easy to install and works without configuration: When entering new addresses, the user just needs to type the zip code. Then, it fills automatically the city. In this post, you can see a short description, the Customize rules and also an Excel file with the zip codes to download.

How to install

Step 1: Import customize rule and create table for zip codes

First, download the customize file on the bottom of this article, then import in into your SAP database and set to “Active”. Then you need to create the table which will contain the zip codes. Please navigate to “Modules > Administration > Create Zipcode Table”.

After clicking this menu entry, cusomize adds the table, and the usual popup will appear: “Database Structure was changed…”. After adding this table, you can desactivate or delete the new menu rule from customize. You don’t need it anymore.

Step 2: Import zip codes from Excel

Now, you need to download the Excel file on the bottom of the article. Then, open the menu entry “Administration > AddOns > coresuite customize > Import > Import Excel rows to UDT”, choose the correct table “CUST_ZIP”, select the Excel file and let it run:

The Excel contains all the zip codes for “D A CH” and some thousands of lines will now be imported: It’s the best time to make a coffe break.

After the import of the Excel, the rule is ready to use!

Hint: Because the Excel is quite big, it can ocurr, that the import fails. A possible solution is to desactivate the checkbox “Rollback on error” and import until it crashes. Then, check in the DB, which was the latest successfully imported entry. Delete the successfully imported ones from the Excel and Re-import the file again until it crashes. Then the same again, until everything is imported.

Downloads

ZipCodeOptimizer (Customize file)

zip codes (Excel file)


Geri Grenacher

ERP Project manager at coresystems ag, Switzerland

4 Comments

Geri Grenacher · January 6, 2011 at 15:31

Sometimes, in Switzerland, a single zip code can have different cities. This is not implemented at the moment.

Christophe B. · August 23, 2011 at 14:57

Hello Geri
Very Good and very handy devellopement. I didn’t manage to make work the Zip code table creation (the menu would not appear) but i have done it manualy so i finaly manage to make all the things works.
As i am french i have a special request if you know how to solve it. In France we have the same ZipCode for several City. If i enter two city with the same code it takes the first one. Is there’s some way to pop up a choice in that case ?
Thanks in advance and many thanks for all your works.
Best regards
Christophe

Geri Grenacher · August 31, 2011 at 13:19

Hello. With this rule, several cities for one zipcode does not work. But with a little bit effort you can extend the rule, or contact our support.

Tweets that mention SAP B1: All Zip Codes for “D A CH” with nice customize rule -- Topsy.com · January 6, 2011 at 17:43

[…] This post was mentioned on Twitter by Yann Staehli
and Yann Staehli, Geri Grenacher. Geri Grenacher said: All Zip
Codes for “D A CH” with nice customize rule – Automatic fill of
city after type in the zip code – http://tinyurl.com/38cspns
[…]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *