T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
T4X::CUSTOM::MAPPING::TOOLBOX Namespace Reference

Functions

 callCustomProc ProductKey DataType TargetTypeName MappingProcName TransactionId args
 Call a custom mapping procedure in the namespace of the TargetTypeName Calls ::${ProductKey}::${DataType}::CUSTOM::MAPPING::[string toupper $TargetTypeName]::$MappingProcName. If the proc or the namespace does not exist, an ERROR is thrown (no exception!). Other error are passed to the caller, all exceptions converted to errors. More...
 
 createTC_Object ItemId ItemName ItemRevisionId ItemType args
 Customer specific function for the creation of a Tc item. More...
 
 createTC_Object2 ItemId ItemName ItemRevisionId ItemType ItemArgs RevArgs args
 Customer specific function for the creation of a Tc item. More...
 
 importNamedReference ItemRevisionTag RelationName DatasetType DatasetName ReferenceName OriginalFileName FileName args
 Customer specific function for the creation of a Tc item. More...
 
 saveItemWithUnlock TcItemTag args
 This function will save a TC item using ITEM_save_item including the corresponding AOM_unlock. More...
 
 selectTC_Object ItemRevisionId args
 Customer specific select function to identify the corresponding target item revision. More...
 
 selectTC_ScheduleObject ObjectType ItemId args
 Customer specific select function to identify the corresponding target ScheduleTargetObject. More...
 

Function Documentation

◆ callCustomProc()

T4X::CUSTOM::MAPPING::TOOLBOX::callCustomProc   ProductKey DataType TargetTypeName MappingProcName TransactionId args  

Call a custom mapping procedure in the namespace of the TargetTypeName Calls ::${ProductKey}::${DataType}::CUSTOM::MAPPING::[string toupper $TargetTypeName]::$MappingProcName. If the proc or the namespace does not exist, an ERROR is thrown (no exception!). Other error are passed to the caller, all exceptions converted to errors.

Parameters
ProductKeyproduct key, e.g. T4EA
DataTypedata type like GENOBJ (for object transfer), GENBOM (for bom transfer), ...
TargetTypeNamethe namespace to use ( converted to uppercase)
MappingProcNamethe name of the mapping procedure without namespace
TransactionIdfor logging only
argsfurther arguments to be passed on to the called procedure
Returns
status of called procedure or ERROR and error message

References T4X::CORE::getSessionLogChannel(), T4X::CORE::storeMessage2(), tpwrite(), and T4X::TRANSLOG::writeCustomMappingLog().

◆ createTC_Object()

T4X::CUSTOM::MAPPING::TOOLBOX::createTC_Object   ItemId ItemName ItemRevisionId ItemType args  

Customer specific function for the creation of a Tc item.

Parameters
ItemId- if the ItemId equals "" the next free id will be created automatically
ItemName
ItemRevisionId
ItemType
args- list of additional attribute name and value pairs like: object_desc "description" object_name "test"
Returns
list of Status and ItemRevisionTag or HexErrorMessage

References createTC_Object2(), T4X::CORE::getLogLineMessageType4rc(), T4X::CORE::getSessionLogChannel(), and tpwrite().

Referenced by T4S::MM::CUSTOM::ITEM::IMPORT::createTC_Object(), and T4X::TEST::WORKFLOW::runTemplateTest().

◆ createTC_Object2()

T4X::CUSTOM::MAPPING::TOOLBOX::createTC_Object2   ItemId ItemName ItemRevisionId ItemType ItemArgs RevArgs args  

Customer specific function for the creation of a Tc item.

Parameters
ItemId- if the ItemId equals "" the next free id will be created automatically
ItemName
ItemRevisionId
ItemType
ItemArgs- list of additional attribute name and value pairs for the Item like: object_desc "description" object_name "test"
RevArgs- list of additional attribute name and value pairs for the Item Revision like: object_desc "description" object_name "test"
Returns
list of Status and ItemRevisionTag or HexErrorMessage

References ITK::AOM_save_with_extensions(), ITK::CONSTANTS_get_type_constant_value(), T4X::CORE::getLogLineMessageType4rc(), T4X::CORE::getSessionLogChannel(), ITK::ITEM_ask_latest_rev(), ITK::TCTYPE_construct_create_input(), ITK::TCTYPE_find_type(), ITK::TCTYPE_simplified_create_object2(), tpco_formatHEX16(), and tpwrite().

Referenced by createTC_Object().

◆ importNamedReference()

T4X::CUSTOM::MAPPING::TOOLBOX::importNamedReference   ItemRevisionTag RelationName DatasetType DatasetName ReferenceName OriginalFileName FileName args  

Customer specific function for the creation of a Tc item.

Parameters
ItemRevisionTag
RelationName- relation between item revision and dataset
DatasetType
DatasetName
ReferenceName
OriginalFileName- only file name with extension
FileName- file name with extension and path
Returns
Status OK / ERROR

References ITK::AOM_refresh_lock(), ITK::AOM_refresh_unlock(), ITK::AOM_save(), ITK::DATASET_importNamedReference(), T4X::CORE::getLogLineMessageType4rc(), T4X::CORE::getSessionLogChannel(), ITK::GRM_create_relation_only_by_name(), ITK::GRM_list_secondary_objects_only_by_name(), ITK::TCTYPE_simplified_create_object2(), and tpwrite().

◆ saveItemWithUnlock()

T4X::CUSTOM::MAPPING::TOOLBOX::saveItemWithUnlock   TcItemTag args  

This function will save a TC item using ITEM_save_item including the corresponding AOM_unlock.

Parameters
TcItemTagTeamcenter item tag in the Tcl string format
Returns
OK or Error with message as TCL list

References ITK::AOM_unlock(), T4X::CORE::getLogLineMessageType4rc(), T4X::CORE::getSessionLogChannel(), ITK::ITEM_save_item(), tpco_formatHEX16(), and tpwrite().

Referenced by T4S::MM::CUSTOM::ITEM::IMPORT::updateTC_Object().

◆ selectTC_Object()

T4X::CUSTOM::MAPPING::TOOLBOX::selectTC_Object   ItemRevisionId args  

Customer specific select function to identify the corresponding target item revision.

Parameters
ItemRevisionId- LATEST-get the latest working / ITEM-get itemTag not itemRevTag / <revisionId>-get the specified itemRevTag
args- list of additional attribute name and value pairs like: item_id "122" object_name "test"
Returns
list of Status and ItemRevisionTag or HexErrorMessage

References T4X::CORE::getLogLineMessageType4rc(), T4X::CORE::getSessionLogChannel(), ITK::ITEM_ask_latest_rev(), ITK::ITEM_find_items_by_key_attributes(), and tpwrite().

◆ selectTC_ScheduleObject()

T4X::CUSTOM::MAPPING::TOOLBOX::selectTC_ScheduleObject   ObjectType ItemId args  

Customer specific select function to identify the corresponding target ScheduleTargetObject.

Parameters
ObjectType
ItemId
Returns
list of Status and ObjectTag or HexErrorMessage

References T4X::CORE::getSessionLogChannel(), ITK::POM_create_enquiry_on_string_by_name(), ITK::POM_delete_enquiries_via_list(), ITK::POM_execute_enquiry(), and tpwrite().