T4S4  18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
T4S::CONNECTION2SAP Namespace Reference

Functions

 checkConnection2SAP ?Mode? ?TargetType? ?TransAction?
 Read the current stored SAP login info's and tests the connection. More...
 
 checkConnection2SAP4Batchjob SessionId ?Mode? ?TargetType? ?TransAction?
 Read the current stored SAP login info's for a given Teamcenter Session Id and tests the connection. More...
 
 checkConnection2SAP4Session SessionId ?Mode? ?TargetType? ?TransAction?
 Read the current stored SAP login info's for a given Teamcenter Session Id and tests the connection. More...
 
 checkConnection2SAP4Transaction SessionId TransactionId ?Mode? ?TargetType? ?TransAction?
 Read the current stored SAP login info's for a given Teamcenter Session Id and tests the connection. More...
 
 checkConnection2SAP_legacy ?Mode? ?TargetType? ?TransAction?
 Read the current stored SAP login info's and tests the connection. More...
 
 deleteConnectionInfo System Client ?Mode? ?TargetType? ?TransAction?
 deleteConnectionInfo deletes the SAP technical user connection info from the internal shared memory buffer defined by the T4S::CONNECTION2SAP::setConnectionInfoPlain2 or T4S::CONNECTION2SAP::setConnectionInfo2 call for specific parameter combination. More...
 
 formatSystemClientId SAPSystem Client args
 returns given SAP System and Client in a defined string format More...
 
 getWebGuiConfig ?System? ?Client?
 getWebGuiConfig returns the URL configuration information to start the URL based GUI for a given SAP system More...
 
 selectActiveConnection2SAP SessionId SAPSystem Client args
 defines a given SAP System/Client as active More...
 
 setConnectionInfo System Client CryptUser CryptPasswd Language ?LogOnIniMode? ?Mode? ?TargetType? ?TransAction?
 setConnectionInfo stores the encrypted connection info into the internal shared memory buffer. More...
 
 setConnectionInfo2 System Client CryptUser CryptPasswd Language ?Mode? ?TargetType? ?TransAction?
 setConnectionInfo2 stores the encrypted connection info into the internal shared memory buffer. More...
 
 setConnectionInfoPlain System Client User Passwd Language ?LogOnIniMode? ?Mode? ?TargetType? ?TransAction?
 setConnectionInfoPlain encrypts the user and password and stores the connection info into the internal shared memory buffer. More...
 
 setConnectionInfoPlain2 System Client User Passwd Language ?Mode? ?TargetType? ?TransAction?
 setConnectionInfoPlain2 encrypts the user and password and stores the connection info into the internal shared memory buffer. More...
 
 storeWebGuiConfig System Client BaseUrl ?UsePortalGui? ?GuiType?
 storeWebGuiConfig stores the configuration information for a given SAP system that is used to build the corresponding URL for the browser call into the internal shared memory buffer More...
 
 testSAPLogin args
 testSAPLogin read the current stored SAP login info's for the testscript env and tests the connection More...
 
 validateAccess2SCSI_GET_SYSTEM_INFO args
 This call validates if T4S can call SCSI_GET_SYSTEM_INFO. More...
 
 validatePasswordState4User SessionId
 This function validates, if the current user password is expired for the current connection. More...
 
 verifyConnection2SAPSytem4Session SessionId SapSystem SapClient ?Mode? ?TargetType? ?TransAction?
 Read the current stored SAP login info's for a given Teamcenter Session Id, SAP System/client and tests the connection. More...
 

Variables

 CtrlParam
 
 SapConnection
 
 SapInfo
 

Function Documentation

◆ checkConnection2SAP()

T4S::CONNECTION2SAP::checkConnection2SAP   ?Mode? ?TargetType? ?TransAction?  

Read the current stored SAP login info's and tests the connection.

Parameters
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
LOGON_OK|LOGON_ERROR|MISSING_LOGIN_DATA

References T4X::CORE::getSessionLogChannel(), T4X::CORE::storeMessage2(), tpco_formatHEX16(), tpwrite(), and validateAccess2SCSI_GET_SYSTEM_INFO().

Referenced by testSAPLogin().

◆ checkConnection2SAP4Batchjob()

T4S::CONNECTION2SAP::checkConnection2SAP4Batchjob   SessionId ?Mode? ?TargetType? ?TransAction?  

Read the current stored SAP login info's for a given Teamcenter Session Id and tests the connection.

Parameters
SessionIdunique session ID for the users Teamcenter session
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
LOGON_OK|LOGON_ERROR|MISSING_LOGIN_DATA

References checkConnection2SAP4Session().

◆ checkConnection2SAP4Session()

