T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
TC::SCHMGR Namespace Reference

Functions

 addMemberships schedule_id MemberShipDict
 This function calls the TcSoa based function addMemberships to update the membership of a given Schedule in Teamcenter. More...
 
 createDependencies schedule_id predecessor_task_id successor_task_id dependency_type lag_time
 This function calls the TcSoa based function createDependencies to create a dependency between two Task in Teamcenter. More...
 
 createMilestone schedule_id parent_task_id previous_sibling_task_id task_id object_name milstone_date
 This function calls the TcSoa based function createMilestone to create a Milestone Task in Teamcenter. More...
 
 createSchedule item_id object_name start_date finish_date ?object_type?
 This function calls the TcSoa based function createSchedule to create a new Schedule based on a given parameters in Teamcenter. More...
 
 createScheduleFromTemplate template_item_id item_id object_name CopyOptionsDict
 This function calls the TcSoa based function createScheduleFromTemplate to create a new Schedule based on a given Schedule template in Teamcenter. More...
 
 createScheduleNewBaselines item_id baseline_item_id baseline_object_name ?baseline_isActive?
 This function calls the TcSoa based function createScheduleNewBaselines to create a Baseline for a given Schedule in Teamcenter. More...
 
 createScheduleProxyTask schedule_id task_id reference_id ?sublevels?
 This function calls the TcSoa based function createScheduleProxyTask to create a Proxy Task in Teamcenter. More...
 
 createScheduleTask schedule_id parent_task_id previous_sibling_task_id task_id object_name start_date finish_date work_estimate ?object_type? ?constraint? ?status? ?duration? args
 This function calls the TcSoa based function createScheduleTask to create a Schedule Task in Teamcenter. More...
 
 deleteDependencies schedule_id predecessor_task_id successor_task_id
 This function calls the TcSoa based function deleteDependencies to delete a dependency between two Task in Teamcenter. More...
 
 deleteScheduleTask schedule_id task_id
 This function calls the TcSoa based function deleteScheduleTaskExecution to delete a given Task in Teamcenter. More...
 
 detachSchedule master_schedule_id sub_schedule_id
 This function calls the TcSoa based function detachSchedule to detach a given Sub-Schedule from a defined Master-Schedule in Teamcenter. More...
 
 insertSchedule master_schedule_id sub_schedule_id master_schedule_task_id ?adjustMasterDates?
 This function calls the TcSoa based function deleteScheduleTaskExecution to delete a given Task in Teamcenter. More...
 
 logoutSession args
 This function calls the TcSoa based function logoutSession to close the connection to the Teamcenter server. More...
 
 moveScheduleTask schedule_id parent_task_id previous_sibling_task_id task_id
 This function calls the TcSoa based function moveScheduleTask to move a Schedule Task in the structure of a given schedule in Teamcenter. More...
 
 shiftSchedule item_id shift_date ?new_finish?
 This function calls the TcSoa based function shiftScheduleNonInteractive to shift a Schedule to a new start or finish date. More...
 
 updateDependencies schedule_id predecessor_task_id successor_task_id dependency_type lag_time
 This function calls the TcSoa based function updateDependencies to update a dependency between two Task in Teamcenter. More...
 
 updateSchedule item_id object_name start_date finish_date args
 This function calls the TcSoa based function updateSchedule to update the corresponding Schedule in Teamcenter. More...
 
 updateScheduleTask schedule_id task_id object_name start_date finish_date work_estimate constraint ?status?
 This function calls the TcSoa based function updateScheduleTask to update a given Task in Teamcenter. More...
 
 updateScheduleTaskExecution task_id TaskExecUpdateDict
 This function calls the TcSoa based function updateScheduleTaskExecution to update a given Task in Teamcenter. More...
 

Function Documentation

◆ addMemberships()

TC::SCHMGR::addMemberships   schedule_id MemberShipDict  

This function calls the TcSoa based function addMemberships to update the membership of a given Schedule in Teamcenter.

Parameters
schedule_idThis represents the schedule for the new membership.
MemberShipDictDict containing the following possible keys:
  • resource: The resource to add to the schedule. The resource can be a User, Group, or Discipline. Valid value is tag of the resource.
  • membershipLevel: The membership level of the resource in the schedule. Following are the valid values: 0-Observer,1-Participant,2-Coordinator.
  • cost: This is the string representing the cost value of the resource.
  • currency: This is the string representing the ISO-4217 currency code. Only those keys are used during the update that are specified all other informations will be untouched, any other key will be ignored.
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set UserStatus [::ITK::SA_find_user [tpco_scanHEX16 $UserName]]
2 if {[::ITK::isITK_ok $UserStatus]} {
3  set UserTag [string range [tpco_formatHEX16 [lindex $UserStatus 1]] 0 13]
4 }
5 dict set MemberShipDict membershipLevel "2"; # Coordinator
6 dict set MemberShipDict resource $UserTag; # Tag representation of the user
7 set Status [::TC::SCHMGR::addMemberships $ScheduleId $MemberShipDict]
8 puts "::TC::SCHMGR::addMemberships $Status"

