T4S4  19.1 C8540 A23673
Teamcenter Gateway for SAP S/4HANA API Reference
T4X::TC::MAPPING Namespace Reference

Functions

 addReverseMappingTableObjectRow Relation TableProperty ObjectTag
 This will create the internal mapping buffer for a table row that should be used to update the row attributes and is also defines the order of the table rows and links it to already existing rows. More...
 
 createReverseMappingTableObject Relation TableProperty TableType
 This will create the internal mapping buffer for a table row that should be used to update the row attributes and is also defines the order of the table rows and links it to already existing rows. More...
 
 decodeTcDataString EncodedString
 This function decodes a given TcData array string attribute into a TclString value in the internal Tcl Unicode format. More...
 
 FieldMapping FormName FieldName ?UseBinaryFormat? ?TrimValue? args
 Returns the value of specified attribute in the specified format. More...
 
 findIndexedObjectId4Value Index FormName FieldName Value ?CaseSensitive? args
 Returns a list of attached objects for a given attribute value and BOM line index from the internal Teamcenter data buffer. More...
 
 findIndexedObjectList4Attribute Index FormName FieldName args
 Returns a list of attached objects for a given BOM line index from the internal Teamcenter data buffer. More...
 
 findObjectId4Value FormName FieldName Value ?CaseSensitive? args
 Returns first attached object for a given attribute value from the internal Teamcenter data buffer. More...
 
 findObjectList FormName FieldName ?CaseSensitive? args
 Returns a list of attached objects for the given object from the internal Teamcenter data buffer. More...
 
 findObjectList4Value FormName FieldName Value ?CaseSensitive? args
 Returns a list of attached objects for a given attribute value from the internal Teamcenter data buffer. More...
 
 findRootTaskObjectList FormName FieldName args
 Returns the ids of specified attached root task object attribute. More...
 
 findRootTaskObjectList2 FormName FieldName
 Returns the ids of specified attached root task object attribute. More...
 
 getFormNames4Object Tag
 Returns a list of relation names for the given object from the internal Teamcenter data buffer. More...
 
 getLogChannelBasedOnTransactionId LogChannelId
 Validated if the provided log-channel is a supported by the defined log-channel structure. If not the default log-channel is returned. More...
 
 getObjectAttributeValue Tag RelationName FieldName ?UseBinaryFormat? args
 Returns the value of specified attribute for the given ItemInfo in the specified format. More...
 
 getObjectsValueList FormName FieldName ?UseBinaryFormat? ?TrimValue?
 Returns a value list of all objects that have the same relation name string with the same attribute. More...
 
 getPreferenceValue PreferenceScope PreferenceType PreferenceName
 This function will return the value of a specified preference name. More...
 
 getQueryArgumentValue ArgumentName args
 Returns the query argument value defined by the user. More...
 
 getRootTaskFieldMappingValueList FormName FieldName ?UseBinaryFormat? args
 Returns the values of specified attached root task object attribute. More...
 
 getTeamcenterEncodingName args
 returns the detected Tcl encoding name based on the input of the variables ::TcData(SystemEncodingAliasList), ::TcData(TC_CHARACTER_ENCODING_SET) or the defined ::T4X::TC::MAPPING::CtrlInfo(useTcCodePage) value More...
 
 getWorkflowArgumentValue2 ArgumentName ?CaseSensitive?
 Returns the work-flow argument value. More...
 
 getWorkflowArgumentValue3 ArgumentName ?DefaultValue? ?CaseSensitive?
 Returns the workflow argument value including the possibility to define a default value if the argument is not found. More...
 
 IndexedFieldMapping Index FormName FieldName ?UseBinaryFormat? ?TrimValue? args
 Returns the value of specified BOM line attribute in the specified format. More...
 
 printIndexTcData ?TransactionId? args
 Prints the content of the internal tcl buffer received BOM data from the tcserver process. More...
 
 printTcBomLineData ?TransactionId? ?Level? ?PositionInfoPrefix? args
 Prints the content of the internal Tcl buffer received BOM data from the tcserver process. More...
 
 printTcData ?TransactionId? args
 Prints the content of the internal tcl buffer received from the tcserver process. More...
 
 printTcRootTaskData ?TransactionId?
 Prints the content of the internal tcl buffer received from the tcserver process. More...
 
 RootTaskFieldMapping FormName FieldName ?UseBinaryFormat? ?TrimValue? args
 Returns the value of specified attribute for the work-flow root task object in the specified format. More...
 
 save_unlockTcObject LockedObject args
 function to save and unlock a given Teamcenter Workspace object More...
 
 searchIndexedObjectList Index FormNamePattern
 Returns a list of objects matching the given pattern from the internal Teamcenter data buffer. More...
 
 searchObjectList FormNamePattern
 Returns a list of objects matching the given pattern from the internal Teamcenter data buffer. More...
 
 searchRootTaskObjectList FormNamePattern
 Returns a list of objects matching the given pattern from the internal Teamcenter data buffer of the additional objects specified by the -addObject4Mapping handler argument. More...
 
 storeReverseMapping2TcObject2 ObjectTag4Update
 Function updates the Teamcenter database based on the stored information of the reverse mapping. More...
 
 storeReverseMapping2TcObject3 ObjectTag4Update TransactionId EaNameSpace EAObjectTypeName
 Function updates the Teamcenter database based on the stored information of the reverse mapping and the defined preference definition for the reverse mapping (is using the same functionality like the work-flow based transfer). More...
 
 storeReverseMappingAttribute ObjectType Relation Attribute AttributeValue args
 Store the reverse mapping information into the internal status info buffer array for later Teamcenter database update. More...
 
 storeReverseMappingAttribute2 Relation Attribute AttributeValue
 Store the reverse mapping information into the internal status info buffer array for later Teamcenter database update. More...
 
 storeReverseMappingObjectAttribute ObjectTag ObjectType Attribute AttributeValue
 Store the reverse mapping information into the internal status info buffer array for later Teamcenter database update. More...
 
 storeReverseMappingTableRowObjectAttribute Relation TableProperty RowIndex Attribute AttributeValue
 This will store the row attribute value to the internal buffer. More...
 
 testFieldExists FormName FieldName args
 Tests the existence of specified attribute for the object. More...
 
 testIndexedFieldExists Index FormName FieldName args
 Tests the existence of specified attribute for the object. More...
 
 testRootTaskFieldExists FormName FieldName args
 Tests the existence of specified attribute for the work-flow root task object. More...
 
 translateTcEncoding2TclEncodingName TcEncodingName
 Translate the provided Tc character encoding code page name to the corresponding Tcl character encoding name. More...
 
 translateValue2Boolean Value
 Translate the provided Tc character string to the corresponding Tcl boolean value true or false. The input can be yes,no, true, false, t, f or 1, 0. More...
 

