T4S4  19.1 C8540 A23673
Teamcenter Gateway for SAP S/4HANA API Reference
TPSAP::ECM Namespace Reference

Functions

 call_TESISPLM_ECM_GET_ECM4OBJECT args
 Calls SAP function '/TESISPLM/ECM_GET_ECM4OBJECT'. More...
 
 call_TESISPLM_ECM_OBJMGREC_READ args
 Calls SAP function '/TESISPLM/ECM_OBJMGREC_READ'. More...
 
 call_TESISPLM_ECM_OBJTYPE_DEF_READ args
 Calls SAP function '/TESISPLM/ECM_OBJTYPE_DEF_READ'. More...
 
 call_TESISPLM_ECM_PROFILE_READ args
 Calls SAP function '/TESISPLM/ECM_PROFILE_READ'. More...
 
 callTESISPLMECM_ALTDATE_READ
 
 callTESISPLMECM_EFFECTIVITY_READ
 
 callTESISPLMECM_VALUEASSIGN_READ
 
 ChangeMasterAssignObject2AltDate args
 Assigns an existing object to an existing alternate date for a given ECM in SAP. Pls check the SAP BAPI "CCAP_ASSIGN_OBJECT_TO_ALT_DATE" for more information. More...
 
 ChangeMasterChangeAltDate args
 Changes an existing alternate date for a given ECM in SAP. More...
 
 ChangeMasterCreateAltDate args
 Creates an alternate date for a given ECM in SAP. More...
 
 ChangeMasterDeleteAltDate args
 Deletes an existing alternate date for a given ECM in SAP. More...
 
 createChangeMaster_WithProfile strDescription strProfile strDate args
 This function creates an ECM with ECM profile The OOTB SAP BAPI cannot handle ECM profile To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 
 getChangeMaster4Object strSapObjectKey ?intSapObjectType? ?strSapObjectId?
 Gets all ECMs attached to a given object. More...
 
 getChangeMasterAltDatesList ChangeMaster args
 Returns a list (internal format) of all alt dates attached to the given ChangeMaster. More...
 
 getChangeMasterEffectivity ChangeMaster args
 Returns the effectivity (internal format) fora given ECM. More...
 
 getChangeMasterInfo ChangeNumber ?ReadOBJMGREC? ?ReadAltDates? ?ReadEffectivity? ?ReadMaintVariant? args
 Retrieves detailed SAP change master information. More...
 
 getChangeMasterLongText ChangeNo ?Language? args
 Retrieves the SAP long text for a given ECM. More...
 
 getChangeMasterMultipleHeaders ?ListOfChangeNumbers?
 Retrieves the ChangeMaster header data for a given list of change numbers or all change numbers. More...
 
 getChangeMasterObjectTypeDefinition ?Language? args
 Returns the definition for all existing ECM object types including the ID and the name. More...
 
 getChangeMasterObjMgRecList ChangeMaster args
 Returns a list (internal format) of all objects attached to the given ChangeMaster. More...
 
 getChangeMasterProfileData ChangeMasterProfile ?Language? args
 Returns all settings for a given ECM Change Master Profile. More...
 
 getChangeMasterValueAssign ChangeMaster args
 Returns the value assign (=maintenance variant) data (internal format) for a given ECM. More...
 
 getExternalChangeNumber InternalNumber args
 Retrieves the SAP external change master id for a given SAP internal change master id. More...
 
 getInternalChangeNumber ExternalNumber args
 Retrieves the SAP internal change master id for a given SAP external change master id. More...
 
 getObjectManagementTypesList args
 Gets the list of object management type with the Id and corresponding description via the RFC_READ_TABLE API. More...
 
 initSAPChangeMasterStructure args
 Resets part of the corresponding global TCL ::SAPDat array within the section ChangeMaster. More...
 
 RevisionLevelSelect args
 Returns a specific revision levels by date for a material master or DIR. More...
 
 RevisionLevelTableExport args
 Returns all revision levels for a material master or document info record. More...
 
 setObjectTypeStructure ObjectType ?ACTIVE? ?LOCKED? ?OBJ_REQU? ?MGTREC_GEN? ?GEN_NEW? ?GEN_DIALOG?
 Define the object types for the ECM creation/update structure to enable the modification of objects with the actual change object. More...
 
 setRevisionLevel Mode ObjectId ChangeNumber RevisionLevel args
 Sets the revision level for a given material master or document info record object using the provided change master object via the CCAP_REV_LEVEL_MAINTAIN function module. More...
 
 storeLongText4Description Description ?TEXTKEY? ?TDNAME? ?TDID? ?TDSPRAS?
 Stores the given ChangeMaster description as a SAP long text if its length a greater than 40 chars in the global TCL ::SAPDat array for a future transfer. More...
 
 updateObjectManagementRecord strChangeNumber strObjectDescription ChangeTypeObject strObjectType ObjectId ?DeletetionFlag? args
 Adds, deletes or changes (description) an affected item record for the given object (e.g. MM) to the given ECM in SAP. More...
 
 updateObjectManagementRecord2 strChangeNumber strObjectDescription ChangeTypeObject strObjectType ObjectId ?DeletetionFlag? args
 This call is similar to updateObjectManagementRecord but will convert the affected item number to the internal format before calling SAP. More...
 

