MtsResourceModule

Note

  • Both global and dynamic variables can be used in the parameters.
    • Using invalid variables leads to undefined behavior.

Python Module Subclasses

PPMSCSVModule

  • Can write CSV files which can be read by PPMS 38.
    • The format of these CSV files looks as follows:
@BEGIN GLOBAL SEPARATOR ; ESCAPE @ @END GLOBAL @BEGIN MODULE MODULE @ @END MODULE wert_1;wert_2 wert_1;wert_2
CODE
UsePossible ?
Source moduleNo
Pool moduleNo
Target moduleYes
ParametersFunction
filepath
Path of the file to be exported. It can either be in relation to the server directory or be an absolute path on the server.
delimiter
Separator within the CSV file
escapecharCharacter used to escape the delimiter within a value
encodingCodec with which the file is encoded
overwriteDefines whether an already existing file is to be overwritten during export
quotingDefines whether the values are to be written/read in inverted commas. Possible values can be found in the Python Documentation

MtsModule

  • Sends and writes data in PLANTA using the Mts layer.
  • All data that was sent from this module is of the strings type, and as a recipient, the module also expects all values to be strings.
  • Data fields which occur in the mapping but are not available in the data area are ignored without warning.
  • Data fields in window 9 are not filled.
  • The module determines the table to which is imported on the basis of the DDI.
    • This info is used to identify the primary keys in this data area and to fill them first.
    • This behavior enables the update of existing records if the complete primary key is included in the delivery.
  • Provides a field length check.
    • The field length check is not carried out for date fields.
UsePossible ?
Source moduleYes
Pool moduleNo
Target moduleYes
ParametersFunction
sorted
Values
  • 0 = The values are exported in a random order.
  • 1 = The data is exported in the order defined in the source module. The data area from which the data is exported must not have a parent data area.
da_namePython ID of the data area to which data is imported or exported.
If the MtsModule is set as a target module, the parameter can remain empty. This implies that all data areas in the module are used as import targets.

Note

  • MtsModule interprets the following input as valid values for checkboxes:
    • Deactivated: 'N', '@N', '0', '', 'FALSE'
    • Activated: 'Y', '@Y', '1', 'J', 'TRUE', 'X'

MtsProjectModule

  • Sends and writes data in PLANTA using the Mts layer.
  • All data that was sent from this module is of the strings type, and as a recipient, the module also expects all values to be strings.
  • Data fields which occur in the mapping but are not available in the data area are ignored without warning.
  • Data fields in window 9 are not filled..
  • The module determines the table to which is imported on the basis of the DDI.
    • This info is used to identify the primary keys in this data area and to fill them first.
    • This behavior enables the update of existing records if the complete primary key is included in the delivery.
  • Provides a field length check.
    • The field length check is not carried out for date fields.
UsePossible ?
Source moduleYes
Pool moduleNo
Target moduleYes
ParametersFunction
sorted
Values
  • 0 = The values are exported in a random order.
  • 1 = The data is exported in the order defined in the source module. The data area from which the data is exported must not have a parent data area.
da_namePython ID of the data area to which data is imported or exported.
If the MtsModule is set as a target module, the parameter can remain empty. This implies that all data areas in the module are used as import targets.
auto_task_id

The Python ID for automatic creation of a task (e.g. to import costs to it). If the parameter is not filled, no task is created. The parameter is only available if the module is used as a target module in import.

auto_task_name

Name for the automatically created task. The parameter is only available if the module is used as a target module in import.

MtsLiabilityModule

Function and use analogously to MtsModule except for the following differences:

  • Beim Datenimport werden alle Obligo-Werte geleert, d.h., die folgenden DIs werden global auf 0 gesetzt:
  • Die Schnittstelle kennzeichnet die Pool-Datensätze, die sie importiert, mit einem Obligo-Flag.
  • Beim Import werden alle Pool-Datensätze, die als Obligo geflagged sind und noch nicht übertragen wurden, gelöscht. Bereits übertragene Werte werden zur Archivierung im Pool stehen gelassen.
  • Wurden alle Jahresscheiben für ein Projekt korrekt importiert, werden die folgenden DIs gestempelt:

MtsPoolModule

  • Works like an MtsModule but stamps Status and Transferred on in DT 567.
  • The module only works correctly if the pool table has been customized correctly (see Schnittstellen-Customizing).
UsePossible ?
Source moduleNo
Pool moduleYes
Target moduleNo
ParametersFunction
sending_da

Data area from which the data is loaded in the Pool → Target step

Note:

  • From DB 39.5.8, the sending_da and receiving_da parameters replace the former da_name parameter.
  • Data of already existing interface configurations is automatically migrated during an update.
  • Individual classes that inherit from MtsPoolModule are also lifted to the current status.
receiving_daData area in which the data is stored in the Source → Pool
l_varThe number to be filled with the current interface configuration in the pool module.
Allows you to restrict the pool table to the records of the current transaction.

Information

  • The constellation allows for a more flexible customizing. You can now import to a "technical" data area which contains the raw fields and is then exported from a processed data area which processes data using functions like grouping or summarization.

CSVModule

  • Can read and write CSV files
    • It can only import files that can be accessed from the application server using the user which runs the PLANTA service.
  • Here you can take a plain dummy data area with a field as a data area.
  • If the module is used as a source module and the readheader parameter is 1, the source mappings correspond to the column names in the file.
    • If the parameter is 0, the position is used for column definition instead.
  • If the module is used as a target module and the writeheader parameter is 1, the target mappings correspond to the column names in the file.
    • If the parameter is 0, the position is used for column definition instead.
UsePossible ?
Source moduleYes
Pool moduleNo
Target moduleYes
ParametersFunction
archive_dir
Path to a directory to which the file is to be moved after successful import. It can either be in relation to the server directory or be an absolute path on the server. If the parameter is empty, the server directory is used. If the directory does not exist, it will be created.
filepath
Path of the file to be imported or exported. It can either be in relation to the server directory or it can be an absolute path on the server.
Wildcards like * can be used in the name. If several files are found, an error is displayed.
delimiter
Separator within the CSV file
If you want to use a tab as a separator, you have to enter /t.
escapecharCharacter used to escape the delimiter within a value
encodingCodec with which the file is encoded
writeheaderDefines whether a title line is written during export
readheaderDefines whether the first line or the source mappings display the column names in the CSV file
overwriteDefines whether an already existing file is to be overwritten during export
quotingDefines whether the values are to be written/read in inverted commas. Possible values can be found in the Python Documentation.

Notes

  • Nachdem eine Datei erfolgreich importiert wurde, wird die UUID der Schnittstellen-Konfiguration in den Dateinamen geschrieben und die Datei in das über archive_dir konfigurierte Verzeichnis verschoben.
  • If a CSV export is carried out, placeholders can be used in the filepath parameter in order to format a time stamp. The possible placeholders can be found in the Python documentation.

The most common encoding values are:

encodingUsed by
latin-1Default Microsoft Excel encoding on German computers
windows-1252Default Microsoft Excel encoding on English computers
utf-8UTF-8 encoded file without BOM
utf-8-sigUTF-8 encoded file with BOM

MultiCSVModule

Information

  • This module subclass equates to the CSVModule module subclass.
  • It only differs in the filepath parameter.
    • If several files are found, no error is displayed when using MultiCSVModule, but the files are imported/exported one by one in the sequence of their file names.

ClientCSVModule

Information

  • This module subclass equates to the CSVModule module subclass.
    • In contrast to this module subclass, however, the filepath and archive_dir parameters do not exist here.
  • Unlike the CSVModule, ClientCSVModule can import/export files which are accessible for the user that opens the PLANTA Client.

