T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
AOM ITK functions

All ITK functions of group AOM supported by T4x. More...

Functions

 AOM_ask_displayable_values HexTcObjectTag PropertyName
 This function calls the ITK pipe server function AOM_ask_displayable_values and returns the displayable property value information. More...
 
 AOM_ask_max_num_elements HexTcObjectTag PropertyName
 This function calls the ITK pipe server function AOM_ask_max_num_elements to get the maximum number of values in a multi-valued property of an object. More...
 
 AOM_ask_num_elements HexTcObjectTag PropertyName
 This function calls the ITK pipe server function AOM_ask_num_elements to get the number of values in a multi-valued property of an object. More...
 
 AOM_ask_owner HexTcObjectTag
 This function calls the ITK pipe server function AOM_ask_owner to find the owning user of the given tc object. More...
 
 AOM_ask_property_master_locale HexTcObjectTag PropertyName
 This function calls the ITK pipe server function AOM_ask_property_master_locale to get the master locale of a property of an object. More...
 
 AOM_ask_property_type HexPropertyTag PropertyName
 This function calls the ITK pipe server function AOM_ask_property_type and returns the property type name. More...
 
 AOM_ask_table_rows OwningObjectTag TablePropertyName
 This function calls the ITK pipe server function AOM_ask_table_rows. More...
 
 AOM_ask_value_type HexTcObjectTag PropertyName
 This function calls the ITK pipe server function AOM_ask_value_type and returns the type name of the value. More...
 
 AOM_ask_values HexTcObjectTag PropertyName
 This function calls the ITK pipe server function AOM_ask_values and returns the internal property value information. More...
 
 AOM_delete ObjectTag
 This function calls the ITK pipe server function AOM_delete. More...
 
 AOM_delete_from_parent ObjectTag ParentTag
 This function calls the ITK pipe server function AOM_delete_from_parent. More...
 
 AOM_delete_table_rows OwningObjectTag TablePropertyName DeleteFromRowIndex NumberOfTableRows2Delete
 This function calls the ITK pipe server function AOM_delete_table_rows to delete the table row objects starting at the specified index. AOM_save and AOM_refresh have to be called after this call. More...
 
 AOM_is_null_empty HexTcObjectTag PropertyName CheckZeroLengthFlag
 This function calls the ITK pipe server function AOM_is_null_empty and returns the IsNull flag. More...
 
 AOM_refresh_lock HexTcObjectTag
 This function calls the ITK pipe server function AOM_refresh_lock to refresh and lock a given Teamcenter object. More...
 
 AOM_refresh_unlock HexTcObjectTag
 This function calls the ITK pipe server function AOM_refresh_unlock to refresh and unlock a given Teamcenter object. More...
 
 AOM_save HexTcObjectTag
 This function calls the ITK pipe server function AOM_save to commit the changes of a given Teamcenter object. More...
 
 AOM_save_with_extensions HexTcObjectTag
 This function calls the ITK pipe server function AOM_save_with_extensions that saves the object and executes the PreCondition, PreAction and PostAction extensions if TC_save_msg is implemented on the type of the object; For example, this generic ITK will execute TC_save_msg on Item in the same way as ITEM_save_item does. More...
 
 AOM_set_table_rows OwningObjectTag TablePropertyName TableRowTag1 ... TableRowTagn
 This function calls the ITK pipe server function AOM_set_table_rows to set the table row object tags for the table property. The input list of objects are stored for the current property and existing objects that are not available in the input are deleted. AOM_save and AOM_refresh have to be called after this call. More...
 
 AOM_set_value TclRepresentationOfTheTag PropertyName NewPropertyValue
 This function calls the ITK pipe server function AOM_set_value to update an attribute of an object, the function also works for RuntimeObjects like BOMlines. Based on the Property type the corresponding AOM_set_value_<type> function is used for the update of the property. AOM_save and AOM_refresh have to be called after this call. More...
 
 AOM_UIF_ask_translations HexTcObjectTag PropertyName Index
 This function calls the ITK pipe server function AOM_UIF_ask_translations to get all translations for a single- or multi-valued property of an ApplicationObject Only available in Teamcenter 8.3 and later! The Property must be localizable (else error 38300 appears) More...
 
 AOM_UIF_set_translations HexTcObjectTag PropertyName Index args
 This function calls the ITK pipe server function AOM_UIF_set_translations to set all(!) translations for a single- or multi-valued property of an ApplicationObject Only available in Teamcenter 8.3 and later! The Property must be localizable (else error 38300 appears) More...
 
 AOM_unlock HexTcObjectTag
 This function calls the ITK pipe server function AOM_refresh_unlock to unlock a given Teamcenter object. More...
 