Function Documentation

◆ call_TESISPLM_ECM_GET_ECM4OBJECT()

TPSAP::ECM::call_TESISPLM_ECM_GET_ECM4OBJECT   args  

Calls SAP function '/TESISPLM/ECM_GET_ECM4OBJECT'.

Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • JCoStatus OK|ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n)

◆ call_TESISPLM_ECM_OBJMGREC_READ()

TPSAP::ECM::call_TESISPLM_ECM_OBJMGREC_READ   args  

Calls SAP function '/TESISPLM/ECM_OBJMGREC_READ'.

Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • JCoStatus OK|ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n)

◆ call_TESISPLM_ECM_OBJTYPE_DEF_READ()

TPSAP::ECM::call_TESISPLM_ECM_OBJTYPE_DEF_READ   args  

Calls SAP function '/TESISPLM/ECM_OBJTYPE_DEF_READ'.

Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • JCoStatus OK|ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n)

◆ call_TESISPLM_ECM_PROFILE_READ()

TPSAP::ECM::call_TESISPLM_ECM_PROFILE_READ   args  

Calls SAP function '/TESISPLM/ECM_PROFILE_READ'.

Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • JCoStatus OK|ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n)

◆ callTESISPLMECM_ALTDATE_READ()

TPSAP::ECM::callTESISPLMECM_ALTDATE_READ

◆ callTESISPLMECM_EFFECTIVITY_READ()

TPSAP::ECM::callTESISPLMECM_EFFECTIVITY_READ

◆ callTESISPLMECM_VALUEASSIGN_READ()

TPSAP::ECM::callTESISPLMECM_VALUEASSIGN_READ

◆ ChangeMasterAssignObject2AltDate()

TPSAP::ECM::ChangeMasterAssignObject2AltDate   args  

Assigns an existing object to an existing alternate date for a given ECM in SAP. Pls check the SAP BAPI "CCAP_ASSIGN_OBJECT_TO_ALT_DATE" for more information.

1 set ::SAPDat(ChangeMaster:PARAMETER:CHANGE_NO) $ChangeNumber
2 set ::SAPDat(ChangeMaster:PARAMETER:ALT_DATE) $AltDate
3 set ::SAPDat(ChangeMaster:PARAMETER:CHG_OBJECT_TYPE) $ChangeObjectType
4 set ::SAPDat(ChangeMaster:PARAMETER:MATERIAL) $MaterialNumber
5 set ::SAPDat(ChangeMaster:PARAMETER:PLANT) $Plant
6 #
Returns
OK or ERROR {} HexMessage as TCL List

◆ ChangeMasterChangeAltDate()

TPSAP::ECM::ChangeMasterChangeAltDate   args  

Changes an existing alternate date for a given ECM in SAP.

