T4S4  18.2 C7549 A21431
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...
 
 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...
 
 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...
 
 setConnectionInfo2 System Client CryptUser CryptPasswd Language ?Mode? ?TargetType? ?TransAction?
 setConnectionInfo2 stores the encrypted 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...
 

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 T4X::CONNECTION2EA::checkConnection2EA().

◆ 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 T4X::CONNECTION2EA::checkConnection2EA4Batchjob().

◆ 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.

Deprecated:
Please use T4X::CONNECTION2EA::checkConnection2EA4Session.
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::CONNECTION2EA::checkConnection2EA4Session().

◆ 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.

Deprecated:
Please use T4X::CONNECTION2EA::checkConnection2EA4Transaction.
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 T4X::CONNECTION2EA::checkConnection2EA4Transaction().

◆ 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.

Deprecated:
Please use T4X::CONNECTION2EA::deleteConnectionInfo.
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 T4X::CONNECTION2EA::deleteConnectionInfo().

◆ 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

Deprecated:
Please use T4X::CONNECTION2EA::selectActiveConnection2EA.
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::setConnectionInfoPlain2 DV1 800 $DV1_800_User $DV1_800_Password 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 $DV2_800_User $DV2_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 T4X::CONNECTION2EA::selectActiveConnection2EA().

◆ 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 ::T4X::CONNECTION2EA::selectActiveConnection2RA.
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 # --------------------------------------------------

References T4X::CONNECTION2EA::setConnectionInfo().

◆ 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 T4X::CONNECTION2EA::selectActiveConnection2EA.
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 T4X::CONNECTION2EA::setConnectionInfo().

◆ 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 tpco_shmset().

◆ testSAPLogin()

T4S::CONNECTION2SAP::testSAPLogin   args  

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

Deprecated:
Please use T4X::CONNECTION2EA::testEALogin.
Parameters
argsnone
Returns
OK|ERROR

References T4X::CONNECTION2EA::testEALogin().

◆ 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().

◆ 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.

Deprecated:
Please use T4X::CONNECTION2EA::verifyConnection2EASystem4Session.
Parameters
SessionIdunique session ID for the users Teamcenter session
SapSystem
SapClient
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::CONNECTION2EA::verifyConnection2EASystem4Session().