Detailed Description

All ITK functions of group AOM supported by T4x.

This group specifies all ITK functions of group AOM for which wrappers have been defined in T4x

Function Documentation

◆ AOM_ask_displayable_values()

ITK::AOM_ask_displayable_values   HexTcObjectTag PropertyName  

This function calls the ITK pipe server function AOM_ask_displayable_values and returns the displayable property value information.

Parameters
HexTcObjectTagTeamcenter object tag in the Tcl string format
PropertyNameName of the Teamcenter object property
Returns
list of ITK_ok (=0) and the property value list or list of ITK status and error message If a property has only one value the you nee to use the [lindex [lindex $ItkStatus 1] 0] to read it.

Sample code sequence

1 set ItkStatus [::ITK::AOM_ask_displayable_values $ObjectTag $AttributeName]
2 if {[::ITK::isITK_ok $ItkStatus]} {
3  puts "XXXX"
4  puts "XXXX Call to ITK function 'AOM_ask_displayable_values ' returns: [lindex $ItkStatus 1]"
5  puts "XXXX"
6 } else {
7  set ErrorNumber [::ITK::getITKStatusNumber $ItkStatus]
8  set ErrorMesssage [::ITK::getErrorMessage4Status $ItkStatus]
9  puts "XXXX"
10  puts "XXXX Call to ITK function 'AOM_ask_displayable_values ' failed! Error code: $ErrorNumber - $ErrorMesssage"
11  puts "XXXX"
12 }

If the AttributeName is set to owning_user the output will look like this

    XXXX
    XXXX Call to ITK function 'AOM_ask_displayable_values' returns: {infodba (infodba)}
    XXXX

◆ AOM_ask_max_num_elements()

ITK::AOM_ask_max_num_elements   HexTcObjectTag PropertyName  

This function calls the ITK pipe server function AOM_ask_max_num_elements to get the maximum number of values in a multi-valued property of an object.

Parameters
HexTcObjectTagthe ApplicationObject Puid, hexed
PropertyNamename of the property
Returns
ITK_ok (=0) and integer (number of values) or list of ITK status and error message

◆ AOM_ask_num_elements()

ITK::AOM_ask_num_elements   HexTcObjectTag PropertyName  

This function calls the ITK pipe server function AOM_ask_num_elements to get the number of values in a multi-valued property of an object.

Parameters
HexTcObjectTagthe ApplicationObject Puid, hexed
PropertyNamename of the property
Returns
ITK_ok (=0) and integer (number of values) or list of ITK status and error message

◆ AOM_ask_owner()

ITK::AOM_ask_owner   HexTcObjectTag  

This function calls the ITK pipe server function AOM_ask_owner to find the owning user of the given tc object.

Parameters
HexTcObjectTag
Returns
ITK_ok (=0) and HexUserTag or list of ITK status and error message

Referenced by T4X::WORKFLOW::BATCHJOB::CUSTOM::sendTC_InfoEMail().

◆ AOM_ask_property_master_locale()

ITK::AOM_ask_property_master_locale   HexTcObjectTag PropertyName  

This function calls the ITK pipe server function AOM_ask_property_master_locale to get the master locale of a property of an object.

Parameters
HexTcObjectTagthe ApplicationObject Puid, hexed
PropertyNamename of the property
Returns
ITK_ok (=0) and locale string ("de_DE", "en_US", etc.) or list of ITK error and message

◆ AOM_ask_property_type()

ITK::AOM_ask_property_type   HexPropertyTag PropertyName  

This function calls the ITK pipe server function AOM_ask_property_type and returns the property type name.

Parameters
HexPropertyTaghexed
PropertyNamestring
Returns
list of ITK_ok (=0) and the property type name or list of ITK status and error message

◆ AOM_ask_table_rows()

ITK::AOM_ask_table_rows   OwningObjectTag TablePropertyName  

This function calls the ITK pipe server function AOM_ask_table_rows.