Variables

 CtrlInfo
 Namespace array buffer to define defaults used in the context of the mapping functions.

CtrlInfo(useTcCodePage) Overwrites the Teamcenter system encoding detected by the T4x environment (default: FALSE) More...
 

Detailed Description

Function Documentation

◆ addReverseMappingTableObjectRow()

T4X::TC::MAPPING::addReverseMappingTableObjectRow   Relation TableProperty ObjectTag  

This will create the internal mapping buffer for a table row that should be used to update the row attributes and is also defines the order of the table rows and links it to already existing rows.

Parameters
Relationrelation string to the attribute e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
TablePropertyattribute name in the data-model
ObjectTagthis could be an already existing TableRow object tag or NULLTAG for a new Row
Returns
RowIndex for further Row related Calls

Sample code sequence for storing the table row properties (update an existing one and add a new one)

1 # table type as defined in the data model
2 set TableType CustomTableType
3 set TableProperty CustomTableProperty
4 #
5 # create internal mapping buffer to store the table row properties
6 #
7 ::T4X::TC::MAPPING::createReverseMappingTableObject $Relation $TableProperty $TableType
8 #
9 # add an existing row to the buffer
10 #
11 set TableRow [::T4X::TC::MAPPING::addReverseMappingTableObjectRow $Relation $TableProperty $RowTag1]
12 #
13 # update only those row propties of a given specific table row that needs to be updated
14 #
15 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2PlantId 9905
16 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPType ND
17 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPGroup 011
18 #
19 # add an 2nd new row to the buffer, in this case a non-existing one
20 #
21 set TableRow [::T4X::TC::MAPPING::addReverseMappingTableObjectRow $Relation $TableProperty NULLTAG]
22 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2PlantId 9901
23 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPType ND
24 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPGroup 012

