Hi Lone
Using function module BAPI_PROJECT_MAINTAIN you can trigger the status to release by using the below parameter
IProjectdefinition
PROJECT_DEFINITION=PD-TRAINING
Command:Release
Releasing a project. the system status 'Released' is set for the project definition and all other WBS element
&example&-Releasing Project definition PD-Training
You can refer to the documentation of this BAPI for more details
you have to trigger this during creation using an enhancement
hope this resolves your issue
vijay