T4S::CONNECTION2SAP::checkConnection2SAP4Session   SessionId ?Mode? ?TargetType? ?TransAction?  

Read the current stored SAP login info's for a given Teamcenter Session Id and tests the connection.

Parameters
SessionIdunique session ID for the users Teamcenter session
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
LOGON_OK|LOGON_ERROR|MISSING_LOGIN_DATA

References T4X::TC::MAPPING::getWorkflowArgumentValue3(), and selectActiveConnection2SAP().

Referenced by checkConnection2SAP4Batchjob(), and checkConnection2SAP4Transaction().

◆ checkConnection2SAP4Transaction()

T4S::CONNECTION2SAP::checkConnection2SAP4Transaction   SessionId TransactionId ?Mode? ?TargetType? ?TransAction?  

Read the current stored SAP login info's for a given Teamcenter Session Id and tests the connection.

Parameters
TransactionIdunique logfile name to log messages in the trans log file
SessionIdunique session ID for the users Teamcenter session
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
LOGON_OK|LOGON_ERROR|MISSING_LOGIN_DATA

References checkConnection2SAP4Session().

◆ checkConnection2SAP_legacy()

T4S::CONNECTION2SAP::checkConnection2SAP_legacy   ?Mode? ?TargetType? ?TransAction?  

Read the current stored SAP login info's and tests the connection.

Parameters
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
LOGON_OK|LOGON_ERROR|MISSING_LOGIN_DATA

References T4X::CORE::getSessionLogChannel(), T4X::CORE::storeMessage2(), tpco_formatHEX16(), tpwrite(), and validateAccess2SCSI_GET_SYSTEM_INFO().

◆ deleteConnectionInfo()

T4S::CONNECTION2SAP::deleteConnectionInfo   System Client ?Mode? ?TargetType? ?TransAction?  

deleteConnectionInfo deletes the SAP technical user connection info from the internal shared memory buffer defined by the T4S::CONNECTION2SAP::setConnectionInfoPlain2 or T4S::CONNECTION2SAP::setConnectionInfo2 call for specific parameter combination.

Parameters
SystemSAP System Id
ClientSAP Client Id (e.g. 800)
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
None

References formatSystemClientId(), tpco_closeSrvSession(), tpco_connectTo(), and tpco_shmdelete().

◆ formatSystemClientId()

T4S::CONNECTION2SAP::formatSystemClientId   SAPSystem Client args  

returns given SAP System and Client in a defined string format

Referenced by deleteConnectionInfo(), selectActiveConnection2SAP(), and storeWebGuiConfig().

◆ getWebGuiConfig()

T4S::CONNECTION2SAP::getWebGuiConfig   ?System? ?Client?  

getWebGuiConfig returns the URL configuration information to start the URL based GUI for a given SAP system

Parameters
Systemoptional, if it is not specified we use the information about the current connection
Client
Returns
UrlConfig dict or NOT_FOUND

References tpco_shmget().

◆ selectActiveConnection2SAP()

T4S::CONNECTION2SAP::selectActiveConnection2SAP   SessionId SAPSystem Client args  

defines a given SAP System/Client as active

Parameters
SessionIdunique session ID for the users Teamcenter session or if you specific "*" the default connection for all sessions.
SAPSystemSAP system identification used in the destination definition of the sapnwrfc.ini
ClientSAP client identification (e.g. 800)
Returns
None

Configuration samples

1 # --------------------------------------------------
2 # In this case we store the credentials for the SAP system DV1 and client 800
3 # --------------------------------------------------
4 ::T4S::CONNECTION2SAP::setConnectionInfo2 DV1 800 $encryptedDV1_800_User $encryptedDV1_800_Password EN]
5 # --------------------------------------------------
6 # In this case we store the credentials for the SAP system DV2 and client 800
7 # --------------------------------------------------
8 ::T4S::CONNECTION2SAP::setConnectionInfo2 DV2 800 $encryptedDV2_800_User $encryptedDV2_800_Password EN]
9 # --------------------------------------------------
10 # In this case we select the SAP system DV1 and client 800 as our default SAP target system
11 # --------------------------------------------------

References formatSystemClientId(), and tpco_shmset().

Referenced by checkConnection2SAP4Session(), testSAPLogin(), and verifyConnection2SAPSytem4Session().

◆ setConnectionInfo()

T4S::CONNECTION2SAP::setConnectionInfo   System Client CryptUser CryptPasswd Language ?LogOnIniMode? ?Mode? ?TargetType? ?TransAction?  

setConnectionInfo stores the encrypted connection info into the internal shared memory buffer.