MtsLoadModule

  • Imports load records and stamps them in the Imported on and Imported by fields (DT472 Loads).
  • Exports load records and stamps them in the SAP status, Exported on and Exported by fields (DT472 Loads).
UsePossible ?
Source moduleYes
Pool moduleNo
Target moduleYes
ParametersFunction
da_nameSee MtsModule

MtsExportPoolLoadModule

  • Works like MtsPoolModule but additionally stamps SAP status, Exported on and Exported by (DT472 Loads).
  • Can only be used for export interfaces.
UsePossible ?
Source moduleNo
Pool moduleYes
Target moduleNo
ParametersFunction
sending_da

See MtsPoolModule

Note:

  • From S 39.5.8, the sending_da and receiving_da parameters replace the former da_name parameter.
receiving_daSee MtsPoolModule
l_varSee MtsPoolModule
sortedSee MtsModule

MtsResourceModule

  • Module subclass for the import of resources and their corresponding data (person, user, role, stakeholder)
    • Since currently the creation and update of resource data still make high demands on the module subclass, an import with the standard MtsModule presents some difficulties.
    • MtsResourceModule meets these demands and allows, e.g., for the batch-import of resource data.
  • If you want to use an individual interface, you have to create a subclass of MtsResourceModule and adjust the PERSON_DA, ROLE_DA, RESOURCE_DA and STAKEHOLDER_DA class attributes to the customizing IDs of the respective data areas.
    • The standard MtsResourceModule points to the data areas of the Employee Import standard interface.
  • If the ROLE_DA attribute points to a valid role data area, the 01100214 MP user and 01100225 Employee standard roles are assigned to users.
    • The roles assigned by default can be defined according to the customer’s requirements in the Standard roles for fast creation of employee template in the Global Settings module.

GermanHolidayImportModule

  • Imports German holidays from a web service to PLANTA calendars. For more information, see Calendar.
ParametersFunction
calendarID of the calendar to which you want to import
start_yearYear from which on you want to import holidays
end_yearYear up to which you want to import holidays
stateFederal state for which holidays are to be loaded. Permitted values: HB, NI, NW, HH, SN, MV, BW, SL, SH, ST, BE, RP, BB, BY, HE, TH

AbsenceImportModule

  • Imports absences in the period table
  • Since the period table contains one record per day, the imported data is duplicated for each day between start_date and end_date (including start and end date).
  • The absence_type column expects a numeric value that can be learned from the table below.
  • The values can be inserted using a mapping function like e.g. ConstantValue or Replacer.
Reason for absenceValue
Absence46
1/2 day absence45
Special leave48
Vacation44
1/2 day of vacation43
Maternity leave/parental leave47
On- and off-the-job training113
Sickness399
ParametersFunction
da_nameSee MtsModule
date_formatThe format of the date values in the start_date and end_date columns. For possible values, see the Python documentation

ConversionFactorImport

Subclass of MtsModule which is able to update data in the conversion factor table.

BasePyRFCModule

Allows to connect to SAP with the new pyrfc library

SAP connection parameters
ashost
sysnr
client
 user
passwd


Mapping Functions

Information

  • The following mapping functions can be used according to the type.

Enricher

ConstantBoolValue

  • Returns the true/false boolean value depending on the configuration
  • Input value: is not considered
  • Output value: boolean value (true/false)
ParametersFunction
trueDefines whether true or false is to be returned. Possible values: 0 (false) and 1 (true)

VariableReader

  • Reads the value from an arbitrary variable and returns it
  • Input value: not relevant
  • Output value: variable content
ParametersFunction
variableVariable to be read out, e.g. @1 or @G123. Supports all variable types.

Slicer

  • Enables you to apply the Slice function from Python to a value.
  • This can be used in order to cut off parts of the text or to invert the text.
  • Input value: text
  • Output value: Text
ParametersFunction
startIndex to begin at
stepStep width at which to cut off
endIndex to stop at