◆ createReverseMappingTableObject()

T4X::TC::MAPPING::createReverseMappingTableObject   Relation TableProperty TableType  

This will create the internal mapping buffer for a table row that should be used to update the row attributes and is also defines the order of the table rows and links it to already existing rows.

Remarks
If all existing rable rows are deleted there might be a refresh issue in the RAC.
Parameters
Relationrelation string to the table property e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
TablePropertyproperty name in the data-model
TableTypetable row type name in the data-model
Returns
OK

Sample code sequence for storing the table row properties

1 # table type as defined in the data model
2 set TableType CustomTableType
3 set TableProperty CustomTableProperty
4 #
5 # create internal mapping buffer to store the table row properties
6 #
7 ::T4X::TC::MAPPING::createReverseMappingTableObject $Relation $TableProperty $TableType
8 #
9 # add a new row to the buffer, in this case a non-existing one
10 #
11 set TableRow [::T4X::TC::MAPPING::addReverseMappingTableObjectRow $Relation $TableProperty NULLTAG]
12 #
13 # set the row propties of a specific table row
14 #
15 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2PlantId 9905
16 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPType ND
17 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPGroup 011
18 #
19 # add an 2nd new row to the buffer, in this case a non-existing one
20 #
21 set TableRow [::T4X::TC::MAPPING::addReverseMappingTableObjectRow $Relation $TableProperty NULLTAG]
22 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2PlantId 9901
23 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPType ND
24 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPGroup 012

Sample code sequence for deleting the complete table property content

1 # table type as defined in the data model
2 set TableType CustomTableType
3 set TableProperty CustomTableProperty
4 #
5 # create internal mapping buffer to store the table row properties
6 #
7 ::T4X::TC::MAPPING::createReverseMappingTableObject $Relation $TableProperty $TableType
8 #
9 # after the internal Tc update functionality was executed the table property would be empty (has no table rows;)
10 #

◆ decodeTcDataString()

T4X::TC::MAPPING::decodeTcDataString   EncodedString  

This function decodes a given TcData array string attribute into a TclString value in the internal Tcl Unicode format.

The decode uses the detected Teamcenter EncodingName.

Parameters
EncodedStringTeamcenter encoded string value stored in ::TcData array (like ::TcData(PersonName))
Returns
TclString in the internal Tcl Unicode format

Sample code sequence

1 set PersonName [::T4X::TC::MAPPING::decodeTcDataString $::TcData(PersonName)]

◆ FieldMapping()

T4X::TC::MAPPING::FieldMapping   FormName FieldName ?UseBinaryFormat? ?TrimValue? args  

Returns the value of specified attribute in the specified format.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
FieldNameobject attribute name
UseBinaryFormatflag defines if the value is returned in hex format or not default FALSE.
TrimValueflag defines if the attribute value string is trimmed. default TRUE.
argsadditional arguments, currently unused.
Returns
Attribute value string or empty string

◆ findIndexedObjectId4Value()

T4X::TC::MAPPING::findIndexedObjectId4Value   Index FormName FieldName Value ?CaseSensitive? args  

Returns a list of attached objects for a given attribute value and BOM line index from the internal Teamcenter data buffer.

Parameters
Index
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
Valueobject attribute value to look for
CaseSensitiveflag defines if the attribute value is checked case sensitive, default TRUE.
argsadditional arguments, currently unused.
Returns
List of OK and found objects or ERROR

◆ findIndexedObjectList4Attribute()