1 set ::SAPDat(ChangeMaster:PARAMETER:CHANGE_NO) $ChangeNumber
2 set ::SAPDat(ChangeMaster:PARAMETER:ALT_DATE) $AltDate
3 set ::SAPDat(ChangeMaster:PARAMETER:VALID_FROM) $ValidFromDate
4 #
Returns
OK or ERROR {} HexMessage as TCL List

◆ ChangeMasterCreateAltDate()

TPSAP::ECM::ChangeMasterCreateAltDate   args  

Creates an alternate date for a given ECM in SAP.

1 set ::SAPDat(ChangeMaster:PARAMETER:CHANGE_NO) $ChangeNumber
2 set ::SAPDat(ChangeMaster:PARAMETER:ALT_DATE) $AltDate
3 set ::SAPDat(ChangeMaster:PARAMETER:VALID_FROM) $ValidFromDate
4 #
Returns
OK or ERROR {} HexMessage as TCL List

◆ ChangeMasterDeleteAltDate()

TPSAP::ECM::ChangeMasterDeleteAltDate   args  

Deletes an existing alternate date for a given ECM in SAP.

1 set ::SAPDat(ChangeMaster:PARAMETER:CHANGE_NO) $ChangeNumber
2 set ::SAPDat(ChangeMaster:PARAMETER:ALT_DATE) $AltDate
3 #
Returns
OK or ERROR {} HexMessage as TCL List

◆ createChangeMaster_WithProfile()

TPSAP::ECM::createChangeMaster_WithProfile   strDescription strProfile strDate args  

This function creates an ECM with ECM profile The OOTB SAP BAPI cannot handle ECM profile To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
TCL LIST -> CREATED, ECM_NO and EMPTY STRING or ERROR, EMPTY STRING and MESSAGE

◆ getChangeMaster4Object()

TPSAP::ECM::getChangeMaster4Object   strSapObjectKey ?intSapObjectType? ?strSapObjectId?  

Gets all ECMs attached to a given object.

Parameters
strSapObjectKey- SAP object number (eg. 00000000000001870410002 for a Material BOM; 000000000000018704 = int MatNr, 1000 = Plant, 2 = BOM Usage) Important: Internal/External object key can cause a different result
strSapObjectId- Internal SAP object id (eg. M00006956 for a Material BOM; M = MaterialBOM, 00006956 = STLNR) - optional - default: Empty Important: Internal/External object key can cause a different result
intSapObjectType- 2 digit code specifing the object type (optional - default: 00): 00 -> All Object Types 02 -> Material BOM 03 -> Equipment BOM 04 -> Document Structure 05 -> Functional Location BOM 06 -> Standard BOM 07 -> Order BOM 08 -> WBS BOM 12 -> Routing 13 -> Reference Operation Set 21 -> Inspection Plan 22 -> General Task List 23 -> Equipment Task List 24 -> Master Recipe 25 -> Rate Routing 26 -> Reference Rate Routing 27 -> Functional Location Task List 31 -> Document 41 -> Material 51 -> Characteristic 52 -> Characteristics of Class 53 -> Classification 54 -> Object Dependencies 55 -> Configuration Profile 60 -> Specification 61 -> Phrase 62 -> Dangerous Goods 63 -> Variant Table 66 -> Validity of Material Version 71 -> PVS Variant 72 -> iPPE Process Structure Mode 73 -> PVS Dependency 75 -> Recipe Managemnt 77 -> Work area 79 -> Haz. Subs.
Returns
OK and global TCL array ::sap_result_array or NOT_FOUND

◆ getChangeMasterAltDatesList()

TPSAP::ECM::getChangeMasterAltDatesList   ChangeMaster args  

Returns a list (internal format) of all alt dates attached to the given ChangeMaster.

Parameters
ChangeMaster
argsnone
Returns
OK and global ::sap_result_array or ERROR with error message

◆ getChangeMasterEffectivity()

TPSAP::ECM::getChangeMasterEffectivity   ChangeMaster args  