Replacer

  • Replaces a value by another one
  • Input value: Text
  • Output value: text
ParametersFunction
old_valuePartial string to be replaced
new_valueValue by which the partial string is to be replaced

ConstantValue

  • Returns a constant value
  • Input value: is not considered
  • Output value: text
ParametersFunction
valueBy specifying a sign, it will be stripped. If nothing is specified: all types of spaces/tabs

Stripper

  • Cuts off the specified signs before and after a value
ParametersFunction
chars
The sign that is to be cut off
If no sign is specified here, all types of spaces/tabs are cut off.

LeftStripper

  • Cuts off the specified characters at the beginning of a value.
ParametersFunction
chars
The sign that is to be cut off
If no sign is specified here, all types of spaces/tabs are cut off.

RightStripper

  • Cuts off the specified characters at the end of a value.
ParametersFunction
chars
The sign that is to be cut off
If no sign is specified here, all types of spaces/tabs are cut off.

GetResAssignmentAttribute

  • Returns the value of a DI from DT466 and writes a note in the log-file if it could not be found in DT466.
  • Input value: is not considered
  • Output value: text
ParametersFunction
projectTechnical project ID of the project
taskTechnical task ID of the task
res_idResource ID
python_idDI Python ID of the DI which is to be returned

GetPersonId

Concatenator

  • Adds the configured string to the input value
  • Input value: text
  • Output value: text
ParametersFunction
textText which is to be added to the input value
leftDetermines whether the text is to be added on the left of the string; possible values are 0 and 1
rightDetermines whether the text is to be added on the right of the string; possible values are 0 and 1

Rounder

  • Rounds the input value to the defined number of digits
  • Input value: number
  • Output value: text
ParametersFunction
digitsA number greater/equal to 0; Defines the number of digits to which the input value is to be rounded. If the parameter cannot be converted into any number, the default value 2 will be used.

GetResourceAttribute

  • Returns the value of a DI from DT467 and writes a note in the log-file if it could not be found in DT467.
  • Input value: is not considered.
  • Output value: text
ParametersFunction
resourceResource ID
python_idDI Python ID of the DI which is to be returned

LeftPadder

  • Extends the entered string on the left by the defined signs and sets the entire string to the defined length
ParametersFunction
fillcharSigns by which the string is extended
widthEntire length of the string with extension

Example

  • Input string: "foo"
    • fillchar: \s
    • width: 5
  • Output string: " foo"

RightPadder

  • Extends the entered string on the right by the defined signs and sets the entire string to the defined length
ParametersFunction
fillcharSigns by which the string is extended
widthEntire length of the string with extension

Example

  • Input string "foo"
    • fillchar: x
    • width: 5
  • Output string: "fooxx"

DataitemReplacer

  • Replaces the input value (in case it is empty) with the value of another data item
  • Output value: input value (if not empty), otherwise the value of the specified data item
ParametersFunction
uuidUUID of the record from which the data item is to be read
datatableSQL ID of the data table from which the data item is to be read
dataitemSQL ID of the data item to be read

GetPLANTAIdFromExternalId

  • Specifies the PLANTA UUID for the specified ID from an external system, provided that it is linked
  • Input value: ID from an external system
  • Output value: PLANTA UUID
ParametersFunction
systemCode of the external system (e.g. 728 for PLANTA pulse)
typeObject type which has this ID (e.g. 'workload' for loads from PLANTA pulse)

GetValueFromUuid

  • Specifies the value of a data item for a record with the specified UUID
  • Input value: PLANTA UUID
  • Output value: value of the data item
ParametersFunction
datatableSQL ID of the data table from which the data item is to be read
dataitemSQL ID of the data item to be read

GlobalSettingValue

ParametersFunction
global_settingID of the global setting to fetch the alpha120 value from

GetLDAPDefaultStartPeriod

  • Return the start period of the ldap default calendar or today, whichever is later

