T4S4  19.1 C8540 A23673
Teamcenter Gateway for SAP S/4HANA API Reference
T4S::BOM::CUSTOM::MAPPING Namespace Reference

Mapping namespace for T4S bill of material transfer. More...

Functions

 SAP_BillOfMaterial2TC_Object TransactionId Status args
 Customer specific reverse mapping function for the T4S bill of material transfer. More...
 
 TC_Object2SAP_BillOfMaterial TransactionId ItemType ItemRevisionType args
 Customer specific mapping function to define the bill of material header data to be transferred to SAP. More...
 
 TC_Object2SAP_BillOfMaterialPosition TransactionId PositionIndex ItemType ItemRevisionType args
 Customer specific mapping function to define the bill of material position data to be transferred to SAP. More...
 
 TC_Object2SAP_BillOfMaterialPostAction TransactionId ItemType ItemRevisionType MappingStatus args
 This function is called AFTER the general mapping and can be used to perform additional steps after the header and position mapping. More...
 

Variables

 BomHeaderInfo
 
 BomPositionInfo
 

Detailed Description

Mapping namespace for T4S bill of material transfer.

The namespace contains the custom specific part of a T4S bill of material transfer:

  • Procedure TC_Object2SAP_BillOfMaterial maps Teamcenter attributes of BOM header to SAP attributes (so called mapping).
  • Procedure TC_Object2SAP_BillOfMaterialPostAction is called after the general mapping in order to perform additional steps.
  • Procedure TC_Object2SAP_BillOfMaterialPosition maps Teamcenter attributes of BOM line to SAP attributes (so called mapping).
  • Procedure SAP_BillOfMaterial2TC_Object maps SAP attributes back to Teamcenter attributes (so called reverse mapping).
Note
For the data exchange between Teamcenter and T4S the internal TCL dictionary ::TcData is used. It contains specific attributes of the Teamcenter object to be transferred and additional information about the current transaction. For the data exchange between T4S and SAP the internal TCL array ::SAPDat is used.
Teamcenter attributes can be read from ::TcData with function T4X::TC::MAPPING::IndexedFieldMapping.
Teamcenter attributes can be written to ::TcData with function T4X::TC::MAPPING::storeReverseMappingAttribute.
SAP attributes can be read from ::SAPDat with $::SAPDat(<key>).
SAP attributes can be written to ::SAPDat with set ::SAPDat(<key>) value.
Precondition
For the bill of material transfer the following preferences are used:
  • T4S_BillOfMaterialTypeList : list of allowed Teamcenter object types
  • T4S_BillOfMaterialMapping4<ViewType> : list of Teamcenter view types to read attributes from
  • T4S_BillOfMaterialHeaderTypeList : list of allowed Teamcenter object types for BOM header. Otherwise T4S_MaterialMasterTypeList is used
  • T4S_BillOfMaterialHeaderMapping4<ObjectType> : list of Teamcenter data types for BOM header to read attributes from. Otherwise T4S_MaterialMasterMapping4<ObjectType> is used
  • T4S_BillOfMaterialLineMapping4<ObjectType> : list of Teamcenter data types for BOM lines to read attributes from. Otherwise T4S_MaterialMasterMapping4<ObjectType> is used
  • T4S_BillOfMaterialOccurrenceNotes4<ViewType> : list of Teamcenter occurence notes for BOM lines to read attributes from.
  • T4S_BillOfMaterialMapping2<ViewType> : list of Teamcenter view types to write back during reverse mapping
  • T4S_BillOfMaterialFieldMapping2<DataType> : list of Teamcenter attributes to write back during reverse mapping (optional)

Function Documentation

◆ SAP_BillOfMaterial2TC_Object()

T4S::BOM::CUSTOM::MAPPING::SAP_BillOfMaterial2TC_Object   TransactionId Status args  

Customer specific reverse mapping function for the T4S bill of material transfer.

The procedure maps status information back to Teamcenter attributes
T4S transfer status -> item_comment