Returns the effectivity (internal format) fora given ECM.

Parameters
ChangeMaster
argsnone
Returns
OK and global ::sap_result_array or ERROR with error message

◆ getChangeMasterInfo()

TPSAP::ECM::getChangeMasterInfo   ChangeNumber ?ReadOBJMGREC? ?ReadAltDates? ?ReadEffectivity? ?ReadMaintVariant? args  

Retrieves detailed SAP change master information.

Parameters
ChangeNumberChange number
ReadOBJMGREC- If set to true, a list (internal format) of all objects attached to the given ChangeMaster will be retrieved as well
ReadAltDates- If set to true, a list (internal format) of all alt dates attached to the given ChangeMaster will be retrieved as well
ReadEffectivity- If set to true, a list (internal format) of the effectivity attached to the given ChangeMaster will be retrieved as well
ReadMaintVariant- If set to true, the (internal format) maintenance variant record attached to the given ChangeMaster will be retrieved as well
argsnone
Returns
OK and global TCL array ::ECMResultDat or NOT_FOUND / ERROR

◆ getChangeMasterLongText()

TPSAP::ECM::getChangeMasterLongText   ChangeNo ?Language? args  

Retrieves the SAP long text for a given ECM.

Parameters
ChangeNoChange number
LanguageOne-character representation of the language
argsnone
Returns
LongText

◆ getChangeMasterMultipleHeaders()

TPSAP::ECM::getChangeMasterMultipleHeaders   ?ListOfChangeNumbers?  

Retrieves the ChangeMaster header data for a given list of change numbers or all change numbers.

Parameters
ListOfChangeNumbersOptional parameter containing the list of Change numbers that are used to get the corresponding header information. If not specified the system will return all existing change number header information. No wild cards are allowed/supported in the list.
Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • JCoStatus OK|ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n) and global TCL array ::ECMHeaderResultListDat

◆ getChangeMasterObjectTypeDefinition()

TPSAP::ECM::getChangeMasterObjectTypeDefinition   ?Language? args  

Returns the definition for all existing ECM object types including the ID and the name.

Parameters
Language- Optional - Default: EN
argsnone
Returns
OK and global ::sap_result_array or ERROR with error message

◆ getChangeMasterObjMgRecList()

TPSAP::ECM::getChangeMasterObjMgRecList   ChangeMaster args  

Returns a list (internal format) of all objects attached to the given ChangeMaster.

Parameters
ChangeMaster
argsnone
Returns
OK and global ::sap_result_array or ERROR with error message

◆ getChangeMasterProfileData()

TPSAP::ECM::getChangeMasterProfileData   ChangeMasterProfile ?Language? args  

Returns all settings for a given ECM Change Master Profile.

Parameters
ChangeMasterProfile
Language- Optional - Default: EN
argsnone
Returns
OK and global ::sap_result_array or ERROR with error message

◆ getChangeMasterValueAssign()

TPSAP::ECM::getChangeMasterValueAssign   ChangeMaster args  

Returns the value assign (=maintenance variant) data (internal format) for a given ECM.

Parameters
ChangeMaster
argsnone
Returns
OK and global ::sap_result_array or ERROR with error message

◆ getExternalChangeNumber()

TPSAP::ECM::getExternalChangeNumber   InternalNumber args  

Retrieves the SAP external change master id for a given SAP internal change master id.

Parameters
InternalNumberSAP internal change master id
argsnone
Returns
External number

◆ getInternalChangeNumber()

TPSAP::ECM::getInternalChangeNumber   ExternalNumber args  

Retrieves the SAP internal change master id for a given SAP external change master id.

Parameters
ExternalNumberSAP external change master id
argsnone
Returns
Internal number

◆ getObjectManagementTypesList()

TPSAP::ECM::getObjectManagementTypesList   args  

Gets the list of object management type with the Id and corresponding description via the RFC_READ_TABLE API.

Sample code sequence

