![]() |
T4S4
18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
|
Functions | |
addFileAttachment JobAttributeDict FileName | |
This function adds the given FileInformation to the given AttachmentDict and returns the updated dict. More... | |
addStreamAttachment AttachmentDict StreamName Stream | |
This function adds the given StreamAttachment to the given AttachmentDict and returns the updated dict. More... | |
checkConnection2ERP FunctionName SessionId ?Mode? ?strObjectType? ?strAction? args | |
Read the current stored ERP login info's for a given Teamcenter Session Id and tests the connection. More... | |
createBatchjob BatchJobId FunctionName ObjectTag ObjectClassName ObjectType ObjectId ObjectRevisionId ?TransferDirection? ?UseServices? ?SessionId? ?Filter? ?TargetTypeName? ?DependOnIds? args | |
This function creates batch job to export Teamcenter item to SAP/ESB/... More... | |
createBatchjob2 BatchJobDict args | |
This function creates batch job to export Teamcenter item to SAP/ESB/... More... | |
CreateExportCodeProxy FunctionName ConnectFct GetDataFct MappingFct ActionHandlerFct ReverseMappingFct InitFct CleanUpFct ?T4Target? args | |
create a generic export batch job code More... | |
CreateExportMetaCodeProxy FunctionName MetaFct InitFct CleanUpFct ?T4Target? args | |
create a generic export batch job code for meta jobs More... | |
CreateExportServicesCodeProxy FunctionName GetDataFct MappingFct InitFct CleanUpFct ?T4Target? args | |
create a generic export batch job code for the services More... | |
createJob FunctionName JobAttributeDict | |
This function creates batch job to import SAP/ESB/... item to Teamcenter. More... | |
executeExportJob FunctionName ObjectClass ObjectType ObjectTag ObjectId ObjectRevId ?TransferDirection? ?RunMode? ?UseServicesOnly? ?TargetTypeName? args | |
executes an export of a Teamcenter object to a target system More... | |
executeExportJob2 ExportDict | |
executes an export of a Teamcenter object to a target system More... | |
handleBatchJob ExecuteFunction JobId ObjectClass ObjectType ObjectTag ObjectId ObjectRev TransferDirection UseServicesOnly TargetTypeName AdditionalInfo | |
This function makes necessary settings and checks (dependency), executes the export code and sets the batch job status. More... | |
initExportJobAttributes JobAttributeDict FunctionName | |
This function create a structure and that initializes the JobAttribute buffer argument of the new createJob call. More... | |
initJobAttributeStructure JobDescriptionPrefix FunctionName | |
This function create a structure and that initializes the JobAttribute buffer argument of the new createJob call. More... | |
setExportJobAttributeDict JobAttributeDict ExportJobAttributeDict NewValue | |
This function updates the internal ExportJobAttributeDict buffer that is used in the following createJob. More... | |
setExportJobObjectIdentifier JobAttributeDict ObjectTag ObjectClassName ObjectType ObjectId ObjectRevisionId | |
This function updates the internal ExportJobAttributeDict buffer that is used in the following createJob. More... | |
setExportJobTransferDirection JobAttributeDict TransferDirection | |
This function creates a buffer and that initializes the ExportJobAttributeDict argument of the new createJob call. More... | |
setHardDependencyList DependencyDict DependencyList | |
This function updates a dict with a list of hard dependencies. More... | |
setJobAttributes JobAttributeDict JobAttributeName NewValue | |
This function sets the a 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... | |
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) BatchjobDefaults(DefaultTimeWindow) Defines the default job execution time window (default: "No TimeWindow") More... | |
T4X::BATCHJOB::EXPORT::addFileAttachment | JobAttributeDict FileName | ||
This function adds the given FileInformation to the given AttachmentDict and returns the updated dict.
AttachmentDict | |
FileName | String containing the file location |
T4X::BATCHJOB::EXPORT::addStreamAttachment | AttachmentDict StreamName Stream | ||
This function adds the given StreamAttachment to the given AttachmentDict and returns the updated dict.
AttachmentDict | |
StreamName | Name of the attachment stream |
Stream | String representing the steam content |
T4X::BATCHJOB::EXPORT::checkConnection2ERP | FunctionName SessionId ?Mode? ?strObjectType? ?strAction? args | ||
Read 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,SAP | 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::EXPORT::createBatchjob | BatchJobId FunctionName ObjectTag ObjectClassName ObjectType ObjectId ObjectRevisionId ?TransferDirection? ?UseServices? ?SessionId? ?Filter? ?TargetTypeName? ?DependOnIds? args | ||
This function creates batch job to export Teamcenter item to SAP/ESB/...
BatchJobId | - Batch job name |
FunctionName | - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy |
ObjectTag | - Teamcenter itemRevision tag |
ObjectClassName | - name of the object class |
ObjectType | - name of the object type |
ObjectId | - Teamcenter item id |
ObjectRevisionId | - Teamcenter item revision id |
TransferDirection | - string for MonitorCounters example "TC2SAP" initialized with "TC_EXPORT" if not given and the following parameter are not set |
UseServices | - 0-no service / 1-use service initialized with "0" if not given and the following parameter are not set |
SessionId | - unique session ID for the Teamcenter session |
Filter | - initialized with "NONE" if not given and the following parameter are not set |
TargetTypeName | - initialized 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 initialized 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().
T4X::BATCHJOB::EXPORT::createBatchjob2 | BatchJobDict args | ||
This function creates batch job to export Teamcenter item to SAP/ESB/...
BatchJobDict | - dict - JOBID - mandatory - Batch job name FUNCTION - mandatory - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy OBJECTTAG - mandatory - Teamcenter itemRevision tag OBJECTCLASS - mandatory - name of the object class OBJECTTYPE - mandatory - name of the object type OBJECTID - mandatory - Teamcenter item id OBJECTREV - mandatory - Teamcenter item revision id SERVICES - optional - 0-no service / 1-use service, set to "0" if not given TRANSFER - optional - string for MonitorCounters example "TC2SAP", set to "TC_EXPORT" if not given SESSIONID - optional - unique session ID for the Teamcenter session, set to BATCH if not given FILTER - optional - set to "NONE" if not given DEPENDENCIES - optional - list of batch job Id on which this batch job depends on, set to empty list if not given ADDITIONALINFO - optional - any additional info, set to empty list if not given |
References createBatchjob(), and T4X::BATCHJOB::TOOLBOX::getDictValue().
T4X::BATCHJOB::EXPORT::CreateExportCodeProxy | FunctionName ConnectFct GetDataFct MappingFct ActionHandlerFct ReverseMappingFct InitFct CleanUpFct ?T4Target? args | ||
create a generic export batch job code
FunctionName | - name of the procedure to create |
ConnectFct | - name of the procedure to connect the ERP |
GetDataFct | - name of the procedure to get the Teamcenter data |
MappingFct | - mapping function |
ActionHandlerFct | - action handler procedure name |
ReverseMappingFct | - reverse mapping procedure name |
InitFct | - initialise function, called at the beginning |
CleanUpFct | - clean up function, called at the end |
T4Target | - defines the used base product feature (T4S|T4O|T4EA) to execute the batch job |
References T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults().
T4X::BATCHJOB::EXPORT::CreateExportMetaCodeProxy | FunctionName MetaFct InitFct CleanUpFct ?T4Target? args | ||
create a generic export batch job code for meta jobs
FunctionName | - name of the procedure to create |
MetaFct | - name of the procedure to run the meta job |
InitFct | - initialise function, called at the beginning |
CleanUpFct | - clean up function, called at the end |
T4Target | - defines the used base product feature (T4S|T4O|T4EA) to execute the batch job |
References T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults().
T4X::BATCHJOB::EXPORT::CreateExportServicesCodeProxy | FunctionName GetDataFct MappingFct InitFct CleanUpFct ?T4Target? args | ||
create a generic export batch job code for the services
FunctionName | - name of the procedure to create |
GetDataFct | - name of the procedure to get the Teamcenter data |
MappingFct | - mapping function |
InitFct | - initialise function, called at the beginning |
CleanUpFct | - clean up function, called at the end |
T4Target | - defines the used base product feature (T4S|T4O|T4EA) to execute the batch job |
References T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults().
T4X::BATCHJOB::EXPORT::createJob | FunctionName JobAttributeDict | ||
This function creates batch job to import SAP/ESB/... item to Teamcenter.
FunctionName | - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy |
BGS_CONID
defines the used BGS host to create the job in the pool JOB_DESCRIPTION
job description displayed in the Admin UIATTACHMENT_FILE_LIST
- optional - list of file attachments for the job, if not specified the list will be empty ATTACHMENT_STREAM_LIST
- optional - list of stream attachments for the job, if not specified the list will be emptyHARD_DEPENDENCIES
- optional - list of batch job Id on which this batch job depends on, set to empty list if not given SOFT_DEPENDENCIES
- optional - list of batch job Id on which this batch job depends on, set to empty list if not givenExportJobAttributeDict
dict with the following dict keys Function
name of the function ObjectTag
- Teamcenter itemRevision tag ObjectClassName
- name of the object class ObjectType
- name of the object type ObjectId
- Teamcenter item id ObjectRevisionId
- Teamcenter item revision id TransferDirection
string for MonitorCounters example "TC2SAP", set to default "TC_EXPORT" if not specified SessionId
unique session ID for the Teamcenter session, set to BATCH Filter4CLIENT
- set to "NONE" AdditionalInfo
- optional - any additional infoSample code sequence
References API::Core::Batch::compressB64String(), 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::setJobAttachmentByStream(), API::Core::Batch::setJobAttachmentByStream2(), API::Core::Batch::setJobAttribute(), API::Core::Batch::setObjectAttribute(), API::Core::Batch::setSoftDependency(), and tpwrite().
T4X::BATCHJOB::EXPORT::executeExportJob | FunctionName ObjectClass ObjectType ObjectTag ObjectId ObjectRevId ?TransferDirection? ?RunMode? ?UseServicesOnly? ?TargetTypeName? args | ||
executes an export of a Teamcenter object to a target system
FunctionName | - name of the procedure to call for the export |
ObjectClass | - name of object class |
ObjectType | - name of the object type |
ObjectTag | - Teamcenter object tag |
ObjectId | - object id |
ObjectRevId | - object revision id |
TransferDirection | - string for MonitorCounters example "TC2SAP" initialized with "TC_EXPORT" if not given and the following parameter are not set |
RunMode | - for Batch job mode has to be set to "BatchJob", anything else means no batch job mode initialized with "BatchJob" if not given and the following parameter are not set |
UseServicesOnly | - 0-no service / 1-use service initialized with "0" if not given and the following parameter are not set |
TargetTypeName | - initialized with "NONE" if not given and the following parameter are not set |
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::TRANSLOG::startTransactionLog(), T4X::TRANSLOG::stopTransactionLog(), tpco_formatHEX16(), tpco_tcddelete(), tpwrite(), T4X::TRANSLOG::writeTcSysLogFileEntry(), and T4X::BATCHJOB::TOOLBOX::writeTcUser2LogIndex().
Referenced by executeExportJob2(), and handleBatchJob().
T4X::BATCHJOB::EXPORT::executeExportJob2 | ExportDict | ||
executes an export of a Teamcenter object to a target system
ExportDict | - dict - FUNCTION - mandatory - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy OBJECTTAG - mandatory - Teamcenter itemRevision tag OBJECTCLASS - mandatory - name of the object class OBJECTTYPE - mandatory - name of the object type OBJECTID - mandatory - Teamcenter item id OBJECTREV - mandatory - Teamcenter item revision id SERVICES - optional - 0-no service / 1-use service, set to "0" if not given TRANSFER - optional - string for MonitorCounters example "TC2SAP", set to "TC_EXPORT" if not given RUNMODE - mandatory for direct mode - "BatchJob" is set as default and means its in batch job mode, anything else means direct mode TARGETTYPE - optional - initialised with "NONE" if not given ADDITIONALINFO - optional - any additional info, set to empty list if not given |
References executeExportJob(), T4X::BATCHJOB::TOOLBOX::getDictValue(), and tpwrite().
T4X::BATCHJOB::EXPORT::handleBatchJob | ExecuteFunction JobId ObjectClass ObjectType ObjectTag ObjectId ObjectRev TransferDirection UseServicesOnly TargetTypeName AdditionalInfo | ||
This function makes necessary settings and checks (dependency), executes the export code and sets the batch job status.
ExecuteFunction | - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy |
JobId | - unique batch job id |
ObjectClass | - name of the object class |
ObjectType | - name of the object type |
ObjectTag | - Teamcenter itemRevision tag |
ObjectId | - Teamcenter item id |
ObjectRev | - Teamcenter item revision id |
TransferDirection | - string for MonitorCounters example "TC2SAP" |
UseServicesOnly | - 0-no service / 1-use service |
TargetTypeName | |
AdditionalInfo |
References API::Core::Batch::connectTo(), API::Core::Batch::disconnect(), executeExportJob(), ITK::getConnectionParameters(), T4X::BATCHJOB::TOOLBOX::logStatusInfo(), T4X::BATCHJOB::TOOLBOX::setBatchjobStatus(), T4X::BATCHJOB::TOOLBOX::setJobMessage(), and tpwrite().
T4X::BATCHJOB::EXPORT::initExportJobAttributes | JobAttributeDict FunctionName | ||
This function create a structure and that initializes the JobAttribute buffer argument of the new createJob call.
FunctionName | - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy |
\li \c ExportJobAttributeDict dict with the following dict keys \c Function name of the function \c ObjectTag - Teamcenter itemRevision tag \c ObjectClassName - name of the object class \c ObjectType - name of the object type \c ObjectId - Teamcenter item id \c ObjectRevisionId - Teamcenter item revision id \c TransferDirection string for MonitorCounters example "TC2SAP", set to default "TC_EXPORT" if not specified \c SessionId unique session ID for the Teamcenter session, set to BATCH \c UseServicesOnly - defaulted to 0 \c Filter4CLIENT - set to "NONE" \c AdditionalInfo - optional - any additional info \c TargetTypeName - defines the transfer target type name part of used preference set defaulted to NONE
Referenced by initJobAttributeStructure().
T4X::BATCHJOB::EXPORT::initJobAttributeStructure | JobDescriptionPrefix FunctionName | ||
This function create a structure and that initializes the JobAttribute buffer argument of the new createJob call.
JobDescriptionPrefix | - Job description prefix, also used to initialize the JOB_DESCRIPTION that is used by the Admin UI |
FunctionName | - name of the export function created with the proxy call CreateExportCodeProxy/CreateExportServicesCodeProxy/CreateExportMetaCodeProxy |
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 nightATTACHMENT_FILE_LIST
with an empty value ATTACHMENT_STREAM_LIST
with an empty valueHARD_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 ruleExportJobAttributeDict
dict with the following dict keys Function
name of the function ImportObjectId
Object Id/Key string TransferDirection
string for MonitorCounters example "TC2SAP", set to default "TC_EXPORT" if not specified SessionId
unique session ID for the Teamcenter session, set to BATCH Filter4CLIENT
- set to "NONE" AdditionalInfo
- optional - any additional info References initExportJobAttributes().
T4X::BATCHJOB::EXPORT::setExportJobAttributeDict | JobAttributeDict ExportJobAttributeDict NewValue | ||
This function updates the internal ExportJobAttributeDict buffer that is used in the following createJob.
JobAttributeDict | |
ExportJobAttributeDict | |
NewValue |
Referenced by setExportJobTransferDirection().
T4X::BATCHJOB::EXPORT::setExportJobObjectIdentifier | JobAttributeDict ObjectTag ObjectClassName ObjectType ObjectId ObjectRevisionId | ||
This function updates the internal ExportJobAttributeDict buffer that is used in the following createJob.
JobAttributeDict | |
ObjectTag | - Teamcenter itemRevision tag |
ObjectClassName | - name of the object class |
ObjectType | - name of the object type |
ObjectId | - Teamcenter item id |
ObjectRevisionId | - Teamcenter item revision id |
T4X::BATCHJOB::EXPORT::setExportJobTransferDirection | JobAttributeDict TransferDirection | ||
This function creates a buffer and that initializes the ExportJobAttributeDict argument of the new createJob call.
JobAttributeDict | |
TransferDirection | - string for MonitorCounters example "SAP2TC" |
References setExportJobAttributeDict().
T4X::BATCHJOB::EXPORT::setHardDependencyList | DependencyDict DependencyList | ||
This function updates a dict with a list of hard dependencies.
T4X::BATCHJOB::EXPORT::setJobAttributes | JobAttributeDict JobAttributeName NewValue | ||
This function sets the a defined JobAttribute in the provided JobAttributeDict to the new specified value.
JobAttributeDict | |
NewValue | |
JobDescription | job description displayed in the Admin UI |
T4X::BATCHJOB::EXPORT::setJobDescription | JobAttributeDict JobDescription | ||
This function sets the JobDescription in the provided JobAttributeDict.
JobDescription | job description displayed in the Admin UI |
T4X::BATCHJOB::EXPORT::setSoftDependencyList | DependencyDict DependencyList | ||
This function updates a dict with a list of soft dependencies.
|
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)
BatchjobDefaults(DefaultTimeWindow) Defines the default job execution time window (default: "No TimeWindow")