Parameters
TransactionIdUnique ID for the transfer transaction
StatusSAP transfer status. The following values are valid:
  • SKIPPED -> the transfer was skipped
  • ERROR -> the transfer was stopped by an error
  • EMPTY_BOM_ERROR -> the transfer was stopped by an error
  • UNKNOWN -> the transfer was stopped by an unknown error
  • UPDATED_WITH_ERROR -> the transfer was stopped by an minor error in one of the additional transfer steps
  • CREATED, CHANGED, UPDATED -> and some other values are used for a successful transfer
argsNot used
Returns
Return code used by the following Tc object update function. The following values are valid:
  • OK -> T4S will update the Tc object based on the reverse mapping preferences and the reverse mapping buffer
  • SKIPPED -> T4S will skip the TcData object
  • ERROR -> T4S will stop transfer and raise an error

◆ TC_Object2SAP_BillOfMaterial()

T4S::BOM::CUSTOM::MAPPING::TC_Object2SAP_BillOfMaterial   TransactionId ItemType ItemRevisionType args  

Customer specific mapping function to define the bill of material header data to be transferred to SAP.

This procedure is called one time to prepare the bill of material header data.
It maps the Teamcenter attributes user_data_1 and some default values defined in t4s_mapping_config.sd to SAP attributes.
For bill of material (BOM) transfer the Teamcenter attribute user_data_1 shall contain the SAP Id of the material master for which the BOM should be created/updated in SAP. Otherwise the user will get an error message.

Parameters
TransactionIdUnique ID for the transfer transaction
ItemTypeTeamcenter item type
ItemRevisionTypeTeamcenter item revision type
argsNot used
Returns
Return code used by the following transfer function. The following values are valid:
  • OK -> T4S will continue with the next transfer step
  • REVERSEMAPPINGONLY -> T4S will skip the transfer to SAP and will just do the reverse mapping
  • SKIPPED -> T4S will skip the transfer to SAP
  • ERROR -> T4S will stop transfer and raise an error

◆ TC_Object2SAP_BillOfMaterialPosition()

T4S::BOM::CUSTOM::MAPPING::TC_Object2SAP_BillOfMaterialPosition   TransactionId PositionIndex ItemType ItemRevisionType args  

Customer specific mapping function to define the bill of material position data to be transferred to SAP.

This procedure is called one time to prepare the bill of material position data.
It maps the Teamcenter attributes user_data_1 and bl_quantity and some default values defined in t4s_mapping_config.sd to SAP attributes.
Depending on Teamcenter attribute bl_ref_designator the BOM line position is determined.
The Teamcenter attribute user_data_1 shall contain the SAP Id of the material master for which the BOM line should be created/updated in SAP. Otherwise the user will get an error message if action is not DISPLAY.

Parameters
TransactionIdUnique ID for the transfer transaction
PositionIndexTeamcenter BOM line index
ItemTypeTeamcenter item type
ItemRevisionTypeTeamcenter item revision type
argsNot used
Returns
Return code used by the following transfer function. The following values are valid:
  • OK -> T4S will continue with the next transfer step
  • REVERSEMAPPINGONLY -> T4S will skip the transfer to SAP and will just do the reverse mapping
  • SKIPPED -> T4S will skip the transfer to SAP
  • ERROR -> T4S will stop transfer and raise an error

◆ TC_Object2SAP_BillOfMaterialPostAction()

T4S::BOM::CUSTOM::MAPPING::TC_Object2SAP_BillOfMaterialPostAction   TransactionId ItemType ItemRevisionType MappingStatus args  

This function is called AFTER the general mapping and can be used to perform additional steps after the header and position mapping.

Parameters
TransactionIdUnique ID for the transfer transaction
PositionIndexTc BOMLine index
ItemType
ItemRevisionType
MappingStatus
argsNot used
Returns
Return code used by the following transfer function. The following values are valid:
  • OK -> T4S will continue with the next transfer step
  • REVERSEMAPPINGONLY -> T4S will skip the transfer to SAP and will just do the reverse mapping
  • SKIPPED -> T4S will skip the transfer to SAP
  • ERROR -> T4S will stop transfer and raise an error

Variable Documentation

◆ BomHeaderInfo

BomHeaderInfo
static

◆ BomPositionInfo

BomPositionInfo
static