This package allows you to interact with sap psp elements from table 963.

Classes

PspElement

Methods

FunctionParametersReturn ValueDescription
PspElement.__enter__(self)
The PspElement instanceEnter the context.
PspElement.__eq__(self, other)other: Another PspElement instanceTrue or FalseCheck if a PspElement is equal to another
PspElement.__exit__(self, exc_type, exc_val, exc_tb)exc_type: Exception type
exc_val: Exception value
exc_tb: Traceback

The PspElement is deleted when the context is left
PspElement.__init__(self, uuid)uuid: UUIDPspElement or None if the uuid isn't validInitialize a new PspElement instance
PspElement.can_be_deleted(self, show_error_dialog=False)show_error_dialog: Shows a dialog message when the element cannot be deletedTrue or FalseCheck if this PspElement may be deleted
PspElement.create_child_psp_element(self, attributes=None)attributes: Dictionary of attribute/value pairs in DT 563 to setPspElementCreate a child PspElement. It will belong to the same project and have its parent property set automatically
PspElement.delete(self)

Deletes the record from table 963

Classmethods

FunctionParametersReturn ValueDescription
PspElement.create(cls, attributes=None)attributes: Dictionary of attributes to be passed on to ppms.create_recordThe new PspElement instanceCreate a new psp element

Properties

PropertyGetterSetterDescription
PspElement.amount_of_assigned_tasksThe number of tasks assigned to this element
PspElement.amount_of_child_elementsThe number of child elements assigned to this element
PspElement.has_costs_or_effort_from_sapReturns True when any of the cost or effort fields are filled
PspElement.is_bottom_child_in_structureReturns True when there are no child elements
PspElement.levelReturns the structure level a PspElement is at. The top parent has level 1, its children have level 2, their children have level 3 and so on
PspElement.parent_element_sap_idReturns an ID generated like this: "Project SAP WBS Element ID"
PspElement.parent_pspParent SAP WBS Element
PspElement.parent_psp_elementReturns a PspElement instance or None of the parent element
PspElement.project_idProject ID
PspElement.psp_idSAP WBS Element ID
PspElement.sap_costsReturns a named tuple with 3 attributes that indicate the costs: planned, actual and remaining
PspElement.sap_effortReturns a named tuple with 3 attributes that indicate the effort: planned, actual and remaining
PspElement.sum_of_costs_of_assigned_resourcesReturns a named tuple with 3 attributes that indicate the sum of the costs booked on the assigned resources: planned, actual and remaining
PspElement.sum_of_costs_of_assigned_resources_and_own_costssap_costs + sum_of_costs_of_assigned_resources
PspElement.sum_of_effort_of_assigned_resourcesReturns a named tuple with 3 attributes that indicate the sum of the effort booked on the assigned resources: planned, actual and remaining
PspElement.sum_of_effort_of_assigned_resources_and_own_effortsap_effort + sum_of_effort_of_assigned_resources
PspElement.summarized_costsReturns a named tuple with 3 attributes that indicate the sum of the costs imported from SAP combined with the costs booked in PLANTA: planned, actual and remaining
PspElement.summarized_effortReturns a named tuple with 3 attributes that indicate the sum of the effort imported from SAP combined with the costs booked in PLANTA: planned, actual and remaining
PspElement.tasksReturn a list of psp_elements.Task instances where this element is assigned

Task

Methods

FunctionParametersReturn ValueDescription
Task.__init__(self, project_id, task_id)project_id: Project ID
task_id: Task ID
The Task instanceInitialize a new Task object
Task.assign_psp_element(self, psp_element)psp_element: A PspElement instanceTrue or False, depending on whether the operation succeededAssign a psp element to a task
Task.can_psp_element_assignment_be_removed(self, show_error_dialog=False)show_error_dialog: Shows a dialog message when the psp element assignments to this task cannot be removedTrue or FalseChecks if the psp element assignment can be removed from this task
Task.can_psp_element_be_assigned(self, psp_element, show_error_dialog=False, ignore_current_assignment=False)psp_element: A PspElement instance

show_error_dialog: Shows a dialog message when the psp element cannot be assigned to this task
ignore_current_assignment: Determines whether the method should check for an existing assignment
True or FalseCheck if a psp element can be assigned to this task
Task.clear_psp_element_assignment(self)
True or False, depending on whether the operation succeededRemove the psp element assignment from this task

Classmethods

FunctionParametersReturn ValueDescription
Task.from_dtp_record(cls, task_dtp_record)task_dtp_record: A DtpRecord from table 463A Task instanceCreate a Task instance from a DtpRecord

Properties

PropertyGetterSetterDescription
Task.amount_of_child_tasksReturns the number of tasks below this Task
Task.assigned_psp_elementReturns None if no sap psp element is assigned, otherwise the PspElement instance is returned
Task.has_costs_or_effortReturns True or False depending on whether the task has nonzero costs or effort
Task.has_psp_assignment_in_status_reportReturns True or False depending on whether a report exists in which the task has an assigned psp element
Task.sap_structureSAP Structure Task
Task.summary_taskSummary Task

Functions

FunctionParametersReturn ValueDescription
get_all_psp_elements_of_project(project_id)project_id: Project IDA list of PspElement instances based on the assignments of the tasksFetch all SAP PSP elements assigned to the tasks of this project