Parameters
OwningObjectTagTcl representation of the Tag
TablePropertyName
Returns
ITK_ok (=0) and list of found table row object tags or list of ITK status and error message

Sample code sequence

1 set StatusInfo [::ITK::AOM_ask_table_rows $OwningObjectTag xxx9PlantTable]
2 if {[::ITK::isITK_ok $ITKStatus] && [llength [lindex $ITKStatus 1]] > 0} {
3  tpwrite -mtype CONSOLE "No table rows found!"
4 } elseif {[::ITK::isITK_ok $ITKStatus]} {
5  foreach TableRowElementTag [lindex $ITKStatus 1] {
6  #
7  # here you can now use the all function to read or update a table row attribute (for updates you may need to lock the OwningObjectTag)
8  #
9  set StatusList [::ITK::getObjectPropertyByName $TableRowElementTag "xxx9MyTablerowAttribute"]
10  if {[::ITK::isITK_ok $StatusList]} {
11  #ITK_ok
12  set PropertyValue [::ITK::getObjectValue $StatusList]
13  } else {
14  # any error
15  set ErrorNumber [::ITK::getITKStatusNumber $StatusList]
16  set ErrorMesssage [::ITK::getErrorMessage4Status $StatusList]
17  }
18  }
19 }

◆ AOM_ask_value_type()

ITK::AOM_ask_value_type   HexTcObjectTag PropertyName  

This function calls the ITK pipe server function AOM_ask_value_type and returns the type name of the value.

Parameters
HexTcObjectTag,hexed
PropertyName,string
Returns
list of ITK_ok (=0) and the value type name or list of ITK status and error message

◆ AOM_ask_values()

ITK::AOM_ask_values   HexTcObjectTag PropertyName  

This function calls the ITK pipe server function AOM_ask_values and returns the internal property value information.

Parameters
HexTcObjectTagTeamcenter object tag in the Tcl string format
PropertyNameName of the Teamcenter object property
Returns
list of ITK_ok (=0) and the property value (as a list if it is multivalued) or list of ITK status and error message

Sample code sequence

1 set ItkStatus [::ITK::AOM_ask_values $ObjectTag $AttributeName]
2 if {[::ITK::isITK_ok $ItkStatus]} {
3  puts "XXXX"
4  puts "XXXX Call to ITK function 'AOM_ask_values ' returns: [lindex $ItkStatus 1]"
5  puts "XXXX"
6 } else {
7  set ErrorNumber [::ITK::getITKStatusNumber $ItkStatus]
8  set ErrorMesssage [::ITK::getErrorMessage4Status $ItkStatus]
9  puts "XXXX"
10  puts "XXXX Call to ITK function 'AOM_ask_values ' failed! Error code: $ErrorNumber - $ErrorMesssage"
11  puts "XXXX"
12 }

Referenced by findStartedSuccessorTask().

◆ AOM_delete()

ITK::AOM_delete   ObjectTag  

This function calls the ITK pipe server function AOM_delete.

Parameters
ObjectTagthe ApplicationObject Puid, in the Tcl string format
Returns
ITK_ok (=0) or list of ITK status and error message

◆ AOM_delete_from_parent()

ITK::AOM_delete_from_parent   ObjectTag ParentTag  

This function calls the ITK pipe server function AOM_delete_from_parent.

Parameters
ObjectTagthe ApplicationObject Puid, in the Tcl string format
ParentTagthe Parent ApplicationObject Puid, in the Tcl string format
Returns
ITK_ok (=0) or list of ITK status and error message

◆ AOM_delete_table_rows()

ITK::AOM_delete_table_rows   OwningObjectTag TablePropertyName DeleteFromRowIndex NumberOfTableRows2Delete  

This function calls the ITK pipe server function AOM_delete_table_rows to delete the table row objects starting at the specified index. AOM_save and AOM_refresh have to be called after this call.

Precondition
The owning object (OwningObjectTag) needs to be locked (AOM_refresh_lock) before this call
Parameters
OwningObjectTagTcl representation of the Tag
TablePropertyName
DeleteFromRowIndexTable row objects to be deleted from this row index.
NumberOfTableRows2DeleteThe number of table row objects to be deleted.
Returns
ITK_ok (=0) or list of ITK status and error message

◆ AOM_is_null_empty()

