RE: AX 2012 - Change Custom Dimension to Standard Dimension
In this case you need to write custom data migration script so that you can map your AX 4.0 Financial Dimensions (Department, Cost Center and Purpose) to AX 2012 Standard Dimension.
Like in AX 2012 Standard Dimension 'Department', 'Cost center' are mappaed as a type or organization and they useto be part of Organization Hierarchy.
So while configuring Source System (AX 4.0) for Data upgrade you should configure Department, cost center as Organization type.
I hope above mapping will help your scenario.
Please let me know if need any more support while upgrade.