2 if {$rc eq "OK"} {
3  foreach Element [::T4X::CORE::sortIndexedInterfaceTable [array names ::ECMResultDat ObjectManagementType:AETYP:*]] {
4  set Index [lindex [split $Element ":"] end]
5  puts "Type = $::ECMResultDat(ObjectManagementType:AETYP:$Index), Description: $::ECMResultDat(ObjectManagementType:ATTXT:$Index)
6  }
7 }
Returns
OK and filled TCL array ::ECMResultDat or NOT_FOUND

◆ initSAPChangeMasterStructure()

TPSAP::ECM::initSAPChangeMasterStructure   args  

Resets part of the corresponding global TCL ::SAPDat array within the section ChangeMaster.

Parameters
argsnone
Returns
0

◆ RevisionLevelSelect()

TPSAP::ECM::RevisionLevelSelect   args  

Returns a specific revision levels by date for a material master or DIR.

Parameters
Allpossible params are transferred via the global ::SAPDat TCL array
Returns
OK and global ::sap_result_array or ERROR with error message

◆ RevisionLevelTableExport()

TPSAP::ECM::RevisionLevelTableExport   args  

Returns all revision levels for a material master or document info record.

Parameters
Allpossible params are transferred via the global ::SAPDat TCL array
Returns
OK and global ::sap_result_array or ERROR with error message

◆ setObjectTypeStructure()

TPSAP::ECM::setObjectTypeStructure   ObjectType ?ACTIVE? ?LOCKED? ?OBJ_REQU? ?MGTREC_GEN? ?GEN_NEW? ?GEN_DIALOG?  

Define the object types for the ECM creation/update structure to enable the modification of objects with the actual change object.

Remarks
if "General BOM" is selected, SAP does not allow setting the other special BOM types
Parameters
ObjectTypedefines object type structure name that controls the enabled object type for change, currently the following types are supported:
  • OBJECT_BOM -> General BOM
  • OBJECT_BOM_CUS -> Order BOM
  • OBJECT_BOM_DOC -> DIR structure
  • OBJECT_BOM_EQUI -> Equipment BOM
  • OBJECT_BOM_LOC -> Functional Location BOM
  • OBJECT_BOM_MAT -> Material BOM
  • OBJECT_BOM_PSP -> WBS BOM
  • OBJECT_BOM_STD -> Standard BOM
  • OBJECT_CHAR -> Characteristics
  • OBJECT_CLS -> Classification
  • OBJECT_CLS_MAINT -> Characteristics of Class ("Class maintenance")
  • OBJECT_CONF_PROF -> Configuration Profile
  • OBJECT_DEP -> Object Dependencies
  • OBJECT_DOC -> Document
  • OBJECT_HAZMAT -> Dangerous Goods
  • OBJECT_MAT -> Material
  • OBJECT_PHRASE -> Phrase
  • OBJECT_PVS -> iPPE Process Structure Mode, PVS Variant, PVS Dependency (only activate)
  • OBJECT_PVS_ALT -> iPPE Process Structure Mode
  • OBJECT_PVS_REL -> PVS Dependency
  • OBJECT_PVS_VAR -> PVS Variant
  • OBJECT_SUBSTANCE -> Specification
  • OBJECT_TLIST -> Task List
  • OBJECT_TLIST_A -> General Task List
  • OBJECT_TLIST_E -> Equipment Task List
  • OBJECT_TLIST_M -> Reference Rate Routing
  • OBJECT_TLIST_N -> Routing
  • OBJECT_TLIST_Q -> Inspection Plan
  • OBJECT_TLIST_R -> Rate Routing
  • OBJECT_TLIST_S -> Reference Operation Set
  • OBJECT_TLIST_T -> Functional Location Task List
  • OBJECT_TLIST_2 -> Master Recipe
  • OBJECT_VALID_MATVERS
  • OBJECT_VAR_TAB -> Variant Table
Remarks
The correctness ObjectType parameter is not validated
Parameters
ACTIVE(optional - default X )
LOCKED(optional - empty)
OBJ_REQU(optional - default X)
MGTREC_GEN(optional - default X)
GEN_NEW(optional - empty)
GEN_DIALOG(optional - empty)
Returns
OK or OBJECT_TYPE_ERROR