GetLDAPDefaultEndPeriod

  • Return the end period of the ldap default calendar or today in two years, whichever is earlier

Converter

ToUppercase

  • Changes a value to UPPER CASE LETTERS
  • Input value: text
  • Output value: text

ToString

  • Changes a value to a text value
  • Input value: arbitrary
  • Output value: text

ToInt

  • Changes a value to an integer
  • Input value: arbitrary
  • Output value: integer
ParametersFunction
roundConfigures whether the value is to be rounded first

ToFloat

  • Changes a value to a floating point number
  • Input value: arbitrary
  • Output value: Floating point number

ToList

  • Convert a string representation of a list into a list if possible
  • Input value: String
  • Output value: List

StringToPLANTADate

  • Converts a text into the PLANTA date format
  • Input value: text
  • Output value: integer
ParametersFunction
formatFormat of the date. For possible values, see the Python documentation

PLANTADateToString

  • Converts the PLANTA date format into a text
  • Input value: integer
  • Output value: text
ParametersFunction
formatFormat to be used for the date. For possible values, see the Python documentation

ConvertFunctionalProjectIDToTechnical

  • Has no parameters and takes a functional project ID as a value and returns the technical project ID or None.

ConvertResourceIdToPersonId

  • Returns the value of Person for the code which is passed as a value.
  • Input value: a valid Code
  • Output value: value of the Person field

ConvertTrailingSignToLeadingSign

  • Has no parameters and converts a number, like e.g. 10- to -10

UnicodeNormalizer

  • Uses compatible decomposition (NFKD) to convert the special signs that are not shown by PLANTA project into signs that can be displayed by PLANTA project.
ParametersFunction
encodingEncoding to which the input text is to be converted. By default, this parameter is preset with the coding of the server and does not have to be changed.

ConvertPSPtoUUID

  • Takes the "project" parameter and converts the passed WBS ID to a UUID.

ConvertValidFromToConversionFactorItemId

  • Checks whether there is a record with the transferred date value for the respective conversion factor ID the Valid from value of which corresponds to the date. If it does, the position is returned (DI000343).
ParametersFunction
conversion_factor_idConversion factor ID, saved in DI000341
formatDate format for the incoming value (like e.g. PLANTADateToString)

ConvertDateToYear

  • Converts a date into a year.
ParametersFunction
formatDefines the date format to be passed.

ConvertProjectToAttribute

  • Fetches the value from the configured DI for the specified project
  • Input value: Technical project ID
  • Output value: text
ParametersFunction
python_idThe Python ID of the DI from DT461 Project

ConvertPLANTAUserToPulseUser

  • Returns the PLANTA pulse user for a PLANTA project user
  • Input value: user code from DT511 (DI010323)
  • Output value: PLANTA pulse ID of the user or None

ConvertPLANTAIdToPulseId

  • Converts a PLANTA project UUID into a PLANTA pulse ID
  • Input value: UUID
  • Output value: PLANTA pulse ID of the object or None

ConvertResourceAssignmentUuidToPulseBoardId

  • Converts the UUID of a resource assignment into the board ID of the task
  • Input value: UUID of a resource assignment (DI060939)
  • Output value: board ID of the task

ConvertToJiraField

  • Converts the value into a json value which can be processed by Jira
ParametersFunctionDefault values
formatFormat of the json value (must contain the '{input}' placeholder){'id': '{input}'}

ConvertSecondsToHours

  • Converts seconds into hours and returns them as float

ConvertJiraIdToPLANTAId

  • Converts a Jira ID into a PLANTA project UUID
  • Input value: ID of a Jira object
ParametersFunction
typeType of the external object (as saved in the DT597ExternalSystemObjectMapping table)

ConvertUuidToAttribute

  • Returns the value of the specified data item of a record with the specified PLANTA project UUID from the specified table
  • Input value: UUID of a PLANTA project object