ITK::AOM_is_null_empty   HexTcObjectTag PropertyName CheckZeroLengthFlag  

This function calls the ITK pipe server function AOM_is_null_empty and returns the IsNull flag.

Parameters
HexTcObjectTaghexed
PropertyNamestring
CheckZeroLengthFlagIndicates if also to check out 0-length string (true|false)
Returns
list of ITK_ok (=0) and the IsNull flag value (true or false)or list of ITK status and error message

Sample code sequence

1 set ItkStatus [::ITK::AOM_is_null_empty $ObjectTag $AttributeName $IsEmptyFlag]
2 if {[::ITK::isITK_ok $ItkStatus]} {
3  puts "XXXX"
4  puts "XXXX Call to ITK function 'AOM_is_null_empty' returns: [lindex $ItkStatus 1]"
5  puts "XXXX"
6 } else {
7  set ErrorNumber [::ITK::getITKStatusNumber $ItkStatus]
8  set ErrorMesssage [::ITK::getErrorMessage4Status $ItkStatus]
9  puts "XXXX"
10  puts "XXXX Call to ITK function 'AOM_is_null_empty' failed! Error code: $ErrorNumber - $ErrorMesssage"
11  puts "XXXX"
12 }

◆ AOM_refresh_lock()

ITK::AOM_refresh_lock   HexTcObjectTag  

This function calls the ITK pipe server function AOM_refresh_lock to refresh and lock a given Teamcenter object.

Parameters
HexTcObjectTag
Returns
ITK_ok (=0) or list of ITK status and error message

Referenced by T4X::CUSTOM::MAPPING::TOOLBOX::importNamedReference(), and T4S::MM::CUSTOM::ITEM::IMPORT::updateTC_Object().

◆ AOM_refresh_unlock()

ITK::AOM_refresh_unlock   HexTcObjectTag  

This function calls the ITK pipe server function AOM_refresh_unlock to refresh and unlock a given Teamcenter object.

Parameters
HexTcObjectTag
Returns
ITK_ok (=0) or list of ITK status and error message

Referenced by T4X::CUSTOM::MAPPING::TOOLBOX::importNamedReference().

◆ AOM_save()

ITK::AOM_save   HexTcObjectTag  

This function calls the ITK pipe server function AOM_save to commit the changes of a given Teamcenter object.

Parameters
HexTcObjectTag
Returns
ITK_ok (=0) or list of ITK status and error message

Referenced by T4X::CUSTOM::MAPPING::TOOLBOX::importNamedReference(), and T4X::TC::MAPPING::save_unlockTcObject().

◆ AOM_save_with_extensions()

ITK::AOM_save_with_extensions   HexTcObjectTag  

This function calls the ITK pipe server function AOM_save_with_extensions that saves the object and executes the PreCondition, PreAction and PostAction extensions if TC_save_msg is implemented on the type of the object; For example, this generic ITK will execute TC_save_msg on Item in the same way as ITEM_save_item does.

Parameters
HexTcObjectTag
Returns
ITK_ok (=0) or list of ITK status and error message

Referenced by T4X::CUSTOM::MAPPING::TOOLBOX::createTC_Object2(), and T4X::WORKFLOW::BATCHJOB::CUSTOM::sendTC_InfoEMail().

◆ AOM_set_table_rows()

ITK::AOM_set_table_rows   OwningObjectTag TablePropertyName TableRowTag1 ... TableRowTagn  

This function calls the ITK pipe server function AOM_set_table_rows to set the table row object tags for the table property. The input list of objects are stored for the current property and existing objects that are not available in the input are deleted. AOM_save and AOM_refresh have to be called after this call.

Precondition
The owning object (OwningObjectTag) needs to be locked (AOM_refresh_lock) before this call
Parameters
OwningObjectTagTcl representation of the Tag
TablePropertyName
TableRowTag1... TableRowTagn List of table row objects

Sample code sequence

