T4S4  18.1 C7177 A20283
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...
 
 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...
 
 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...
 
 getWorkflowArgumentValue ArgumentName args
 Returns the work-flow argument value. More...
 
 getWorkflowArgumentValue2 ArgumentName ?CaseSensitive?
 Returns the work-flow argument value. This is a case sensitive version of the old T4X::TC::MAPPING::getWorkflowArgumentValue version. More...
 
 getWorkflowArgumentValue3 ArgumentName ?DefaultValue? ?CaseSensitive?
 Returns the workflow argument value. This is a casesensitive version of the old T4X::TC::MAPPING::getWorkflowArgumentValue version. 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...
 
 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
 

Detailed Description

Project: T4X/T4S/T4O/T4EA

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 #

◆ FieldMapping()

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

◆ 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
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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
List of OK and found objects internal ids or ERROR

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), and tpwrite().

◆ 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
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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), and tpwrite().

◆ 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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ findRootTaskObjectList()

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

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
FieldNameobject attribute name
argsadditional arguments, currently unused.
Returns
List of OK and found objects internal ids or ERROR

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), and tpwrite().

◆ 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

References T4X::CORE::getSessionLogChannel().

Referenced by printIndexTcData(), printTcBomLineData(), printTcData(), and printTcRootTaskData().

◆ 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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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
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 }

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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 }

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

Referenced by T4S::QUERY::CUSTOM::MAPPING::executeQuery4MaterialMaster().

◆ 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. 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.
argsadditional arguments, currently unused.
Returns
List of found attribute value strings or empty list

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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
args- not 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.

References translateTcEncoding2TclEncodingName().

◆ getWorkflowArgumentValue()

T4X::TC::MAPPING::getWorkflowArgumentValue   ArgumentName args  

Returns the work-flow argument value.

Deprecated:
The function is deprecated, please use T4X::TC::MAPPING::getWorkflowArgumentValue2
Parameters
ArgumentNamework-flow argument name
argsadditional arguments, currently unused.
Returns
"" or the value of the work-flow argument

Sample code sequence

1 set MyArgValue [::T4X::TC::MAPPING::getWorkflowArgumentValue "-MyArg"]
2 if {[string length $MyArgValue] == 0} {
3  # not found or is empty
4 } else {
5  # found
6 }

References T4X::CORE::getSessionLogChannel(), getWorkflowArgumentValue2(), and tpwrite().

◆ getWorkflowArgumentValue2()

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

Returns the work-flow argument value. This is a case sensitive version of the old T4X::TC::MAPPING::getWorkflowArgumentValue version.

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 }

References T4X::CORE::getSessionLogChannel(), getWorkflowArgumentValue3(), and tpwrite().

Referenced by getWorkflowArgumentValue().

◆ getWorkflowArgumentValue3()

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

Returns the workflow argument value. This is a casesensitive version of the old T4X::TC::MAPPING::getWorkflowArgumentValue version.

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 }

References T4X::CORE::getSessionLogChannel(), tpco_formatHEX16(), and tpwrite().

Referenced by T4S::CONNECTION2SAP::checkConnection2SAP4Session(), and getWorkflowArgumentValue2().

◆ 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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

Referenced by T4S::PROP::CUSTOM::MAPPING::GetSAPData_BillOfMaterial(), T4S::BOM::CUSTOM::MAPPING::SAP_BillOfMaterial2TC_Object(), T4S::BOM::CUSTOM::MAPPING::TC_Object2SAP_BillOfMaterial(), and T4S::BOM::CUSTOM::MAPPING::TC_Object2SAP_BillOfMaterialPosition().

◆ 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

References getLogChannelBasedOnTransactionId(), printTcBomLineData(), tpco_tcdgetall(), and tpwrite().

◆ 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

References getLogChannelBasedOnTransactionId(), printTcBomLineData(), tpco_tcdgetall(), and tpwrite().

Referenced by printIndexTcData(), and printTcBomLineData().

◆ 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
argsadditional arguments, currently unused.
Returns
0

References getLogChannelBasedOnTransactionId(), printTcRootTaskData(), tpco_tcdgetall(), tpco_tcdtagexists(), and tpwrite().

◆ 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

References getLogChannelBasedOnTransactionId(), tpco_tcdgetall(), and tpwrite().

Referenced by printTcData().

◆ 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

References T4X::CORE::getSessionLogChannel(), tpco_tcdexists(), tpco_tcdget(), and tpwrite().

◆ 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

References ITK::AOM_save(), ITK::AOM_unlock(), T4X::CORE::getSessionLogChannel(), and tpwrite().

◆ 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

References T4X::CORE::getTransactionLogChannel(), ITK::OBJECT_processReverseMappingData(), and tpco_formatHEX16().

◆ 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

References ITK::OBJECT_processReverseMappingData(), and tpco_formatHEX16().

◆ 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

References storeReverseMappingAttribute2().

Referenced by T4S::BOM::CUSTOM::MAPPING::SAP_BillOfMaterial2TC_Object(), T4S::ECM::CUSTOM::MAPPING::SAP_ChangeMaster2TC_Object(), T4S::DIR::CUSTOM::MAPPING::SAP_DocumentInfoRecord2TC_Object(), T4S::EQUI::CUSTOM::MAPPING::SAP_Equipment2TC_Object(), T4S::FUNCLOC::CUSTOM::MAPPING::SAP_FuncLoc2TC_Object(), T4S::MM::CUSTOM::MAPPING::SAP_MaterialMaster2TC_Object(), T4S::MM::CUSTOM::ITEM::IMPORT::SAP_MaterialMasterMapping2TC_Object(), and T4S::VENDOR::CUSTOM::MAPPING::SAP_Vendor2TC_Object().

◆ 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

Referenced by storeReverseMappingAttribute().

◆ 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

References tpco_tcdexists().

◆ 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

References tpco_tcdexists().

◆ 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

References tpco_tcdexists().

◆ translateTcEncoding2TclEncodingName()

T4X::TC::MAPPING::translateTcEncoding2TclEncodingName   TcEncodingName  

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

Parameters
TcEncodingName- Name 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.

Referenced by getTeamcenterEncodingName().

◆ 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
Value- String that should be translated to boolean.
Returns
TclBooleanValue - true or false

Variable Documentation

◆ CtrlInfo

CtrlInfo
static