There have been a few threads about this on the Statalist. I am attaching links to them. There is some debate about how to specify the VEC model with exogenous variables.
I am interested in knowing how you solved this issue as I am using a VECM to test the Twin Deficits hypothesis and I want to include in this model a dummy variable for a specific year-quarter that was suggested by the Gregory-Hansen test for cointegration (regime shifts).