T4X::TC::MAPPING::findIndexedObjectList4Attribute   Index FormName FieldName args  

Returns a list of attached objects for a given BOM line index from the internal Teamcenter data buffer.

Parameters
Index
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
List of OK and found objects internal ids or ERROR

◆ findObjectId4Value()

T4X::TC::MAPPING::findObjectId4Value   FormName FieldName Value ?CaseSensitive? args  

Returns first attached object for a given attribute value from the internal Teamcenter data buffer.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
Valueobject attribute value to look for
CaseSensitiveflag defines if the attribute value is checked case sensitive, default TRUE.
argsadditional arguments, currently unused.
Returns
List of OK and found object or ERROR

◆ findObjectList()

T4X::TC::MAPPING::findObjectList   FormName FieldName ?CaseSensitive? args  

Returns a list of attached objects for the given object from the internal Teamcenter data buffer.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
CaseSensitiveflag defines if the attribute value is checked case sensitive, default TRUE.
argsadditional arguments, currently unused.
Returns
List of OK and found objects internal ids or ERROR

◆ findObjectList4Value()

T4X::TC::MAPPING::findObjectList4Value   FormName FieldName Value ?CaseSensitive? args  

Returns a list of attached objects for a given attribute value from the internal Teamcenter data buffer.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
Valueobject attribute value to look for
CaseSensitiveflag defines if the attribute value is checked case sensitive, default TRUE.
argsadditional arguments, currently unused.
Returns
List of OK and found objects or ERROR

◆ findRootTaskObjectList()

T4X::TC::MAPPING::findRootTaskObjectList   FormName FieldName args  

Returns the ids of specified attached root task object attribute.

Deprecated:
Please use T4X::TC::MAPPING::findRootTaskObjectList2.
Parameters
FormNamerelation name string to the objects e.g. RootTask:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like RootTask:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
List of OK and found objects internal ids or ERROR

◆ findRootTaskObjectList2()

T4X::TC::MAPPING::findRootTaskObjectList2   FormName FieldName  

Returns the ids of specified attached root task object attribute.

Parameters
FormNamerelation name string to the objects e.g. RootTask:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end and/or the beginning, like RootTask:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:* or *:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:* or *:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:Item Master
FieldNameobject attribute name
Returns
List of OK and found objects internal ids or ERROR

◆ getFormNames4Object()

T4X::TC::MAPPING::getFormNames4Object   Tag  

Returns a list of relation names for the given object from the internal Teamcenter data buffer.

Parameters
TagThis is the object tag used to access the extracted data in the TcData buffer, if the tag is not found in the buffer the function will return an error.
Returns
List of OK and form names or ERROR

◆ getLogChannelBasedOnTransactionId()

T4X::TC::MAPPING::getLogChannelBasedOnTransactionId   LogChannelId  

Validated if the provided log-channel is a supported by the defined log-channel structure. If not the default log-channel is returned.

Parameters
LogChannelIddefines the log-channel that should be used to print the TcData buffer.
Returns
LogChannel valid log-channel name after validation of the provided LogChannelId

◆ getObjectAttributeValue()

T4X::TC::MAPPING::getObjectAttributeValue   Tag RelationName FieldName ?UseBinaryFormat? args  

Returns the value of specified attribute for the given ItemInfo in the specified format.

Parameters
TagThis is the object tag used to access the extracted data in the TcData buffer, if the tag is not found in the buffer the function will return an error.
RelationNameNavigation information string to the objects from the source object e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master This parameter is just used for the debug output of this function, it has no impact on the data retrieval.
FieldNameobject attribute name
UseBinaryFormatflag defines if the value is returned in hex format or not default FALSE.
argsadditional arguments, currently unused.
Returns
List of OK and attribute value or ERROR

◆ getObjectsValueList()

T4X::TC::MAPPING::getObjectsValueList   FormName FieldName ?UseBinaryFormat? ?TrimValue?  

