Quintiq file version 2.0
|
#parent: #root
|
Method CreateScenario2 (
|
String datasetname,
|
String scenarioname
|
) as stream[Void]
|
{
|
Description: 'Setup test data for Scenario2'
|
TextBody:
|
[*
|
|
run := this.Run();
|
mp2 := MDSMacroPlan::Create( DatasetCreateOptions::Construct( datasetname ).State( DatasetState::MemoryOnly() )
|
.Path( GlobalParameters_MP::GetDatasetFolder() ) )
|
mp2->( macroplan2 )
|
{
|
this->CreateScenarioAndLinkToMacroPlan( macroplan2, scenarioname )->( scenario2 )
|
{
|
// Hardcode start of planning to ease the checking of the csv file
|
dto_periodparameter := DTO_PeriodParameter::Construct().StartOfPlanning( DateTime::Construct( 2022, 02, 01 ) );
|
dto_periodspecification := DTO_PeriodSpecification::Construct().ID( "Monthly" ).NrOfHistoricalPeriod( 3 ).NrOfFuturePeriod( 2 );
|
dto_currency := DTO_Currency::Construct().ID( "SEK" ).Name(" Swedish krona" ).Symbol( "kr" );
|
|
run->UI_PeriodParameter::MenuEdit( macroplan2, dto_periodparameter.ToNVT() )
|
->| run->UI_PeriodSpecification::MenuEdit( macroplan2, dto_periodspecification.ID(), dto_periodspecification.ToNVT() )
|
->| run->UI_Currency::MenuNew( macroplan2, dto_currency.ToNVT() )
|
->| run->UI_Currency::MenuSetBase( macroplan2, dto_currency.ID() )
|
}
|
}
|
|
return Transaction::GetCurrentTask().OnFinish();
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|