ParametersFunction
tableSQL ID of a PLANTA project table
dataitemSQL ID of a data item from the specified table

ConvertLDAPIdToPersonId

  • Converts a LDAP ID into a PLANTA project Person ID (DI010420 in DT516)
  • Input value: ID of an LDAP user account

ConvertPersonIdToCode

  • Converts a PLANTA project Person ID (DI010420 in DT516) to their Code (DI027020)

LDAPLockedUserToLeavingDate

  • Return today's date if the user account is locked, empty otherwise
ParametersFunction
object_guidID of an LDAP user account

GetFirstElement

  • Return the element at index 0

Validators

  • All validators have two parameters:
    • child_when_invalid: Here, the name of one of the children of the validator can be entered. If the validator fails, only this child is carried out. If the validator is successful, the child_when_invalid string is ignored.
    • mark_record_as_invalid : If this parameter is at 1, the record is marked as invalid and is not transferred when the validator fails. If the parameter is at 0, only this column is ignored upon transfer.

IsTrue

  • Checks whether the value is logically true

ExistsAsPK

  • Checks whether the transferred value is a primary key in the configured table
ParametersFunction
table_numTable number in PLANTA to be checked

IsInList

  • Checks whether the transferred value is in the configured value list
ParametersFunction
valuesA list of values which must be separated using the configured separator
separatorSeparator for separating the list into separate values

Equals

Contains

  • Checks whether the configured value exists in the transferred value
ParametersFunction
valueValue to be available

TaskExists

  • Checks whether the transferred value is a valid task ID in the configured project
ParametersFunction
projectTechnical project ID of the project in which is checked

ResIsAssignedToTask

  • Checks whether the transferred value is a valid resource assignment in the configured project and task
  • Additionally, the validator can create a resource assignment if none exists.
ParametersFunction
projectTechnical project ID of the project in which is checked
taskTechnical task ID of the task to be checked
create_if_not_existsIn case the resource assignment does not exist and this parameter is at 1, the resource assignment is created

ComparesTo

  • Compares values. The validator fails if the comparison fails.
  • Input value = arbitrary
ParametersFunction
valueSpecifies, against what to compare
operatorSpecifies, how to compare: ==, !=, <, >, <=, >= 
typeSpecification of the type, possible values: TEXT, INTEGER and FLOAT. Prior to the comparison, the validator converts the values of the value parameter and the input value into this type.

YearlyTrancheExists

  • Checks whether the passed year is available in the budget of the project as a yearly tranche.
ParametersFunction
projectSpecifies the technical project ID of the project for which the check is to be done.
cost_type_groupSpecifies the cost type group subject to the check.
create_if_not_existsSpecifies whether the yearly tranche is to be created if it does not exist. Valid values: 1 or 0

AlreadyMapped

  • Checks whether the ID passed from an external system has already been assigned to a PLANTA project object
ParametersFunction
external_systemSpecifies the ID of the external system
external_typeSpecifies the type of the object from the external system


IsInCalendar

  • Checks whether the transferred date lies within the calendar periods
  • Input value: Date string in DD.MM.YY format
ParametersFunction
calendar_idSpecifies the ID of the calendar

RemoteExistsAsPK

  • Checks whether the supplied primary key exists in the given table
ParametersFunction
table_numID of the table in which to check for the primary key
pk_idvalue of the primary key

LDAPIsInPersonCircle

  • Check if the memberof attribute matches the given person circle
ParametersFunction
person_circle
ID of the person circle to check

PersonIsMappedToLDAP

  • Check whether the given person ID is mapped to LDAP

System check classes

ParametersFunction
HostnameConditionalCompares the parameter value to the host name of the application server
PortConditionalCompares the parameter value to the port entered in globals.conf of the PLANTA server
WorkDirConditionalCompares the parameter value to the work directory of the PLANTA server
IPAddressConditionalCompares the parameter value with the IP address of the application server

Note