Returns a value list of all objects that have the same relation name string with the same attribute.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
UseBinaryFormatflag defines if the value is returned in hex format or not default FALSE.
TrimValueflag defines if the attribute value string is trimmed. default TRUE.
Returns
dict with two elements Status and ValueList
  • Status OK or NOT_FOUND
  • ValueList found values as a list of each found attribute value

Sample code sequence

1 set ValueListInfo [::T4X::TC::MAPPING::getObjectsValueList "MSWord:IMAN_specification:Item" item_id]
2 if {[dict get $ValueListInfo Status] eq "OK"} {
3  set ValueList [dict get $ValueListInfo ValueList]
4 } elseif {[dict get $ValueListInfo Status] eq "NOT_FOUND"} {
5  # not found
6 }

◆ getPreferenceValue()

T4X::TC::MAPPING::getPreferenceValue   PreferenceScope PreferenceType PreferenceName  

This function will return the value of a specified preference name.

Parameters
PreferenceScopeSupported PreferenceScopes are:
  • all
  • user
  • role
  • group
  • site
  • system
PreferenceTypeSupported PreferenceTypes are:
  • string
  • logical
  • integer
  • double
PreferenceNameobject attribute name
Returns
List of ITK status and list of preference value(s) if found or ERROR

◆ getQueryArgumentValue()

T4X::TC::MAPPING::getQueryArgumentValue   ArgumentName args  

Returns the query argument value defined by the user.

Parameters
ArgumentNamequery argument name
argsadditional arguments
Returns
List of OK and found argument value or ERROR

Sample code sequence

1 set MyArgValueList [::T4X::TC::MAPPING::getQueryArgumentValue "MyArg"]
2 if {[lindex $MyArgValueList 0] eq "OK"} {
3  set MyArgValue [lindex $MyArgValueList 1]
4  # found
5 } else {
6  # not found or is empty
7 }

◆ getRootTaskFieldMappingValueList()

T4X::TC::MAPPING::getRootTaskFieldMappingValueList   FormName FieldName ?UseBinaryFormat? args  

Returns the values of specified attached root task object attribute.

Parameters
FormNamerelation name string to the objects e.g. RootTask:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:Item Master It is also possible to specify a wild-card at the end, like RootTask:EPM_target_attachment:ItemRevision:items_tag:Item:IMAN_master_form:*
FieldNameobject attribute name
UseBinaryFormatflag defines if the value is returned in hex format or not default FALSE.
argsadditional arguments, currently unused.
Returns
List of found attribute value strings or empty list

◆ getTeamcenterEncodingName()

T4X::TC::MAPPING::getTeamcenterEncodingName   args  

returns the detected Tcl encoding name based on the input of the variables ::TcData(SystemEncodingAliasList), ::TcData(TC_CHARACTER_ENCODING_SET) or the defined ::T4X::TC::MAPPING::CtrlInfo(useTcCodePage) value

Parameters
argsnot used
Returns
TclEncodingName - Corresponding name of the provided Tcl encoding package (see t4s/lib/tcl8.5/encoding/). Result the input ISO8859_1 is iso8859-1.

◆ getWorkflowArgumentValue2()

T4X::TC::MAPPING::getWorkflowArgumentValue2   ArgumentName ?CaseSensitive?  

Returns the work-flow argument value.

Parameters
ArgumentNamework-flow argument name
CaseSensitive"" (default) | UPPERCASE | LOWERCASE (default) argument and value are checked and returned case sensitive use UPPERCASE letters for the check and for the returned information use LOWERCASE letters for the check and for the returned information
Returns
dict structure with the following elements:
  • Status OK|NOT_FOUND
  • ArgumentName specified work-flow argument name
  • ArgumentValue specified work-flow argument value

Sample code sequence

1 set MyArgValueInfo [::T4X::TC::MAPPING::getWorkflowArgumentValue2 "-MyArg"]
2 if {[dict get $MyArgValueInfo Status] eq "OK"} {
3  # found
4  set MyArgValue [dict get $MyArgValueInfo ArgumentValue]
5  if {[string length $MyArgValue] == 0} {
6  # found, but the value is empty
7  } else {
8  # found
9  }
10 } else {
11  # not found
12 }