1  # i) //construct operation Input object
2  # //set the required properties on createInputTag
3  # //Use AOM methods or operationInput object setValue(s) Methods.
4  set ItkStatus [::ITK::TCTYPE_find_type "XXX9PlantTableRow"]
5  if {[::ITK::isITK_ok $ItkStatus]} {
6  set TableRowTagList {}
7  set TypeTag [lindex $ItkStatus 1]
8  set ItkStatus [::ITK::TCTYPE_construct_create_input $TypeTag xxx9PlantId 9904 xxx9MRPType ND xxx9MRPGroup 013]
9  if {[::ITK::isITK_ok $ItkStatus]} {
10 
11  # ii) Create Table Row object
12  # repeat steps I & ii above to create multiple rows.
13  set createInputTag [lindex $ItkStatus 1]
14  set ItkStatus [::ITK::TCTYPE_create_object $createInputTag]
15  if {[::ITK::isITK_ok $ItkStatus]} {
16  set newObjectTag [lindex $ItkStatus 1]
17  # Iii) set table rows from create above + existing rows for the item
18  set ItkStatus [::ITK::AOM_refresh_lock $OwningObjectTag]
19  lappend TableRowTagList $newObjectTag
20 
21  set ItkStatus [::ITK::AOM_set_table_rows $OwningObjectTag xxx9PlantTable {*}$TableRowTagList]
22  puts "AOM_set_table_rows ItkStatus $ItkStatus"
23  if {[::ITK::isITK_ok $ItkStatus]} {
24  set ItkStatus [::ITK::AOM_save $OwningObjectTag]
25  set ItkStatus [::ITK::AOM_refresh_unlock $OwningObjectTag]
26  } else {
27  tpwrite -mtype CONSOLE "::ITK::AOM_set_table_rows fails!"
28  }
29  } else {
30  tpwrite -mtype CONSOLE "TCTYPE_create_object fails!"
31  }
32  } else {
33  tpwrite -mtype CONSOLE "TCTYPE_construct_create_input created failed for table row!"
34  }
35 } else {
36  tpwrite -mtype CONSOLE "Table row type not found!"
37 }
Returns
ITK_ok (=0) or list of ITK status and error message

◆ AOM_set_value()

ITK::AOM_set_value   TclRepresentationOfTheTag PropertyName NewPropertyValue  

This function calls the ITK pipe server function AOM_set_value to update an attribute of an object, the function also works for RuntimeObjects like BOMlines. Based on the Property type the corresponding AOM_set_value_<type> function is used for the update of the property. AOM_save and AOM_refresh have to be called after this call.

Parameters
TclRepresentationOfTheTag
PropertyName
NewPropertyValueSupports single (or multiple value string) properties updates with a new property value. To update multi value properties the value has to be provided as a single string each value needs to be separated by a
separator (e.g. "value1\nvalue2\nvalue3")
Returns
ITK_ok (=0) or list of ITK status and error message

◆ AOM_UIF_ask_translations()

ITK::AOM_UIF_ask_translations   HexTcObjectTag PropertyName Index  

This function calls the ITK pipe server function AOM_UIF_ask_translations to get all translations for a single- or multi-valued property of an ApplicationObject Only available in Teamcenter 8.3 and later! The Property must be localizable (else error 38300 appears)

Parameters
HexTcObjectTagthe ApplicationObject Puid, hexed
PropertyNamename of the property
Indexthe index of the value (0 if single-valued)
Returns
ITK_ok (=0) and a Tcl list of Status and a triple of locale, translated value and translation status for each available translation, all returned values are hexed! or list of ITK status and error message

◆ AOM_UIF_set_translations()

ITK::AOM_UIF_set_translations   HexTcObjectTag PropertyName Index args  

This function calls the ITK pipe server function AOM_UIF_set_translations to set all(!) translations for a single- or multi-valued property of an ApplicationObject Only available in Teamcenter 8.3 and later! The Property must be localizable (else error 38300 appears)

Parameters
HexTcObjectTagthe ApplicationObject Puid, hexed
PropertyNamename of the property
Indexthe index of the value (0 if single-valued)
argsarbitrary number of triples of locale, value and status (each hexed, all flat, no list)
Returns
ITK_ok (=0) or list of ITK status and error message

◆ AOM_unlock()

ITK::AOM_unlock   HexTcObjectTag  

This function calls the ITK pipe server function AOM_refresh_unlock to unlock a given Teamcenter object.

Parameters
HexTcObjectTag
Returns
ITK_ok (=0) or list of ITK status and error message

Referenced by T4X::TC::MAPPING::save_unlockTcObject(), and T4X::CUSTOM::MAPPING::TOOLBOX::saveItemWithUnlock().