◆ createDependencies()

TC::SCHMGR::createDependencies   schedule_id predecessor_task_id successor_task_id dependency_type lag_time  

This function calls the TcSoa based function createDependencies to create a dependency between two Task in Teamcenter.

Parameters
schedule_idSchedule Id
predecessor_task_id
successor_task_id
dependency_typeTask dependency type, with the following possible values:
  • FF: finish->finish
  • FS: finish->start
  • SS: start->start
  • SF: start->finish
lag_time
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::createDependencies $ScheduleId $TaskId1st $TaskId2nd $DependencyType 480]
2 puts "::TC::SCHMGR::createDependencies $Status"

◆ createMilestone()

TC::SCHMGR::createMilestone   schedule_id parent_task_id previous_sibling_task_id task_id object_name milstone_date  

This function calls the TcSoa based function createMilestone to create a Milestone Task in Teamcenter.

Parameters
schedule_idSchedule Id
parent_task_id
previous_sibling_task_id
task_idTask Id
object_nameTask name
milstone_dateMilestone date of the Schedule Task (format yyyymmddhhMMss)
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::createMilestone $ScheduleId $ParentTaskId $PreviousTaskId $TaskId $TaskName $MilestoneDate]
2 puts "::TC::SCHMGR::createMilestone $Status"

References createScheduleTask().

◆ createSchedule()

TC::SCHMGR::createSchedule   item_id object_name start_date finish_date ?object_type?  

This function calls the TcSoa based function createSchedule to create a new Schedule based on a given parameters in Teamcenter.

Parameters
item_idSchedule Id
object_nameSchedule name
start_dateStart date of the Schedule (format yyyymmddhhMMss)
finish_dateFinish date of the Schedule (format yyyymmddhhMMss)
object_typeOptional Schedule type name (default is Schedule)
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::createSchedule $ScheduleId $ScheduleName $StartDate $FinishDate]
2 puts "::TC::SCHMGR::createSchedule $Status"

◆ createScheduleFromTemplate()

TC::SCHMGR::createScheduleFromTemplate   template_item_id item_id object_name CopyOptionsDict  

This function calls the TcSoa based function createScheduleFromTemplate to create a new Schedule based on a given Schedule template in Teamcenter.

Parameters
template_item_idSchedule Id of the template Schedule
item_idSchedule Id
object_nameSchedule name
CopyOptionsDictDict containing the following possible keys:
  • copy_baseline flag
  • reset_work flag
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 dict set CopyOptionsDict copy_baseline "0"; # copy baselines also to the new Schedule
2 dict set CopyOptionsDict reset_work "1"; # reset work status of the tasks
3 set Status [::TC::SCHMGR::createScheduleFromTemplate $ScheduleTemplateId $ScheduleId $ScheduleName $CopyOptionsDict]
4 puts "::TC::SCHMGR::createScheduleFromTemplate $Status"

◆ createScheduleNewBaselines()

TC::SCHMGR::createScheduleNewBaselines   item_id baseline_item_id baseline_object_name ?baseline_isActive?  

This function calls the TcSoa based function createScheduleNewBaselines to create a Baseline for a given Schedule in Teamcenter.

Parameters
item_idSchedule Id
baseline_item_idId of the Baseline for the given Schedule
baseline_object_nameName of the Baseline for the given Schedule
baseline_isActiveDefine Baseline as active (default = 1) or inactive (0)
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::createScheduleNewBaselines $ScheduleId $ScheduleBaselineId $ScheduleBaselineName 1]
2 puts "::TC::SCHMGR::createScheduleNewBaselines $Status"

◆ createScheduleProxyTask()

TC::SCHMGR::createScheduleProxyTask   schedule_id task_id reference_id ?sublevels?  

This function calls the TcSoa based function createScheduleProxyTask to create a Proxy Task in Teamcenter.

Parameters
schedule_idSchedule Id of the schedule were the proxy is being created
task_idTask Id of the real task being proxied
reference_idTask Id of the reference task in the schedule
sublevelsNumber of sub-levels (if this should be mirrored in the sub schedules (-1 = all, 0 = only this schedule, 1= first level, 2 = 1st and 2nd level, etc)
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::createScheduleProxyTask $ScheduleId $TaskId $RefTaskId -1]
2 puts "::TC::SCHMGR::createScheduleProxyTask $Status"