Remarks
The user and password have to be encrypted by using the "T4x Password Crypt" test script available in the BGS AdminGui.
Deprecated:
T4S::CONNECTION2SAP::setConnectionInfo is deprecated, please use T4S::CONNECTION2SAP::setConnectionInfo2.
Parameters
SystemSAP system identification used in the destination definition of the sapnwrfc.ini
ClientThe Client id that is used as to login.
CryptUserEncrypted SAP user id string
CryptPasswdEncrypted password string for the SAP specified user id
LanguageSpecifies the two-character ISO-Code (like EN for English, KO for Korean) base logon language.
LogOnIniModeUSE_SAPRFCINI|USE_SAGLOGONINI
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
None

References setConnectionInfo2().

◆ setConnectionInfo2()

T4S::CONNECTION2SAP::setConnectionInfo2   System Client CryptUser CryptPasswd Language ?Mode? ?TargetType? ?TransAction?  

setConnectionInfo2 stores the encrypted connection info into the internal shared memory buffer.

Remarks
The user and password have to be encrypted by using the "T4x Password Crypt" test script available in the BGS AdminGui.
The T4S::CONNECTION2SAP::setConnectionInfo2 is only storing the credential information, but it is not defining the default SAP target system for that you need to use the function T4S::CONNECTION2SAP::selectActiveConnection2SAP.
Parameters
SystemSAP system identification used in the destination definition of the sapnwrfc.ini
ClientThe Client id that is used as to login.
CryptUserEncrypted SAP user id string
CryptPasswdEncrypted password string for the SAP specified user id
LanguageSpecifies the two-character ISO-Code (like EN for English, KO for Korean) base logon language.
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
None

Configuration samples

1 # --------------------------------------------------
2 # In this case we store the credentials for the SAP system DV1 and client 800
3 # --------------------------------------------------
4 ::T4S::CONNECTION2SAP::setConnectionInfo2 DV1 800 $encryptedDV1_800_User $encryptedDV1_800_Password EN]
5 # --------------------------------------------------
6 # In this case we store the credentials for the SAP system DV2 and client 800
7 # --------------------------------------------------
8 ::T4S::CONNECTION2SAP::setConnectionInfo2 DV2 800 $encryptedDV2_800_User $encryptedDV2_800_Password EN]
9 # --------------------------------------------------
10 # In this case we select the SAP system DV1 and client 800 as our default SAP target system
11 # --------------------------------------------------

Referenced by setConnectionInfo(), and setConnectionInfoPlain2().

◆ setConnectionInfoPlain()

T4S::CONNECTION2SAP::setConnectionInfoPlain   System Client User Passwd Language ?LogOnIniMode? ?Mode? ?TargetType? ?TransAction?  

setConnectionInfoPlain encrypts the user and password and stores the connection info into the internal shared memory buffer.

Deprecated:
T4S::CONNECTION2SAP::setConnectionInfoPlain is deprecated, please use T4S::CONNECTION2SAP::setConnectionInfoPlain2.
Parameters
SystemSAP system identification used in the destination definition of the sapnwrfc.ini
ClientThe Client id that is used as to login.
UserSAP user id
PasswdPassword for the SAP specified user id
LanguageSpecifies the two-character ISO-Code (like EN for English, KO for Korean) base logon language.
LogOnIniModeUSE_SAPRFCINI|USE_SAGLOGONINI
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
None

References setConnectionInfoPlain2().

◆ setConnectionInfoPlain2()

T4S::CONNECTION2SAP::setConnectionInfoPlain2   System Client User Passwd Language ?Mode? ?TargetType? ?TransAction?  

setConnectionInfoPlain2 encrypts the user and password and stores the connection info into the internal shared memory buffer.

Remarks
The T4S::CONNECTION2SAP::setConnectionInfoPlain2 is only storing the credential information, but it is not defining the default SAP target system for that you need to use the function T4S::CONNECTION2SAP::selectActiveConnection2SAP.
Parameters
SystemSAP system identification used in the destination definition of the sapnwrfc.ini
ClientThe Client id that is used as to login.
UserSAP user id
PasswdPassword for the SAP specified user id
LanguageSpecifies the two-character ISO-Code (like EN for English, KO for Korean) base logon language.
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
None

Configuration samples

1 # --------------------------------------------------
2 # In this case we store the credentials for the SAP system DV1 and client 800
3 # --------------------------------------------------
4 ::T4S::CONNECTION2SAP::setConnectionInfoPlain2 DV1 800 userName mypassword EN]
5 # --------------------------------------------------
6 # In this case we store the credentials for the SAP system DV2 and client 800
7 # --------------------------------------------------
8 ::T4S::CONNECTION2SAP::setConnectionInfoPlain2 DV2 800 userName mypassword EN]
9 # --------------------------------------------------
10 # In this case we select the SAP system DV1 and client 800 as our default SAP target system
11 # --------------------------------------------------