◆ getWorkflowArgumentValue3()

T4X::TC::MAPPING::getWorkflowArgumentValue3   ArgumentName ?DefaultValue? ?CaseSensitive?  

Returns the workflow argument value including the possibility to define a default value if the argument is not found.

Parameters
ArgumentNamework-flow argument name
DefaultValueif provided, this value will be returned, if the argument with the given name does not exist.
CaseSensitive"" (default) | UPPERCASE | LOWERCASE (default) argument and value are checked and returned case sensitive use UPPERCASE letters for the check and for the returned information use LOWERCASE letters for the check and for the returned information
Returns
dict structure with the following elements:
  • Status OK|NOT_FOUND
  • ArgumentName specified work-flow argument name
  • ArgumentValue specified work-flow argument value

Sample code sequence

1 set MyArgValueInfo [::T4X::TC::MAPPING::getWorkflowArgumentValue3 "-MyArg" "MyDefault"]
2 if {[dict get $MyArgValueInfo Status] eq "OK"} {
3  # found
4  set MyArgValue [dict get $MyArgValueInfo ArgumentValue]
5  if {[string length $MyArgValue] == 0} {
6  # found, but the value is empty
7  } else {
8  # found
9  }
10 } else {
11  # not found
12  set MyArgValue [dict get $MyArgValueInfo ArgumentValue]
13  if {[string length $MyArgValue] == 0} {
14  # not found
15  } else {
16  # not found using the specified default value
17  }
18 }

◆ IndexedFieldMapping()

T4X::TC::MAPPING::IndexedFieldMapping   Index FormName FieldName ?UseBinaryFormat? ?TrimValue? args  

Returns the value of specified BOM line attribute in the specified format.

Parameters
Index
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
FieldNameobject attribute name
UseBinaryFormatflag defines if the value is returned in hex format or not default FALSE.
TrimValueflag defines if the attribute value string is trimmed. default TRUE.
argsadditional arguments, currently unused.
Returns
Attribute value string or empty string

◆ printIndexTcData()

T4X::TC::MAPPING::printIndexTcData   ?TransactionId? args  

Prints the content of the internal tcl buffer received BOM data from the tcserver process.

Parameters
TransactionId(optional) transaction log-channel (default TEST_MAPPING)
argsadditional arguments, currently unused.
Returns
0

◆ printTcBomLineData()

T4X::TC::MAPPING::printTcBomLineData   ?TransactionId? ?Level? ?PositionInfoPrefix? args  

Prints the content of the internal Tcl buffer received BOM data from the tcserver process.

Parameters
TransactionIdtransaction log-channel (default TEST_MAPPING)
Level
PositionInfoPrefix
argsadditional arguments, currently unused.
Returns
0

◆ printTcData()

T4X::TC::MAPPING::printTcData   ?TransactionId? args  

Prints the content of the internal tcl buffer received from the tcserver process.

Parameters
TransactionId(optional) transaction log-channel

if not given the default value is set to TEST_MAPPING

Parameters
argsadditional arguments, currently unused.
Returns
0

◆ printTcRootTaskData()

T4X::TC::MAPPING::printTcRootTaskData   ?TransactionId?  

Prints the content of the internal tcl buffer received from the tcserver process.

Parameters
TransactionId(optional) transaction log-channel

if not given the default value is set to TEST_MAPPING

Returns
0

◆ RootTaskFieldMapping()

T4X::TC::MAPPING::RootTaskFieldMapping   FormName FieldName ?UseBinaryFormat? ?TrimValue? args  

Returns the value of specified attribute for the work-flow root task object in the specified format.

Parameters
FormNamerelation name string to the objects e.g. RootTask:EPM_reference_attachment:TransferStatusInfo
FieldNameobject attribute name
UseBinaryFormatflag defines if the value is returned in hex format or not default FALSE.
TrimValueflag defines if the attribute value string is trimmed. default TRUE.
argsadditional arguments, currently unused.
Returns
Attribute value string or empty string

◆ save_unlockTcObject()

