![]() |
T4S4
18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
|
Functions | |
addFileAttachment JobAttributeDict FileName | |
This function adds the given FileName to the given JobAttributeDict and returns the updated dict. More... | |
addStreamAttachment JobAttributeDict StreamName Stream | |
This function adds the given attachment stream to the given JobAttributeDict and returns the updated dict. More... | |
checkConnection2ERP FunctionName SessionId ?Mode? ?strObjectType? ?strAction? args | |
This function reads the current stored ERP login info's for a given Teamcenter. Session Id and tests the connection. More... | |
createBatchjob FunctionName ImportObjectId ?TransferDirection? ?ZTabId? ?AdditionalInfo? ?SessionId? ?Filter? ?DependOnIds? args | |
This function creates batch job to import SAP/ESB/... item to Teamcenter. More... | |
createBatchjob2 BatchJobDict args | |
This function creates batch job to import SAP/ESB/... item to Teamcenter. More... | |
CreateImportBOMCodeProxy FunctionName ConnectFct VerifyZTblFct GetDataFct SelectFct CreateFct SelectViewFct CreateViewFct BOMInfoFct ReverseMappingFct UpdateFct UpdateZTblFct InitFct CleanUpFct ?T4Target? args | |
This function creates a generic import batch job code for BOMs. More... | |
CreateImportCodeProxy FunctionName ConnectFct VerifyZTblFct GetDataFct SelectFct CreateFct MappingFct ReverseMappingFct UpdateFct UpdateZTblFct InitFct CleanUpFct ?T4Target? ?Type? args | |
This function creates a generic import batch job code. More... | |
CreateImportMetaCodeProxy FunctionName ConnectFct VerifyZTblFct ImportFct UpdateZTblFct InitFct CleanUpFct ?T4Target? args | |
This function creates a generic import batch job code. More... | |
createJob FunctionName JobAttributeDict | |
This function creates batch job to import SAP/ESB/... item to Teamcenter. More... | |
executeImportJob FunctionName ImportObjectId ?TransferDirection? ?ZTabId? ?RunMode? ?AdditionalInfo? args | |
This function starts the import batch job from ERP to TC. More... | |
executeImportJob2 ImportDict args | |
This function starts the import Batchjob from ERP to TC. More... | |
handleBatchJob ExecuteFunction JobId ImportObjectId TransferDirection ZTabId AdditionalInfo | |
This function makes necessary settings and checks (dependency), executes the import code and sets the batch job status. More... | |
initJobAttributeStructure FunctionName ObjectString | |
This function initializes the JobAttribute buffer argument of the new createJob call. More... | |
procedureExists procedureName | |
setHardDependencyList DependencyDict DependencyList | |
This function updates a dict with a list of hard dependencies. More... | |
setImportJobAttributeDict JobAttributeDict ImportJobAttributeName NewValue | |
This function updates the internal ImportJobAttributeDict buffer that is used in the following createJob. More... | |
setImportJobObjectId JobAttributeDict ImportObjectKey | |
This function updates the internal ImportJobAttributeDict buffer that is used in the following createJob. More... | |
setImportJobTransferDirection JobAttributeDict TransferDirection | |
This function updates the internal ImportJobAttributeDict buffer that is used in the following createJob. More... | |
setJobAttributes JobAttributeDict JobAttributeName NewValue | |
This function sets the defined JobAttribute in the provided JobAttributeDict to the new specified value. More... | |
setJobDescription JobAttributeDict JobDescription | |
This function sets the JobDescription in the provided JobAttributeDict. More... | |
setSoftDependencyList DependencyDict DependencyList | |
This function updates a dict with a list of soft dependencies. More... | |
updateStatus4ZTableId LogChannelName FunctionName ZTabId Status ?Error_Msg1? ?Error_Msg2? ?Error_Msg3? args | |
This function updates status of given entry in the Z-Table. More... | |
writeTransactionLog AppLogTransactionId FunctionName Status args | |
This function writes the given information to the transaction log. More... | |
Variables | |
BatchjobDefaults | |
Namespace array buffer to define defaults for the Export Job processing. For each registered export job type a separate set of defaults are defined during the registration. The following array elements are defined ($FunctionName stands for the registered JobTypeName): BatchjobDefaults(BatchJobPrio:$FunctionName) Defines the default priority in the job pool (default: 20) BatchjobDefaults(BatchJobTimeout:$FunctionName) Defines the default job processing timeout for a job (default: 3600) BatchjobDefaults(MaxRetryCounter:$FunctionName) Defines the maximum number of job execution retries in the case of a detected application error (default: 1) BatchjobDefaults(DefaultRetryTime:$FunctionName) Defines a delay in seconds after a job the is sent into retry BatchjobDefaults(useBypassPrivilege:$FunctionName) Activate the bypass privilege during the job execution (default: true) In addition there is also a generic setting for the default execution time window: BatchjobDefaults(DefaultTimeWindow) Defines the default job execution time window (default: "No TimeWindow") More... | |
T4X::BATCHJOB::IMPORT::addFileAttachment | JobAttributeDict FileName | ||
This function adds the given FileName to the given JobAttributeDict and returns the updated dict.
JobAttributeDict | dict |
FileName | string containing the file location |
T4X::BATCHJOB::IMPORT::addStreamAttachment | JobAttributeDict StreamName Stream | ||
This function adds the given attachment stream to the given JobAttributeDict and returns the updated dict.
JobAttributeDict | dict |
StreamName | name of the attachment stream |
Stream | string representing the steam content |
T4X::BATCHJOB::IMPORT::checkConnection2ERP | FunctionName SessionId ?Mode? ?strObjectType? ?strAction? args | ||
This function reads the current stored ERP login info's for a given Teamcenter. Session Id and tests the connection.
FunctionName | name of the connect function to run |
SessionId | unique session ID for the users teamcenter session, if set to NO_ERP_NEEDED - the erp connection will be skipped |
Mode | transfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ...; default = "*" for all. |
strObjectType | ERP target object type like MM, ECM, ...; default = "*" for all. |
strAction | transfer action in the GUI like CREATE, CHANGE, ...; default = "*" for all. |
References T4X::CORE::getSessionLogChannel(), and tpwrite().
T4X::BATCHJOB::IMPORT::createBatchjob | FunctionName ImportObjectId ?TransferDirection? ?ZTabId? ?AdditionalInfo? ?SessionId? ?Filter? ?DependOnIds? args | ||
This function creates batch job to import SAP/ESB/... item to Teamcenter.
FunctionName | name of the import function created with the proxy call CreateImportCodeProxy/CreateImportBOMCodeProxy/CreateImportMetaCodeProxy |
ImportObjectId | object key |
TransferDirection | string for MonitorCounters example "SAP2TC"; initialised with "TC_IMPORT" not given and the following parameter are not set |
ZTabId | z-table id - initialised with "NONE" if not given and the following parameter are not set |
AdditionalInfo | initialised with "NONE" if not given and the following parameter are not set |
SessionId | unique session ID for the Teamcenter session; if set to NO_ERP_NEEDED, the ERP connection will be skipped; initialised with "BATCH" if not given and the following parameter are not set |
Filter | initialised with "NONE" if not given and the following parameter are not set |
DependOnIds | list of batch job Id on which this batch job depends on; initialised with empty list if not given and the following parameter are not set |
References API::Core::Batch::connectTo(), API::Core::Batch::createJob(), API::Core::Batch::createObject(), API::Core::Batch::disconnect(), T4X::BATCHJOB::TOOLBOX::getTimeWindow(), T4X::BATCHJOB::DEPENDENCIES::setBatchJobDependencies(), API::Core::Batch::setObjectAttribute(), and tpwrite().
Referenced by createBatchjob2(), and T4S::QUERY::CUSTOM::MAPPING::importQueryRowViaBatch().
T4X::BATCHJOB::IMPORT::createBatchjob2 | BatchJobDict args | ||
This function creates batch job to import SAP/ESB/... item to Teamcenter.
BatchJobDict | dict BatchJobDict has the following dict keys
|
References createBatchjob(), and T4X::BATCHJOB::TOOLBOX::getDictValue().
T4X::BATCHJOB::IMPORT::CreateImportBOMCodeProxy | FunctionName ConnectFct VerifyZTblFct GetDataFct SelectFct CreateFct SelectViewFct CreateViewFct BOMInfoFct ReverseMappingFct UpdateFct UpdateZTblFct InitFct CleanUpFct ?T4Target? args | ||
This function creates a generic import batch job code for BOMs.
FunctionName | name of the procedure to create |
ConnectFct | name of the procedure to connect the ERP |
VerifyZTblFct | name of the procedure to read the z-table |
GetDataFct | name of the procedure to get the Teamcenter data |
SelectFct | name of the procedure to select a Teamcenter item |
CreateFct | name of the procedure to create a new Teamcenter item |
SelectViewFct | name of the procedure to select a Teamcenter bom view |
CreateViewFct | name of the procedure to create a new Teamcenter bom view |
BOMInfoFct | name of the procedure to get the bom view data |
ReverseMappingFct | reverse mapping procedure name |
UpdateFct | name of the procedure to update a Teamcenter item |
UpdateZTblFct | name of the procedure to update the status in z-table |
InitFct | initialise function, called at the beginning |
CleanUpFct | clean up function, called at the end |
T4Target | defines the used base product feature (e.g. T4S) to execute the batch job |
Sample code sequence
References T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults().
T4X::BATCHJOB::IMPORT::CreateImportCodeProxy | FunctionName ConnectFct VerifyZTblFct GetDataFct SelectFct CreateFct MappingFct ReverseMappingFct UpdateFct UpdateZTblFct InitFct CleanUpFct ?T4Target? ?Type? args | ||
This function creates a generic import batch job code.
FunctionName | name of the procedure to create |
ConnectFct | name of the procedure to connect the ERP |
VerifyZTblFct | name of the procedure to read the z-table |
GetDataFct | name of the procedure to get the Teamcenter data |
SelectFct | name of the procedure to select a Teamcenter item |
CreateFct | name of the procedure to create a new Teamcenter item |
MappingFct | mapping function |
ReverseMappingFct | reverse mapping procedure name |
UpdateFct | name of the procedure to update a Teamcenter item |
UpdateZTblFct | name of the procedure to update the status in z-table |
InitFct | initialize function, called at the beginning |
CleanUpFct | clean up function, called at the end |
T4Target | defines the used base product feature (e.g. T4S) to execute the batch job, if not specified the default T4X is used. |
Type | Import object type used in the reverse mapping function |
Sample code sequence
References T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults().
T4X::BATCHJOB::IMPORT::CreateImportMetaCodeProxy | FunctionName ConnectFct VerifyZTblFct ImportFct UpdateZTblFct InitFct CleanUpFct ?T4Target? args | ||
This function creates a generic import batch job code.
FunctionName | name of the procedure to create |
ConnectFct | name of the procedure to connect the ERP |
VerifyZTblFct | name of the procedure to read the z-table |
ImportFct | name of the procedure to import the meta data to the Teamcenter |
UpdateZTblFct | name of the procedure to update the status in z-table |
InitFct | initialise function, called at the beginning |
CleanUpFct | clean up function, called at the end |
T4Target | defines the used base product feature (e.g. T4S) to execute the batch job |
Sample code sequence
References T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults().
T4X::BATCHJOB::IMPORT::createJob | FunctionName JobAttributeDict | ||
This function creates batch job to import SAP/ESB/... item to Teamcenter.
FunctionName | - name of the import function created with the proxy call CreateImportCodeProxy/CreateImportBOMCodeProxy/CreateImportMetaCodeProxy |
JobAttributeDict | JobAtttribute structure with the following dict keys
|
Sample code sequence
References API::Core::Batch::connectTo(), T4X::CORE::convertTimeString2Secs(), API::Core::Batch::createJob(), API::Core::Batch::createObject(), API::Core::Batch::disconnect(), T4X::BATCHJOB::TOOLBOX::getDictValue(), API::Core::Batch::setDependency(), API::Core::Batch::setHardDependency(), API::Core::Batch::setJobAttachmentByStream2(), API::Core::Batch::setJobAttribute(), API::Core::Batch::setObjectAttribute(), API::Core::Batch::setSoftDependency(), and tpwrite().
T4X::BATCHJOB::IMPORT::executeImportJob | FunctionName ImportObjectId ?TransferDirection? ?ZTabId? ?RunMode? ?AdditionalInfo? args | ||
This function starts the import batch job from ERP to TC.
FunctionName | name of the procedure to call for the import |
ImportObjectId | object key |
TransferDirection | string for MonitorCounters example "SAP2TC"; initialised with "TC_IMPORT" if not given and the following parameter are not setFV |
ZTabId | z-table id |
RunMode | for batch job mode has to be set to "BatchJob", anything else means no batch job mode; initialised with "BatchJob" if not given and the following parameter are not set |
AdditionalInfo | initialised with "NONE" |
References ITK::ADMIN_set_bypass(), API::Core::Batch::getAttributeFromRawAttributeString(), T4X::CORE::getSessionLogChannel(), T4X::CORE::initStatusInfo(), T4X::CORE::resetLastErrorMessage(), T4X::BATCHJOB::TOOLBOX::setAttribute4TeamcenterSYSLOG(), ITK::setDefaultLogChannel(), T4X::BATCHJOB::TOOLBOX::setJobMessage(), T4X::CORE::setTransactionLogChannel(), T4X::TRANSLOG::startTransactionLog(), T4X::TRANSLOG::stopTransactionLog(), tpco_formatHEX16(), tpco_tcddelete(), tpwrite(), T4X::TRANSLOG::writeTcSysLogFileEntry(), and T4X::BATCHJOB::TOOLBOX::writeTcUser2LogIndex().
Referenced by executeImportJob2(), and handleBatchJob().
T4X::BATCHJOB::IMPORT::executeImportJob2 | ImportDict args | ||
This function starts the import Batchjob from ERP to TC.
References executeImportJob(), T4X::BATCHJOB::TOOLBOX::getDictValue(), and tpwrite().
T4X::BATCHJOB::IMPORT::handleBatchJob | ExecuteFunction JobId ImportObjectId TransferDirection ZTabId AdditionalInfo | ||
This function makes necessary settings and checks (dependency), executes the import code and sets the batch job status.
ExecuteFunction | name of the import function created with the proxy call |
JobId | unique batch job id |
ImportObjectId | object key |
TransferDirection | string for MonitorCounters example "SAP2TC" |
ZTabId | z-table id |
AdditionalInfo | additional info |
References API::Core::Batch::connectTo(), API::Core::Batch::disconnect(), executeImportJob(), ITK::getConnectionParameters(), T4X::BATCHJOB::TOOLBOX::logStatusInfo(), T4X::BATCHJOB::TOOLBOX::setBatchjobStatus(), T4X::BATCHJOB::TOOLBOX::setJobMessage(), and tpwrite().
T4X::BATCHJOB::IMPORT::initJobAttributeStructure | FunctionName ObjectString | ||
This function initializes the JobAttribute buffer argument of the new createJob call.
FunctionName | - name of the import function created with the proxy call CreateImportCodeProxy/CreateImportBOMCodeProxy/CreateImportMetaCodeProxy |
ObjectString | - used to define the job description (displayed in the Admin UI) the description is set to "$FunctionName: $ObjectString" |
BGS_CONID
- defines the used BGS host, is initialized with the default BGS host JOB_DESCRIPTION
- job description displayed in the Admin UI JOB_TIMEOUT
- job timeout in seconds (default is defined by the variable $T4X::BATCHJOB::IMPORT::BatchjobDefaults(BatchJobTimeout:$FunctionName)) JOB_TIME_WINDOW_START
- defines the execution start time (HH:MM::SS) for a job, so that it is possible to define that a job is only executed during the night JOB_TIME_WINDOW_END
- defines the execution end time (HH:MM::SS) for a job, so that it is possible to define that a job is only executed during the night ATTACHMENT_FILE_LIST
- with an empty value ATTACHMENT_STREAM_LIST
- with an empty value HARD_DEPENDENCIES
- empty list of batch job Id on which this batch job depends on, using the hard dependency rule SOFT_DEPENDENCIES
- empty list of batch job Id on which this batch job depends on, using the soft dependency rule ImportJobAttributeDict
- dict ImportJobAttributeDict
has the following dict keys Function
- name of the function ImportObjectId
- Object Id/Key string TransferDirection
- string for MonitorCounters example "SAP2TC", set to default "TC_IMPORT" if not specified ZTabId
z-table id - set to default "NONE" SessionId
- unique session ID for the Teamcenter session, set to BATCH Filter4CLIENT
- set to "NONE" AdditionalInfo
- optional - any additional info, set to NONE if not given T4X::BATCHJOB::IMPORT::procedureExists | procedureName | ||
Generate Proxy for WebServer
::ProxyGen::createWebServer import_trigger_xi ::T4X::BATCHJOB::IMPORT::XI_Trigger_Import
T4X::BATCHJOB::IMPORT::setHardDependencyList | DependencyDict DependencyList | ||
This function updates a dict with a list of hard dependencies.
DependencyDict | dict |
DependencyList | list of dependencies |
T4X::BATCHJOB::IMPORT::setImportJobAttributeDict | JobAttributeDict ImportJobAttributeName NewValue | ||
This function updates the internal ImportJobAttributeDict buffer that is used in the following createJob.
JobAttributeDict | dict |
ImportJobAttributeName | dict key |
NewValue | new value |
Referenced by setImportJobObjectId(), and setImportJobTransferDirection().
T4X::BATCHJOB::IMPORT::setImportJobObjectId | JobAttributeDict ImportObjectKey | ||
This function updates the internal ImportJobAttributeDict buffer that is used in the following createJob.
JobAttributeDict | dict |
ImportObjectKey | Object Key |
References setImportJobAttributeDict().
T4X::BATCHJOB::IMPORT::setImportJobTransferDirection | JobAttributeDict TransferDirection | ||
This function updates the internal ImportJobAttributeDict buffer that is used in the following createJob.
JobAttributeDict | dict |
TransferDirection | string for MonitorCounters example "SAP2TC" |
References setImportJobAttributeDict().
T4X::BATCHJOB::IMPORT::setJobAttributes | JobAttributeDict JobAttributeName NewValue | ||
This function sets the defined JobAttribute in the provided JobAttributeDict to the new specified value.
JobAttributeDict | dict |
JobAttributeName | name of job attribute |
NewValue | new value |
Referenced by setJobDescription().
T4X::BATCHJOB::IMPORT::setJobDescription | JobAttributeDict JobDescription | ||
This function sets the JobDescription in the provided JobAttributeDict.
JobAttributeDict | dict |
JobDescription | job description displayed in the Admin UI |
References setJobAttributes().
T4X::BATCHJOB::IMPORT::setSoftDependencyList | DependencyDict DependencyList | ||
This function updates a dict with a list of soft dependencies.
DependencyDict | dict |
DependencyList | list of dependencies |
T4X::BATCHJOB::IMPORT::updateStatus4ZTableId | LogChannelName FunctionName ZTabId Status ?Error_Msg1? ?Error_Msg2? ?Error_Msg3? args | ||
This function updates status of given entry in the Z-Table.
LogChannelName | channel for the logging |
FunctionName | z-table update procedure name |
ZTabId | z-table id |
Status | OK / SKIPPED / ERROR |
Error_Msg1 | optional, initialised with "" if not given and the following parameter are not set |
Error_Msg2 | optional, initialised with "" if not given and the following parameter are not set |
Error_Msg3 | optional, initialised with "" if not given |
References tpwrite(), and writeTransactionLog().
T4X::BATCHJOB::IMPORT::writeTransactionLog | AppLogTransactionId FunctionName Status args | ||
This function writes the given information to the transaction log.
AppLogTransactionId | transaction log |
FunctionName | function name |
Status | status |
args | list of messages |
References T4X::CORE::getSessionLogChannel(), tpwrite(), and T4X::TRANSLOG::writeImportStatusInfoLog().
Referenced by updateStatus4ZTableId().
|
static |
Namespace array buffer to define defaults for the Export Job processing. For each registered export job type a separate set of defaults are defined during the registration. The following array elements are defined ($FunctionName stands for the registered JobTypeName):
BatchjobDefaults(BatchJobPrio:$FunctionName) Defines the default priority in the job pool (default: 20)
BatchjobDefaults(BatchJobTimeout:$FunctionName) Defines the default job processing timeout for a job (default: 3600)
BatchjobDefaults(MaxRetryCounter:$FunctionName) Defines the maximum number of job execution retries in the case of a detected application error (default: 1)
BatchjobDefaults(DefaultRetryTime:$FunctionName) Defines a delay in seconds after a job the is sent into retry
BatchjobDefaults(useBypassPrivilege:$FunctionName) Activate the bypass privilege during the job execution (default: true)
In addition there is also a generic setting for the default execution time window:
BatchjobDefaults(DefaultTimeWindow) Defines the default job execution time window (default: "No TimeWindow")