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

Mapping namespace for T4S functional location transfer. More...

Functions

 callCustomerRuleHandler Function Action RuleName ItemType ItemRevisionType args
 Customer specific functional location RuleHandler function template. More...
 
 SAP_FuncLoc2TC_Object TransactionId ItemType ItemRevisionType Status ObjectKey args
 Customer specific reverse mapping function for the T4S functional location transfer. More...
 
 TC_Object2SAP_FuncLoc TransactionId ItemType ItemRevisionType args
 Customer specific mapping function to define the functional location to be transferred to SAP. More...
 

Detailed Description

Mapping namespace for T4S functional location transfer.

The namespace contains the custom specific part of a T4S functional location transfer:

  • Procedure TC_Object2SAP_FuncLoc maps Teamcenter attributes to SAP attributes (so called mapping).
  • Procedure SAP_FuncLoc2TC_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::FieldMapping.
Teamcenter attributes can be written to ::TcData with function T4X::TC::MAPPING::storeReverseMappingAttribute.
SAP attributes can be read from ::SAPDat using function T4S::TC::MAPPING::SAPFieldMapping.
SAP attributes can be written to ::SAPDat with set ::SAPDat(<key>) value.
Precondition
For the functional location transfer the following preferences are used:
  • T4S_FunctionalLocationTypeList : list of allowed Teamcenter object types
  • T4S_FunctionalLocationMapping4<ObjectType> : list of Teamcenter data types to read attributes from
  • T4S_FunctionalLocationMapping2<ObjectType> : list of Teamcenter data types to write back during reverse mapping
  • T4S_FunctionalLocationFieldMapping2<DataType> : list of Teamcenter attributes to write back during reverse mapping (optional)

Function Documentation

◆ callCustomerRuleHandler()

T4S::FUNCLOC::CUSTOM::MAPPING::callCustomerRuleHandler   Function Action RuleName ItemType ItemRevisionType args  

Customer specific functional location RuleHandler function template.

Parameters
TransactionIdunique ID for the transfer transaction
ActionWork flow action
RuleNamespecified rule name in the work flow arguments named "-user_rule". If the argument is not specified the value is "Default"
ItemType
ItemRevisionType
Returns
EPM_nogo or EPM_go

◆ SAP_FuncLoc2TC_Object()

T4S::FUNCLOC::CUSTOM::MAPPING::SAP_FuncLoc2TC_Object   TransactionId ItemType ItemRevisionType Status FuncLocNumber args  

Customer specific reverse mapping function for the T4S functional location transfer.

Customer specific functional location reverse mapping function template.

The procedure maps the following SAP attributes back to Teamcenter attributes:
SAP Id -> user_data_1
T4S transfer status -> item_comment

Parameters
TransactionIdUnique ID for the transfer transaction
ItemTypeTeamcenter item type
ItemRevisionTypeTeamcenter item revision type
StatusSAP transfer status. The following values are valid:
SKIPPED -> the transfer was skipped
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
ObjectKeySAP Id of functional location
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
Parameters
TransactionIdunique ID for the transfer transaction
StatusTransfer Status The following values are valid:
  • SKIPPED the transfer was skipped
  • 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
FuncLocNumberSAP functional location number in the internal format
argsnot used
Returns
MappingStatus 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_FuncLoc()

T4S::FUNCLOC::CUSTOM::MAPPING::TC_Object2SAP_FuncLoc   TransactionId ItemType ItemRevisionType args  

Customer specific mapping function to define the functional location to be transferred to SAP.

Customer specific Functional Location mapping function template.

The procedure maps the following Teamcenter attributes to SAP attributes:
object_name -> SAP Description
user_data_1 -> SAP Id
and some default values defined in t4s_mapping_config.sd.
In case of creation the SAP Id is pre-defined in the procedure.
In case of gateway mode Portal the procedure also checks the Action type. If the action is prohibited the user will get an error message.

  • DISPLAY is only possible if the item has an assigned SAP Id
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
Parameters
TransactionIdunique ID for the transfer transaction
ItemType
ItemRevisionType
argsnot used
Returns
MappingStatus 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