T4X::TC::MAPPING::save_unlockTcObject   LockedObject args  

function to save and unlock a given Teamcenter Workspace object

Parameters
LockedObjectobject of the start for the search
argsadditional arguments
Returns
Status of the unlock and save of the specified object

◆ searchIndexedObjectList()

T4X::TC::MAPPING::searchIndexedObjectList   Index FormNamePattern  

Returns a list of objects matching the given pattern from the internal Teamcenter data buffer.

Parameters
FormNamePatternpattern (ala string match) to match with the relation name string
Returns
{OK {FormName Tag} {FormName Tag} ... } or ERROR

◆ searchObjectList()

T4X::TC::MAPPING::searchObjectList   FormNamePattern  

Returns a list of objects matching the given pattern from the internal Teamcenter data buffer.

Parameters
FormNamePatternpattern (ala string match) to match with the relation name string
Returns
{OK {FormName Tag} {FormName Tag} ... } or ERROR

◆ searchRootTaskObjectList()

T4X::TC::MAPPING::searchRootTaskObjectList   FormNamePattern  

Returns a list of objects matching the given pattern from the internal Teamcenter data buffer of the additional objects specified by the -addObject4Mapping handler argument.

Parameters
FormNamePatternpattern (ala string match) to match with the relation name string
Returns
{OK {FormName Tag} {FormName Tag} ... } or ERROR

◆ storeReverseMapping2TcObject2()

T4X::TC::MAPPING::storeReverseMapping2TcObject2   ObjectTag4Update  

Function updates the Teamcenter database based on the stored information of the reverse mapping.

This function replaces the old storeReverseMapping2TcObject function. Remark: In the moment no Teamcenter Objects are created.

Parameters
ObjectTag4UpdateObject tag of the Teamcenter object in the Tcl string format.
Returns
Status OK or ERROR and error message as a list

◆ storeReverseMapping2TcObject3()

T4X::TC::MAPPING::storeReverseMapping2TcObject3   ObjectTag4Update TransactionId EaNameSpace EAObjectTypeName  

Function updates the Teamcenter database based on the stored information of the reverse mapping and the defined preference definition for the reverse mapping (is using the same functionality like the work-flow based transfer).

Parameters
ObjectTag4UpdateObject tag of the Teamcenter object in the Tcl string format.
TransactionIdTransaction log-file name
EaNameSpace
EAObjectTypeNameReverseMapping Preference Prefix
Returns
Status OK or ERROR and error message as a list

◆ storeReverseMappingAttribute()

T4X::TC::MAPPING::storeReverseMappingAttribute   ObjectType Relation Attribute AttributeValue args  

Store the reverse mapping information into the internal status info buffer array for later Teamcenter database update.

Parameters
ObjectTypenot used any more
Relationrelation string to the attribute e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
Attributeattribute name in the data-model
AttributeValuenew value of the attribute
argsadditional arguments
Returns
OK

◆ storeReverseMappingAttribute2()

T4X::TC::MAPPING::storeReverseMappingAttribute2   Relation Attribute AttributeValue  

Store the reverse mapping information into the internal status info buffer array for later Teamcenter database update.

Parameters
Relationrelation string to the attribute e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
Attributeattribute name in the data-model
AttributeValuenew value of the attribute
Returns
OK

◆ storeReverseMappingObjectAttribute()

T4X::TC::MAPPING::storeReverseMappingObjectAttribute   ObjectTag ObjectType Attribute AttributeValue  

Store the reverse mapping information into the internal status info buffer array for later Teamcenter database update.

Precondition
The reverse mapping preference (<T4x>_<TargetObjectType>Mapping2<WorkspaceObject>) is not defined.
The mapping target object already exists.
Warning
Be aware that if the reverse mapping preference is defined, all information that is stored using this function is ignored.
Parameters
ObjectTagTeamcenter object tag string in a corresponding Tcl representation
ObjectTypeTeamcenter object type (internal name defined in the BMIDE) e.g. Item Master
Attributeattribute name in the data-model (internal name defined in the BMIDE)
AttributeValuenew value of the attribute
Returns
OK

