SAP B1 script for migration to Structured Addresses

SAP B1 script for migration to Structured Addresses

To migrate from the old address structure on companies to the new structured addresses (using control parameter Structured Addresses = yes), SAP B1 clients with thousands of company records don’t have the option to back date, as the process will potentially time out, leaving some companies un-updated.

 

The attached script can be executed in the Workbench database to migrate the company addresses to the new structure.

 

Some rules in this script.

  1. Will only run when integrated with SAP

  2. Will only run when Control Parameter Structured Address is set to Yes

  3. Will only run once. If you try to execute it more than once, it will not execute. An EventLog entry is created when executed successfully for the first time.

  4. It copies Address3 into Address4 and deletes Address3 field.

 

Examples of how an address will look before and after.


When CP is set to No:

 

When CP is set to Yes (and script has not been run yet):

 

After the script has been executed: