Script creation order

I reversed engineered MSSQL database, and all went fine except function was not added, only procedures.
I added the function manually.

The problem I have is when I generate the script the order of procedures/functions are incorrect, and script fails.
I haven't found any way to set the creation order in TMS Data Modeler.

I re-ordered the procedures manually in the DGP file and still procedures/functions are not created in correct order.

Is this some missing feature or are I missing something?

Do you have an example of the wrong generated script? Note Data Modeler doesn't check dependencies between functions/procedures inside their source code, thus it cannot guess the correct order solely from the functions implementation.

Hi Wagner and thank you for your answer.

Here you see how procedures/functions are ordered in the DGP file
DGP - File


CREATE FUNCTION fYearMonthTable
CREATE FUNCTION df_DateRange
Create Procedure GetFullName
create procedure InsertNormalCommission
CREATE PROCEDURE dbo.pUpdateTicketStatusLog
CREATE PROCEDURE dbo.pUpdateTicketKanbanIndex
create procedure InsertNormalCommissionSuppClaw
CREATE FUNCTION fActiveCourses
CREATE FUNCTION fContractCommissionSpan
CREATE FUNCTION fContractEstimate
CREATE FUNCTION fCourseGroupSubGroups
CREATE FUNCTION fEmpActiveCourses
CREATE FUNCTION fEmployeeAccessRules
CREATE FUNCTION fEmployeeOpenTickets
create function getBodgrRoundsBinder
CREATE FUNCTION fGetCourseGroups
CREATE FUNCTION fPPointsWeeks
CREATE FUNCTION fStatementDKExport
CREATE FUNCTION fStatementEmpTotals
Create Function GetLloydsCoverAmount
Create Function GetLloydsCoverCode
Create Function GetNextBussinessDay
*

And here is the Script output.
Script


create function [fgetBodgrRoundsBinder]
CREATE FUNCTION [fGetCourseGroups]
CREATE FUNCTION [fEmployeeOpenTickets]
CREATE FUNCTION [fEmpActiveCourses]
CREATE FUNCTION [fEmployeeAccessRules]
CREATE FUNCTION [fPPointsWeeks]
Create Function [GetLloydsCoverCode]
Create Function [GetNextBussinessDay]
Create Function [GetLloydsCoverAmount]
CREATE FUNCTION [fStatementDKExport]
CREATE FUNCTION [fStatementEmpTotals]
create procedure InsertNormalCommission
CREATE PROCEDURE dbo.pUpdateTicketStatusLog
Create Procedure GetFullName
CREATE FUNCTION [fYearMonthTable]
CREATE FUNCTION [df_DateRange]
CREATE PROCEDURE dbo.pUpdateTicketKanbanIndex
CREATE FUNCTION [fContractEstimate]
CREATE FUNCTION [fCourseGroupSubGroups]
CREATE FUNCTION [fContractCommissionSpan]
create procedure InsertNormalCommissionSuppClaw
CREATE FUNCTION [fActiveCourses]
*

Screen shot off DGP file


Hope this clarifies my problem.
Best regards.

Can you please provide the .dgp file?