Sample code sequence

1 # reverse map to ItemRevisionMaster Form
2 ::T4X::TC::MAPPING::storeReverseMappingObjectAttribute $FormTag "ItemRevision Master" "user_data_1" "value 1"
3 ::T4X::TC::MAPPING::storeReverseMappingObjectAttribute $FormTag "ItemRevision Master" "user_data_2" "value 2"

◆ storeReverseMappingTableRowObjectAttribute()

T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute   Relation TableProperty RowIndex Attribute AttributeValue  

This will store the row attribute value to the internal buffer.

Parameters
Relationrelation string to the attribute e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
TablePropertyName of the table property in the specified Tc object
RowIndexused to define the Attribute row index for the value
Attributeattribute name in the data-model
AttributeValuenew value of the attribute
Returns
OK

Sample code sequence for appending a new row to an existing table property content

1 # table type as defined in the data model
2 set TableType CustomTableType
3 set TableProperty CustomTableProperty
4 #
5 # create internal mapping buffer to store the table row properties
6 #
7 ::T4X::TC::MAPPING::createReverseMappingTableObject $Relation $TableProperty $TableType
8 #
9 # copy the existing table rows to mapping buffer without changing the row properties
10 #
11 set NumberOfTableRows [::T4X::TC::MAPPING::FieldMapping $Relation "$TableProperty:NumberOfRows"]
12 for {set i 0} {$i < $NumberOfTableRows} {incr i} {
13  set RowTag1 [::T4X::TC::MAPPING::FieldMapping $Relation "$TableProperty:$i:object_tag"]
14  set TableRow [::T4X::TC::MAPPING::addReverseMappingTableObjectRow $Relation $TableProperty $RowTag1]
15 }
16 #
17 # add an 2nd new row to the buffer, in this case a non-existing one
18 #
19 set TableRow [::T4X::TC::MAPPING::addReverseMappingTableObjectRow $Relation $TableProperty NULLTAG]
20 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2PlantId 9901
21 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPType ND
22 ::T4X::TC::MAPPING::storeReverseMappingTableRowObjectAttribute $Relation $TableProperty $TableRow sap2MRPGroup 012

◆ testFieldExists()

T4X::TC::MAPPING::testFieldExists   FormName FieldName args  

Tests the existence of specified attribute for the object.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
OK or ERROR

◆ testIndexedFieldExists()

T4X::TC::MAPPING::testIndexedFieldExists   Index FormName FieldName args  

Tests the existence of specified attribute for the object.

Parameters
Index
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
OK or ERROR

◆ testRootTaskFieldExists()

T4X::TC::MAPPING::testRootTaskFieldExists   FormName FieldName args  

Tests the existence of specified attribute for the work-flow root task object.

Parameters
FormNamerelation name string to the objects e.g. ItemRevision:items_tag:Item:IMAN_master_form:Item Master
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
OK or ERROR

◆ translateTcEncoding2TclEncodingName()

T4X::TC::MAPPING::translateTcEncoding2TclEncodingName   TcEncodingName  

Translate the provided Tc character encoding code page name to the corresponding Tcl character encoding name.

Parameters
TcEncodingNameName of the used code page in the Teamcenter server (e.g. ISO8859_1)
Returns
TclEncodingName Corresponding name of the provided Tcl encoding package (see t4s/lib/tcl8.5/encoding/). Result the input ISO8859_1 is iso8859-1.

◆ translateValue2Boolean()

T4X::TC::MAPPING::translateValue2Boolean   Value  

Translate the provided Tc character string to the corresponding Tcl boolean value true or false. The input can be yes,no, true, false, t, f or 1, 0.

Parameters
ValueString that should be translated to boolean.
Returns
TclBooleanValue - true or false

Variable Documentation

◆ CtrlInfo

CtrlInfo
static

Namespace array buffer to define defaults used in the context of the mapping functions.

CtrlInfo(useTcCodePage) Overwrites the Teamcenter system encoding detected by the T4x environment (default: FALSE)