CreateStandardTableTaskFactory
The following code retrieves a reference to the service that provides access to the objects that create the standard tables.
'Note: IDEA 10.0 or higher is required.
Dim stdTableTaskFactory as Object
Set stdTableTaskFactory = SmartContext.GetServiceById("CreateStandardTableTaskFactory")
If the service is not available, GetServiceById returns nothing. The service is currently only available in the execution context of a data preparation task. The task factory service implements the CreateStandardTableTaskFactory interface with the following members:
-
Function NewBuchungsjournalMitErwTask() as Object
The method returns an object that can be used to create the standard table 'Buchungsjournal mit Erw' and implements the CreateBuchungsjournalMitErwTableTask interface.
The CreateBuchungsjournalMitErwTableTask interface has the members
-
Property SourceDatabaseName as String
This read/write property of type string gets/sets the absolute or project-relative path to the source database.
-
Function AddOptionalStandardJournalColumn(ByVal columnName as String) as Boolean
This method allows the programmer to communicate to the application the list of Standard Import Routine specific optional (@Standardjournal) column names in the order in which they appear in the result. The task object stores this list along with the name of the result database in the project for later use in the Columns Selector dialog. It takes the name of a column as a string and returns a Boolean(true if the operation succeeded, false, if the column is already present in the list of optional columns). Column names are case-insensitive. The comparison is performed using OrdinalIgnoreCase.
An exception is thrown if the name is empty.
-
Property IsAddingMissingMandatoryColumnsToSourceAllowed as Boolean
A Boolean read/write property that indicates whether the creator is allowed to add any mandatory missing result columns to the source database for performance reasons. This could be the case if the source database is a temporary result.
The default value is false, meaning that the creator will not add any missing columns to the source database before performing the final extraction of the result.
-
Function PerformTask() as Object
The method runs the task and returns an ItestResultFile reference to an object containing the name, ID, record count etc. of the result database. It also registers this result object with the list of result databases in the context. The standard table alias is stored under the key "Alias" in the ExtraValues dictionary of the result object. The alias of the standard table created by this task is 'Erweitertes Buchungsjournal'.
Additional members:
-
Function GetOptionalStandardJournalColumnNames().
The method returns a string array containing the columns that were added by calling AddOptionalStandardJournalColumn. If no optional columns were added, the method returns an empty array.
-
Property StandardTableId as String
This read-only property returns a string that identifies the standard table the task will create, in this case 'Erweitertes Buchungsjournal'. It is the same as the standard table alias that PerformTask stores in the result object.
-
Property SystemLength as Long (New for IDEA version 10.1)
Gets/sets the standard account length that was determined by the calling Standard Import Routine based on the chart of accounts used.
Default value: 0
Although the standard table 'Buchungsjournal mit Erw' does not require Multiple Period Preparation registration, the SystemLength property of its creator (see interface ICreateBuchungsjournalMitErwTableTask) should be set to the same value as that for Standard Journal. This value will be later used by the ColumnsSelector module to produce the correct MPP registration data for the Standard Journal table it generates on the basis of Buchungsjournal.
-
-
Function NewDebitorenkontenTask() as Object
The method returns an object that can be used to create the standard table '(@Debitorenkonten)' and implements the CreateStandardTableTask interface with the following members:
-
Property SourceDatabaseName as String
This read/write property of type string gets/sets the absolute or project-relative path to the source database.
-
Property IsAddingMissingMandatoryColumnsToSourceAllowed as Boolean
A Boolean read/write property that indicates whether the creator is allowed to add any mandatory missing result columns to the source database for performance reasons. This could be the case if the source database is a temporary result.
The default value is false, meaning that the creator will not add any missing columns to the source database before performing the final extraction of the result.
-
Function PerformTask() as Object
The method runs the task and returns an ItestResultFile reference to an object containing the name, ID, record count etc. of the result database. It also registers this result object with the list of result databases in the context. The standard table alias is stored under the key "Alias" in the ExtraValues dictionary of the result object. The alias of the standard table created by this task is 'Debitorenstamm'. The method was extended to register the created standard tables with their MPP tasks.
Additional member:
-
Property StandardTableId as String
This read-only property returns a string that identifies the standard table the task will create, in this case 'Debitorenstamm'. It is the same as the standard table alias that PerformTask stores in the result object.
-
-
Function NewKontenplanTask() as Object
This method returns an object that can be used to create the standard table '(@Kontenplan)' and implements the CreateStandardTableTask interface with the following members:
-
Property SourceDatabaseName as String
This read/write property of type string gets/sets the absolute or project-relative path to the source database.
-
Property IsAddingMissingMandatoryColumnsToSourceAllowed as Boolean
A Boolean read/write property that indicates whether the creator is allowed to add any mandatory missing result columns to the source database for performance reasons. This could be the case if the source database is a temporary result.
The default value is false, meaning that the creator will not add any missing columns to the source database before performing the final extraction of the result.
-
Function PerformTask() as Object
The method runs the task and returns an ItestResultFile reference to an object containing the name, ID, record count etc. of the result database. It also registers this result object with the list of result databases in the context. The standard table alias is stored under the key "Alias" in the ExtraValues dictionary of the result object. The alias of the standard table created by this task is 'Kontenplan'. The method was extended to register the created standard tables with their MPP tasks.
Additional member:
-
Property StandardTableId as String
This read-only property returns a string that identifies the standard table the task will create, in this case 'Kontenplan'. It is the same as the standard table alias that PerformTask stores in the result object.
-
-
Function NewKreditorenkontenTask() as Object
The method returns an object that can be used to create the standard table '(@Kreditorenkonten)' and implements the CreateStandardTableTask interface with the following members:
-
Property SourceDatabaseName as String
This read/write property of type string gets/sets the absolute or project-relative path to the source database.
-
Property IsAddingMissingMandatoryColumnsToSourceAllowed as Boolean
A Boolean read/write property that indicates whether the creator is allowed to add any mandatory missing result columns to the source database for performance reasons. This could be the case if the source database is a temporary result.
The default value is false, meaning that the creator will not add any missing columns to the source database before performing the final extraction of the result.
-
Function PerformTask() as Object
The method runs the task and returns an ItestResultFile reference to an object containing the name, id, record count etc. of the result database. It also registers this result object with the list of result databasesin the context. The standard table alias is stored under the key "Alias" in the ExtraValues dictionary of the result object. The alias of the standard table created by this task is 'Kreditorenstamm'. The method was extended to register the created standard tables with their MPP tasks.
Additional member:
-
Property StandardTableId as String
This read-only property returns a string that identifies the standard table the task will create, in this case 'Kreditorenstamm'. It is the same as the standard table alias that PerformTask stores in the result object.
-
-
Function New StandardjournalTask() as Object
The method returns an object that can be used to create the standard table '(@Standardjournal)' and implements the CreateStandardJournalTableTask interface with the following members:
-
Property SourceDatabaseName as String
This read/write property of type string gets/sets the absolute or project-relative path to the source database.
-
Property IsAddingMissingMandatoryColumnsToSourceAllowed as Boolean
A Boolean read/write property that indicates whether the creator is allowed to add any mandatory missing result columns to the source database for performance reasons. This could be the case if the source database is a temporary result.
The default value is false, meaning that the creator will not add any missing columns to the source database before performing the final extraction of the result.
-
Function AddOptionalColumn(ByVal columnNames as String) as Boolean
This method allows the programmer to communicate to the application the list of Standard Import Routine specific optional '(@Standardjournal)' column names in the order in which they appear in the result after the mandatory columns. It takes the name of a column as a string and returns a Boolean (true, if the operation succeeded, false, if the column is already present in the list of optional columns). Column names are case-insensitive. The comparison is performed using OrdinalIgnoreCase. An exception is thrown if the name is empty. When the task is run, the creator ignores those optional columns that do not exist in the source or those that happen to be on the list of mandatory columns.
-
Function PerformTask() as Object
The method runs the task and returns an ItestResultFile reference to an object containing the name, ID, record count etc. of the result database. It also registers this result object with the list of result databases in the context. The standard table alias is stored under the key "Alias" in the ExtraValues dictionary of the result object. The alias of the standard table created by this task is 'FIBU-Standardtabelle'. The method was extended to register the created standard tables with their MPP tasks.
Additional members:
-
Function GetMandatoryColumnNames()
The method returns a string array containing the names of the mandatory '(@Standardjournal)' columns in the order in which they appear in the result table. The list of mandatory columns can vary from one machine to another.
-
Function GetOptionalColumnNames()
The method returns a string array containing the columns that were added by calling AddOptionalColumn.
If no optional columns were added, the method returns an empty array.
-
Property StandardTableId as String
This read-only property returns a string that identifies the standard table the task will create, in this case 'FIBU-Standardtabelle'. It is the same as the standard table alias that PerformTask stores in the result object.
-
Property SystemLength as Long (New for IDEA version 10.1)
Gets/sets the standard account length that was determined by the calling Standard Import Routine based on the chart of accounts used.
Default value: 0
Although the standard table 'Buchungsjournal mit Erw' does not require Multiple Period Preparation registration, the SystemLength property of its creator (see interface ICreateBuchungsjournalMitErwTableTask) should be set to the same value as that for Standard Journal. This value will be later used by the ColumnsSelector module to produce the correct MPP registration data for the Standard Journal table it generates on the basis of Buchungsjournal.
-