yanyuan
2023-11-09 92ecb46f3f2cfcae338d26cd56855018ba18b449
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Quintiq file version 2.0
#parent: #root
Method OnCreate #extension
{
  TextBody:
  [*
    this.DatasetName( this.MDSMacroPlan().Name() );
    //Create related object
    // Initialize sanitycheck group
    SanityCheckGroup::CreateSanityCheckGroups( this );
    //Initialize calendar registry
    this.InitializeCalendarRegistry();
    
    /* isfromdb is set to true so that default objects are created with
       IsManuallyConfigured = false
    */
    isfromdb := true;
    
    // Period parameters
    start := DateTime::ActualTime().StartOfYear();
    PeriodParameter_MP::Create( '1',
                                this,
                                start,
                                isfromdb );
    
    // GlobalParameters
    this.GlobalParameters_MP( relnew, ID := '1', PeriodSpecificationForUnitActual := GlobalParameters_MP::GetDefaultPeriodSpecification() );
    
    // Create resource manager where it contains certain limit of data, applicable to 3ds cloud
    this.ResourceManager_MP( relnew );
    this.UpdateSizingParameterStatus();
    
    this.SmartPlanSetting( relnew );
    this.IDHolder( relnew );
    
    // Create default sales segment
    SalesSegment_MP::Create( this, null(SalesSegment_MP), GlobalParameters_MP::GetDefaultSalesSegment(), 0, isfromdb );
    
    // Create default period specification
    PeriodSpecification_MP::Create( GlobalParameters_MP::GetDefaultPeriodSpecification(), 
                                    this, GlobalParameters_MP::GetDefaultPeriodSpecTimeUnit(), 
                                    1, 
                                    DateTime::Now().StartOfYear(), 12, 18, isfromdb,
                                    true,
                                    false );
    
    // Create dummy period specification for leading periods
    PeriodSpecification_MP::Create( GlobalParameters_MP::GetDefaultPlanningPeriodSpecification(), 
                                    this, "", 
                                    0, 
                                    DateTime::Now().StartOfYear(), 0, 0, false,
                                    false,
                                    true );
    
    isproductcategory := false;
    ProductLevel_MP::Create( GlobalParameters_MP::GetProductRoot(), isproductcategory, this, isfromdb );
    SalesLevel_MP::Create( GlobalParameters_MP::GetRegionRoot(), this, isfromdb );
    
    this.CreateDefaultPriority();
    
    this.MPVersion( DomainModel::Domain().Version().Version() );
    
    rcv := RoutingConfiguratorView::Create( this.IDHolder().GetRoutingConfiguratorViewID(), this );
    this.IDHolder().RoutingConfiguratorViewID( [Number]rcv.ID() )
    
    SCVConfiguration::Create( this );
    
    UnitOfMeasure_MP::CreateDefaultUOM( this );
    Currency_MP::CreateBaseCurrency( this );
    
    // Create account cost drivers
    AccountCostDriver::CreateAccountCostDrivers( this );
    
    // Create default shiftpattern
    ShiftPattern::CreateDefaultShiftPattern( this );
    
    // DataExchangeFramework
    dtd := DataTransformationDefinition::Create( this );
    DataTransformationManufacturingDemand::Create( dtd );
    
    // Create MacroPlanPTF object
    MacroPlanPTF::Create( this );
    
    // Create wizard manager
    this.WizardManager( relnew, Id := "" );
    
    this.PreliminaryFeature( relnew );
    
    this.SetTime();
    
    // Create wizard for supply chain initialization
    this.CreateSupplyChainWizard();
    
    // MEIO parameters
    this.MEIO_Parameters( relnew );
    
    // Create World puzzle
    this.FindCreateWorldPuzzle();
  *]
}