◆ setRevisionLevel()

TPSAP::ECM::setRevisionLevel   Mode ObjectId ChangeNumber RevisionLevel args  

Sets the revision level for a given material master or document info record object using the provided change master object via the CCAP_REV_LEVEL_MAINTAIN function module.

Parameters
Mode'MaterialMaster' or 'Document'
ObjectIdId of the SAP object for which the revision level should be set. Depends on the param 'Mode'
ChangeNumberUsed SAP change master object to set the revision level
RevisionLevelRevision level to be set
argsnone
Returns
OK with global TCL array ::ECMResultDat and ::MsgResultDat or ERROR

◆ storeLongText4Description()

TPSAP::ECM::storeLongText4Description   Description ?TEXTKEY? ?TDNAME? ?TDID? ?TDSPRAS?  

Stores the given ChangeMaster description as a SAP long text if its length a greater than 40 chars in the global TCL ::SAPDat array for a future transfer.

Parameters
Description
TEXTKEY(optional - empty)
TDNAME(optional - empty)
TDID(optional - empty)
TDSPRAS(optional - empty)
Returns
Modified description with new lines (if greater than 40 chars)

◆ updateObjectManagementRecord()

TPSAP::ECM::updateObjectManagementRecord   strChangeNumber strObjectDescription ChangeTypeObject strObjectType ObjectId ?DeletetionFlag? args  

Adds, deletes or changes (description) an affected item record for the given object (e.g. MM) to the given ECM in SAP.

Parameters
strChangeNumber-> ChangeNumber
strObjectDescription-> new description for an existing afffected item
ChangeTypeObject-> ChangeTypeObject (usually 00000)
strObjectType-> Type of affected item -> Material | Document | BillOfMaterial | Plan
ObjectId-> Depending on the opject type, the following parameters have to be passed in as a TCL list: strObjectType == Material -> ObjectId = MaterialNumber strObjectType == Document -> ObjectId = DocumentNumber DocumentType DocumentPart DocumentVersion strObjectType == BillOfMaterial -> ObjectId = MaterialNumber BomCat (M|E|S|P|K) BomUsage ?Plant? ?PSP-Element (for ProjectBOM)? ?Order (for OrderBOM)? ?OrderPosition (for OrderBOM)? strObjectType == Plan -> ObjectId = TaskType TaskGroup
DeletetionFlag-> Optional - Default: Empty - If set to X, the record assignment will be deleted in SAP.
Returns
CHANGED, ChangeNumber and empty string or ERROR, ChangeNumber and message as TCL list

◆ updateObjectManagementRecord2()

TPSAP::ECM::updateObjectManagementRecord2   strChangeNumber strObjectDescription ChangeTypeObject strObjectType ObjectId ?DeletetionFlag? args  

This call is similar to updateObjectManagementRecord but will convert the affected item number to the internal format before calling SAP.

Parameters
strChangeNumber-> ChangeNumber
strObjectDescription-> new description for an existing afffected item
ChangeTypeObject-> ChangeTypeObject (usually 00000)
strObjectType-> Type of affected item -> Material | Document | BillOfMaterial | Plan
ObjectId-> Depending on the opject type, the following parameters have to be passed in as a TCL list: strObjectType == Material -> ObjectId = MaterialNumber strObjectType == Document -> ObjectId = DocumentNumber DocumentType DocumentPart DocumentVersion strObjectType == BillOfMaterial -> ObjectId = MaterialNumber BomCat (M|E|S|P|K) BomUsage ?Plant? ?PSP-Element (for ProjectBOM)? ?Order (for OrderBOM)? ?OrderPosition (for OrderBOM)? strObjectType == Plan -> ObjectId = TaskType TaskGroup
DeletetionFlag-> Optional - Default: Empty - If set to X, the record assignment will be deleted in SAP.
Returns
CHANGED, ChangeNumber and empty string or ERROR, ChangeNumber and message as TCL list