Manufacturing of tailored tubes with a process integrated heat treatment