◆ createScheduleTask()

TC::SCHMGR::createScheduleTask   schedule_id parent_task_id previous_sibling_task_id task_id object_name start_date finish_date work_estimate ?object_type? ?constraint? ?status? ?duration? args  

This function calls the TcSoa based function createScheduleTask to create a Schedule Task in Teamcenter.

Parameters
schedule_idSchedule Id
parent_task_id
previous_sibling_task_id
task_idTask Id
object_nameTask name
start_dateStart date of the Schedule Task (format yyyymmddhhMMss)
finish_dateFinish date of the Schedule Task (format yyyymmddhhMMss)
work_estimate
object_typeOptional task type name (default is ScheduleTask)
constraintOptional Task Constraint parameter with the following possible values:
  • 0: No constraint (default value)
  • 1: As Late As Possible
  • 2: As Soon As Possible
  • 3: fixed
statusTask status
durationTask status
argsreserved for future usage
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::createScheduleTask $ScheduleId $ParentTaskId $PreviousTaskId $TaskId $TaskName $StartDate $FinishDate 480]
2 puts "::TC::SCHMGR::createScheduleTask $Status"

Referenced by createMilestone().

◆ deleteDependencies()

TC::SCHMGR::deleteDependencies   schedule_id predecessor_task_id successor_task_id  

This function calls the TcSoa based function deleteDependencies to delete a dependency between two Task in Teamcenter.

Parameters
schedule_idSchedule Id
predecessor_task_id
successor_task_id
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::deleteDependencies $ScheduleId $TaskId1 $TaskId2]
2 puts "::TC::SCHMGR::deleteDependencies $Status"

◆ deleteScheduleTask()

TC::SCHMGR::deleteScheduleTask   schedule_id task_id  

This function calls the TcSoa based function deleteScheduleTaskExecution to delete a given Task in Teamcenter.

Parameters
schedule_id
task_id
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::deleteScheduleTask $ScheduleId $TaskId]
2 puts "::TC::SCHMGR::deleteScheduleTask $Status"

◆ detachSchedule()

TC::SCHMGR::detachSchedule   master_schedule_id sub_schedule_id  

This function calls the TcSoa based function detachSchedule to detach a given Sub-Schedule from a defined Master-Schedule in Teamcenter.

Parameters
master_schedule_id
sub_schedule_id
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::detachSchedule $MasterScheduleId $SubScheduleId]
2 puts "::TC::SCHMGR::updateScheduleTaskExecution $Status"

◆ insertSchedule()

TC::SCHMGR::insertSchedule   master_schedule_id sub_schedule_id master_schedule_task_id ?adjustMasterDates?  

This function calls the TcSoa based function deleteScheduleTaskExecution to delete a given Task in Teamcenter.

Parameters
master_schedule_id
sub_schedule_idThe Schedule that is requested to be inserted in the master Schedule.
master_schedule_task_id
adjustMasterDatesIf true the operation adjusts the start date and the end date of the master Schedule to match the start date and the end date of the sub Schedule. If false (default) the operation does not adjust the dates of the master Schedule
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set adjustMasterDates 1
2 set Status [::TC::SCHMGR::insertSchedule $MasterScheduleId $SubScheduleId $MasterScheduleTaskId $adjustMasterDates]
3 puts "::TC::SCHMGR::updateScheduleTaskExecution $Status"

◆ logoutSession()

TC::SCHMGR::logoutSession   args  

This function calls the TcSoa based function logoutSession to close the connection to the Teamcenter server.

Parameters
argscurrently not in use
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 dict set TaskExecUpdateDict work_complete "60"; # one hour completed
2 dict set TaskExecUpdateDict work_remaining "600"; # 10 hour still to do
3 dict set TaskExecUpdateDict status "In Work"
4 set Status [::TC::SCHMGR::updateScheduleTaskExecution $TaskId $TaskExecUpdateDict]
5 puts "::TC::SCHMGR::updateScheduleTaskExecution $Status"
7 puts "::TC::SCHMGR::logoutSession $Status"

◆ moveScheduleTask()

TC::SCHMGR::moveScheduleTask   schedule_id parent_task_id previous_sibling_task_id task_id  

This function calls the TcSoa based function moveScheduleTask to move a Schedule Task in the structure of a given schedule in Teamcenter.