References setConnectionInfo2(), and tpco_encrypt().

Referenced by setConnectionInfoPlain().

◆ storeWebGuiConfig()

T4S::CONNECTION2SAP::storeWebGuiConfig   System Client BaseUrl ?UsePortalGui? ?GuiType?  

storeWebGuiConfig stores the configuration information for a given SAP system that is used to build the corresponding URL for the browser call into the internal shared memory buffer

Parameters
SystemSAP system identification used in the destination definition of the sapnwrfc.ini
Client
BaseUrlFix part of the URL to call
UsePortalGuiDefines if the SAP transaction is called via the SAP portal or via the SAPgui for HTML. default = false
GuiType(WebGui|WinGui) defines if the SAPgui for Windows or the SAPgui for HTML is used default = WebGui
Returns
OK

Configuration samples

1 # --------------------------------------------------
2 # In this case we store the base URL for SAPGUI for HTML configuration for the
3 # SAP system ET1 and client 800
4 # --------------------------------------------------
5 ::T4S::CONNECTION2SAP::storeWebGuiConfig ET1 800 "http://sapsrv.tesis.de:8020/sap/bc/gui/sap/its/webgui?~transaction="
6 
7 # --------------------------------------------------
8 # In this case we store the base URL for SAP Enterprise Portal configuration for the
9 # SAP system ET2 and client 800
10 # --------------------------------------------------
11 ::T4S::CONNECTION2SAP::storeWebGuiConfig ET2 800 "http://sapep2.tesis.de:50000/irj/portal?NavigationTarget=ROLES://portal_content/TESIS/sap_transaction_iview&System=de_tesis_ET2_800&TCode=" true
12 
13 # --------------------------------------------------
14 # In this case we store the base URL for SAP Enterprise Portal configuration for the
15 # SAP system ET2 and client 800 and we configure that we use the native SAPGUI to start
16 # the SAP transaction
17 # --------------------------------------------------
18 ::T4S::CONNECTION2SAP::storeWebGuiConfig ET2 800 "http://sapep2.tesis.de:50000/irj/portal?NavigationTarget=ROLES://portal_content/TESIS/sap_transaction_iview&System=de_tesis_ET2_800&TCode=" true WinGui

References formatSystemClientId(), and tpco_shmset().

◆ testSAPLogin()

T4S::CONNECTION2SAP::testSAPLogin   args  

testSAPLogin read the current stored SAP login info's for the testscript env and tests the connection

Parameters
argsnone
Returns
OK|ERROR

References checkConnection2SAP(), TPSAP::getReleaseInfo(), and selectActiveConnection2SAP().

◆ validateAccess2SCSI_GET_SYSTEM_INFO()

T4S::CONNECTION2SAP::validateAccess2SCSI_GET_SYSTEM_INFO   args  

This call validates if T4S can call SCSI_GET_SYSTEM_INFO.

Returns
OK, SKIPPED or ERROR with message as TCL list

References T4X::CORE::getSessionLogChannel(), TPSAP::getSystemInfoWithReleaseVersion(), and tpwrite().

Referenced by checkConnection2SAP(), and checkConnection2SAP_legacy().

◆ validatePasswordState4User()

T4S::CONNECTION2SAP::validatePasswordState4User   SessionId  

This function validates, if the current user password is expired for the current connection.

Parameters
SessionId
Returns
LOGON_OK or ERROR

References TPSAP::RfcGetAttributes().

◆ verifyConnection2SAPSytem4Session()

T4S::CONNECTION2SAP::verifyConnection2SAPSytem4Session   SessionId SapSystem SapClient ?Mode? ?TargetType? ?TransAction?  

Read the current stored SAP login info's for a given Teamcenter Session Id, SAP System/client and tests the connection.

Parameters
SapSystem
SapClient
SessionIdunique session ID for the users Teamcenter session
ModeTransfer mode like WORKFLOW, PORTAL, BATCH, RTP, LOV, ... default = "*" for all.
TargetTypeSAP target object type like MM, ECM, ... default = "*" for all.
TransActiontransfer action in the GUI like CREATE, CHANGE, ... default = "*" for all.
Returns
LOGON_OK|LOGON_ERROR|MISSING_LOGIN_DATA

References selectActiveConnection2SAP().

Variable Documentation

◆ CtrlParam

CtrlParam
static

◆ SapConnection

SapConnection
static

◆ SapInfo

SapInfo
static