Parameters
schedule_idSchedule Id
parent_task_id
previous_sibling_task_id
task_idTask Id
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::moveScheduleTask $ScheduleId $ParentTaskId $PreviousTaskId $TaskId]
2 puts "::TC::SCHMGR::moveScheduleTask $Status"

◆ shiftSchedule()

TC::SCHMGR::shiftSchedule   item_id shift_date ?new_finish?  

This function calls the TcSoa based function shiftScheduleNonInteractive to shift a Schedule to a new start or finish date.

Parameters
item_idSchedule Id
shift_dateshift date of the Schedule to this value (format yyyymmddhhMMss)
new_finishIs the newDate a new finish date? 1 if it is a new finish date. 0 if it is a new start date.
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 # in this example a new start date (2015-02-02 12:00:00) of the schedule is defined
2 set Status [::TC::SCHMGR::shiftSchedule $ScheduleId "20150202120000" 0]
3 puts "::TC::SCHMGR::shiftSchedule $Status"

◆ updateDependencies()

TC::SCHMGR::updateDependencies   schedule_id predecessor_task_id successor_task_id dependency_type lag_time  

This function calls the TcSoa based function updateDependencies to update a dependency between two Task in Teamcenter.

Parameters
schedule_idSchedule Id
predecessor_task_id
successor_task_id
dependency_typenew task dependency type, with the following possible values:
  • FF: finish->finish
  • FS: finish->start
  • SS: start->start
  • SF: start->finish
lag_timenew lag time for the dependency
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::updateDependencies $ScheduleId $TaskId1st $TaskId2nd $DependencyType 480]
2 puts "::TC::SCHMGR::updateDependencies $Status"

◆ updateSchedule()

TC::SCHMGR::updateSchedule   item_id object_name start_date finish_date args  

This function calls the TcSoa based function updateSchedule to update the corresponding Schedule in Teamcenter.

Remarks
Since the updateSchedule method is not available in Teamcenter 8.3.x the functionality is only supported for Teamcenter Versions 9.1 onwards.
Parameters
item_idSchedule Id
object_nameSchedule name
start_dateStart date of the Schedule (format yyyymmddhhMMss)
finish_dateFinish date of the Schedule (format yyyymmddhhMMss)
argsreserved for future usage
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::updateSchedule $ScheduleId $ScheduleName $StartDate $FinishDate]
2 puts "::TC::SCHMGR::updateSchedule $Status"

◆ updateScheduleTask()

TC::SCHMGR::updateScheduleTask   schedule_id task_id object_name start_date finish_date work_estimate constraint ?status?  

This function calls the TcSoa based function updateScheduleTask to update a given Task in Teamcenter.

Parameters
schedule_id
task_id
object_name
start_dateStart date of the Schedule Task (format yyyymmdd hhmmss)
finish_dateFinish date of the Schedule Task (format yyyymmddhhMMss)
work_estimate
constraintTask Constraint with the following possible values:
  • 0: No constraint
  • 1: As Late As Possible
  • 2: As Soon As Possible
  • 3: fixed
statusTask status
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 set Status [::TC::SCHMGR::updateScheduleTask $ScheduleId $TaskId $TaskName $StartDate $FinishDate 480 $TaskConstraint]
2 puts "::TC::SCHMGR::updateScheduleTask $Status"

◆ updateScheduleTaskExecution()

TC::SCHMGR::updateScheduleTaskExecution   task_id TaskExecUpdateDict  

This function calls the TcSoa based function updateScheduleTaskExecution to update a given Task in Teamcenter.

Parameters
task_id
TaskExecUpdateDictDict containing the following possible keys:
  • work_complete: Work complete time in minutes
  • work_remaining: Work remaining time in minutes
  • percent_complete: Work completed in percent
  • status: Task status string defined in the corresponding Lov definition (OOTB list: "not_started", "in_progress", "needs_attention", "late", "complete", "abandoned" and "aborted")
  • actual_start_date: New actual start date (format yyyymmddhhMMss)
  • actual_finish_date: New actual finish date (format yyyymmddhhMMss) Only those keys are used during the update that are specified all other informations will be untouched, any other key will be ignored.
Returns
OK or list of ERROR with Java stack trace

Sample code sequence

1 dict set TaskExecUpdateDict work_complete "60"; # one hour completed
2 dict set TaskExecUpdateDict work_remaining "600"; # 10 hour still to do
3 dict set TaskExecUpdateDict status "In Work"
4 set Status [::TC::SCHMGR::updateScheduleTaskExecution $TaskId $TaskExecUpdateDict]
5 puts "::TC::SCHMGR::updateScheduleTaskExecution $Status"