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

Functions

 charactGetDataType CharatName ?KeyDate? ?blnMap5CharacterCharacteristic2Boolean? args
 Returns the data type for a given characteristic. More...
 
 charactGetDetail args
 Retrieves detailed information of an existing SAP characteristic object. More...
 
 classGetDetail args
 Retrieves detailed information of an existing SAP class definition. More...
 
 clearObjectClassificationCurrency args
 Resets part of the corresponding global TCL ::SAPDat array within the section ObjectClassification:CharacteristicCurrValues. More...
 
 clearObjectClassificationNumericValues args
 Resets part of the corresponding global TCL ::SAPDat array within the section ObjectClassification:CharacteristicNumericValues. More...
 
 clearObjectClassificationStringValues args
 Resets part of the corresponding global TCL ::SAPDat array within the section ObjectClassification:CharacteristicStringValues. More...
 
 deleteObjectClassification args
 Deletes an existing SAP object classification using the BAPI BAPI_OBJCL_DELETE. More...
 
 getClassCharacteristics ClassNum ClassType ?Key_Date? ?Langu_INT? ?Langu_ISO? ?With_Values?
 Retrieves all existing characteristics for a given SAP class object. More...
 
 getDetailedObjectClassification args
 Retrieves detailed information about an existing SAP object classification using the BAPI BAPI_OBJCL_GETDETAIL. More...
 
 getObjectClassification args
 Retrieves detailed information about an existing SAP object classification using the BAPI BAPI_OBJCL_GETCLASSES. More...
 
 getSuperClassAllocs ClassNum ClassType KeyDate ?blnWithDescription?
 Class Hierarchy BAPI: (Directly) Superior Classes This BAPI returns the superior classes directly above a class in a class hierarchy. The initial class must be transferred in field 'ClassNum', and the class type in field 'ClassType'. You can transfer a date ('KeyDate'). Output table 'SuperclassesList' contains the names of the superior classes ('ClassName') and the class type again. If the BAPI runs successfully, table Return contains no messages of type 'E'. More...
 
 initClassificationStructureChange args
 Resets part of the corresponding global TCL ::SAPDat array within the section Class:PARAMETER. More...
 
 initClassificationStructureCreate args
 Resets part of the corresponding global TCL ::SAPDat array within the section Class:PARAMETER. More...
 
 initObjectClassificationStructure args
 Resets part of the corresponding global TCL ::SAPDat array within the section ObjectClassification. More...
 
 mergeObjectClassification args
 This function merges the result of the TPSAP::CLASS::getDetailedObjectClassification call with the new object classification defined by the mapping. It will copy all current values in SAP that are not specified by the mapping to the internal buffer that is used to update the object classification. This will avoid that not specified calcification values are deleted during the update via the BAPI_OBJCL_CHANGE function in SAP. More...
 
 selectChangeMasterClassification ChangeNumber
 Stores the given SAP Change Master id into the global TCL ::SAPDat array for a future Change Master classification transaction. More...
 
 selectClassificationDefinition ClassNumber ClassType KeyDate ChangeNumber StdClass Status
 Stores the given SAP class params into the global TCL ::SAPDat array for a future object classification transaction. More...
 
 selectDocumentClassification DocumentNumber DocumentType DocumentPart DocumentVersion
 Stores the given SAP document info record object key into the global TCL ::SAPDat array for a future Document Info Record classification transaction. More...
 
 selectDocumentObjectLinkClassification LinkNumber
 Stores the given SAP Document Object Link object key into the global TCL ::SAPDat array for a future Document Object Link classification transaction. More...
 
 selectGenericObjectLinkClassification ObjectKey ObjectTable
 Stores the given SAP generic object key and the object table into the global TCL ::SAPDat array for a future transfer. This function enables T4S to maintain generic object classifications. More...
 
 selectMaterialMasterClassification MaterialNumber
 Stores the given SAP material master id into the global TCL ::SAPDat array for a future Material Master classification transaction. More...
 
 selectPlanClassification PlanType GroupId GroupCounter
 Stores the given SAP Routing Identifier into the global TCL ::SAPDat array for a future Routing classification transaction. More...
 
 setClassification_by_Reference SourceMaterialMaster TargetMaterialMaster args
 Used to copy the data of an existing material master object classification to the actual transferred material. More...
 
 storeObjectClassificationCurrency Index CHARACT VALUE_FROM VALUE_TO VALUE_RELATION CURRENCY_FROM_ISO CURRENCY_TO_ISO INHERITED INSTANCE CHARACT_DESCR
 Sets the input structure for the ALLOCVALUESCURR->Classification BAPI for a future transfer - Values of Type CURR. More...
 
 storeObjectClassificationNumericValue Index CHARACT VALUE_FROM VALUE_TO VALUE_RELATION UNIT_FROM_ISO UNIT_TO_ISO INHERITED INSTANCE CHARACT_DESCR
 Sets the input structure for the Classification BAPI for a future transfer - Values of Type NUM, DATE, TIME. More...
 
 storeObjectClassificationStringValue Index CHARACT VALUE_CHAR INHERITED INSTANCE VALUE_NEUTRAL CHARACT_DESCR
 Sets the input structure for the Classification BAPI for a future transfer - Values of Type CHAR, BOOL. More...
 
 storeObjectClassificationStringValue2 Index CHARACT VALUE_CHAR INHERITED INSTANCE VALUE_NEUTRAL CHARACT_DESCR VALUE_CHAR_LONG VALUE_NEUTRAL_LONG
 Sets the input structure ALLOCVALUESCHAR for the Classification BAPI for a future transfer - Values of Type CHAR, BOOL. More...
 

Function Documentation

◆ charactGetDataType()

TPSAP::CLASS::charactGetDataType   CharatName ?KeyDate? ?blnMap5CharacterCharacteristic2Boolean? args  

Returns the data type for a given characteristic.

Parameters
CharatName
KeyDateOPTIONAL (default empty)
blnMap5CharacterCharacteristic2BooleanOPTIONAL (default TRUE) - If TRUE, a CHAR characteristic with the length of 5 and only the 2 values TRUE and FALSE will be mapped to type BOOLEAN
Returns
OK and DataType as TCL list and global TCL array ::CharactResultDat or ERROR with hex message

◆ charactGetDetail()

TPSAP::CLASS::charactGetDetail   args  

Retrieves detailed information of an existing SAP characteristic object.

Returns
OK and global TCL array ::CharactResultDat or ERROR

Sample code sequence

1 array unset ::SAPDat Charact:*
2 array unset ::CharactResultDat
3 set ::SAPDat(Charact:PARAMETER:CHARACTNAME) $charactName
4 set ::SAPDat(Charact:PARAMETER:KEYDATE) $keyDate
5 
6 # Call read function.
7 
9 if {[lindex $ResultList 0] eq "OK"} {
10  # everything thing was okay
11 } else {
12  # some error occurs
13 }
14 
15 # print out the resulting ::CharactResultDat content
16 
17 foreach elem [array names ::CharactResultDat] {
18  puts "::CharactResultDat($elem) = $::CharactResultDat($elem)"
19 }

◆ classGetDetail()

TPSAP::CLASS::classGetDetail   args  

Retrieves detailed information of an existing SAP class definition.

Returns
OK and global TCL array ::ClassResultDat or ERROR

Sample code sequence

1 array unset ::SAPDat
2 array unset ::ClassResultDat
3 set ::SAPDat(Class:PARAMETER:CLASSNUM) $SAPClassName
4 set ::SAPDat(Class:PARAMETER:CLASSTYPE) $::__inputSAPClassType
5 set ::SAPDat(Class:PARAMETER:KEYDATE) $::__currentDate
6 set ::SAPDat(Class:PARAMETER:LANGUISO) ""
7 set ::SAPDat(Class:PARAMETER:LANGUINT) ""
8 
9 # Call read function.
10 
11 set ResultList [::TPSAP::CLASS::classGetDetail]
12 if {[lindex $ResultList 0] eq "OK"} {
13  # everything thing was okay
14 } else {
15  # some error occurs
16 }
17 
18 # print out the resulting ::ClassResultDat content
19 
20 foreach elem [array names ::ClassResultDat] {
21  puts "::ClassResultDat($elem) = $::ClassResultDat($elem)"
22 }

◆ clearObjectClassificationCurrency()

TPSAP::CLASS::clearObjectClassificationCurrency   args  

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

Parameters
argsnone
Returns
0

◆ clearObjectClassificationNumericValues()

TPSAP::CLASS::clearObjectClassificationNumericValues   args  

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

Parameters
argsnone
Returns
0

◆ clearObjectClassificationStringValues()

TPSAP::CLASS::clearObjectClassificationStringValues   args  

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

Parameters
argsnone
Returns
0

◆ deleteObjectClassification()

TPSAP::CLASS::deleteObjectClassification   args  

Deletes an existing SAP object classification using the BAPI BAPI_OBJCL_DELETE.

Sample code sequence

1 set MaterialNumber "MMMTEST"
2 #
3 # fill object classification buffer ::SAPDat(ObjectClassification:*)
4 #
5 ::TPSAP::CLASS::selectClassificationDefinition "PC01" "001" "" "" "" "1"]
7 #
8 # read the current content of the object classification
9 #
11 if {[lindex $ResultList 0] eq "DELETED"} {
12  #
13  # the object classification was deleted
14  #
15 }
Returns
DELETED or ERROR

◆ getClassCharacteristics()

TPSAP::CLASS::getClassCharacteristics   ClassNum ClassType ?Key_Date? ?Langu_INT? ?Langu_ISO? ?With_Values?  

Retrieves all existing characteristics for a given SAP class object.

Parameters
ClassNumClass Name
ClassTypeClass Type
Key_Date(optional) Validity Time
Langu_INT(optional) Internal Language Key
Langu_ISO(optional) ISO Language Key
With_Values(optional) (X or empty) Find Allowed Values
Returns
FOUND and global TCL array ::ClassResultDat, NOT_FOUND or ERROR

Sample code sequence

1 array unset ::SAPDat
2 array unset ::ClassResultDat
3 
4 # Call read function.
5 
6 set ResultList [::TPSAP::CLASS::getClassCharacteristics $ClassName $ClassType]
7 if {[lindex $ResultList 0] eq "OK"} {
8  # everything thing was okay
9 } else {
10  # some error occurs
11 }
12 
13 # print out the resulting ::ClassResultDat content
14 
15 foreach elem [array names ::ClassResultDat] {
16  puts "::ClassResultDat($elem) = $::ClassResultDat($elem)"
17 }

◆ getDetailedObjectClassification()

TPSAP::CLASS::getDetailedObjectClassification   args  

Retrieves detailed information about an existing SAP object classification using the BAPI BAPI_OBJCL_GETDETAIL.

Returns
FOUND, NOT_FOUND or ERROR and global TCL array ::ClassResultDat

Sample code sequence

1 array unset ::SAPDat
2 array unset ::ClassResultDat
3 
4 set Status [::TPSAP::CLASS::selectClassificationDefinition $ClassNumber $ClassType $KeyDate $ChangeNumber "" ""]
5 set ::SAPDat(ObjectClassification:ParameterData:READ_VALUATIONS) X
7 
9 if {[lindex $ResultList 0] eq "FOUND"} {
10  foreach elem [lsort [array names ::ClassResultDat]] {
11  puts "::ClassResultDat($elem) = $::ClassResultDat($elem)"
12  }
13 } else {
14  # some error occurs
15 }

◆ getObjectClassification()

TPSAP::CLASS::getObjectClassification   args  

Retrieves detailed information about an existing SAP object classification using the BAPI BAPI_OBJCL_GETCLASSES.

Returns
FOUND, NOT_FOUND or ERROR and global TCL array ::ClassResultDat

Sample code sequence

1 array unset ::SAPDat
2 array unset ::ClassResultDat
3 
4 set Status [::TPSAP::CLASS::selectClassificationDefinition $ClassNumber $ClassType $KeyDate $ChangeNumber "" ""]
5 set ::SAPDat(ObjectClassification:ParameterData:READ_VALUATIONS) X
7 
9 if {[lindex $ResultList 0] eq "FOUND"} {
10  foreach elem [lsort [array names ::ClassResultDat]] {
11  puts "::ClassResultDat($elem) = $::ClassResultDat($elem)"
12  }
13 } else {
14  # some error occurs
15 }

◆ getSuperClassAllocs()

TPSAP::CLASS::getSuperClassAllocs   ClassNum ClassType KeyDate ?blnWithDescription?  

Class Hierarchy BAPI: (Directly) Superior Classes This BAPI returns the superior classes directly above a class in a class hierarchy. The initial class must be transferred in field 'ClassNum', and the class type in field 'ClassType'. You can transfer a date ('KeyDate'). Output table 'SuperclassesList' contains the names of the superior classes ('ClassName') and the class type again. If the BAPI runs successfully, table Return contains no messages of type 'E'.

The result contains the superior classes immediately above the class, but not their superior classes.

Important: This function required the T4S JCO connector.

Parameters
ClassNumClass
ClassTypeClass Type
KeyDateValid-From Date
blnWithDescriptionDetermine language dependent Description (optional - default TRUE)
Returns
OK and TCL array ::ClassResultDat or ERROR with message

◆ initClassificationStructureChange()

TPSAP::CLASS::initClassificationStructureChange   args  

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

Parameters
argsnone
Returns
0

◆ initClassificationStructureCreate()

TPSAP::CLASS::initClassificationStructureCreate   args  

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

Parameters
argsnone
Returns
0

◆ initObjectClassificationStructure()

TPSAP::CLASS::initObjectClassificationStructure   args  

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

Parameters
argsnone
Returns
0

◆ mergeObjectClassification()

TPSAP::CLASS::mergeObjectClassification   args  

This function merges the result of the TPSAP::CLASS::getDetailedObjectClassification call with the new object classification defined by the mapping. It will copy all current values in SAP that are not specified by the mapping to the internal buffer that is used to update the object classification. This will avoid that not specified calcification values are deleted during the update via the BAPI_OBJCL_CHANGE function in SAP.

More details can be found in the SAP OSS-Note: 922075 (BAPI_OBJCL_CHANGE - Char value assignments disappear)

Returns
OK

Sample code sequence

1 set MaterialNumber "MMMTEST"
2 #
3 # fill object classification buffer ::SAPDat(ObjectClassification:*)
4 #
5 ::TPSAP::CLASS::selectClassificationDefinition "PC01" "001" "" "" "" "1"]
7 ::TPSAP::CLASS::storeObjectClassificationStringValue "1" "T-COLOR" "" "" "000" GREEN ""]
8 ::TPSAP::CLASS::storeObjectClassificationStringValue "2" "T-COATS" "" "" "000" COAT1 ""]
9 ::TPSAP::CLASS::storeObjectClassificationStringValue "3" "T-OTHER" TOTHER "" "000" "" ""]
10 #
11 # read the current content of the object classification
12 #
14 if {[lindex $ResultList 0] eq "FOUND"} {
15  #
16  # Merge the new content of the ::SAPDat(ObjectClassification:*) with the current definition in SAP
17  #
19  # set ::SAPDat(ObjectClassification:ParameterData:NO_DEFAULT_VALUES) "X"
20 }

◆ selectChangeMasterClassification()

TPSAP::CLASS::selectChangeMasterClassification   ChangeNumber  

Stores the given SAP Change Master id into the global TCL ::SAPDat array for a future Change Master classification transaction.

Parameters
ChangeNumberChange Number
Returns
0

◆ selectClassificationDefinition()

TPSAP::CLASS::selectClassificationDefinition   ClassNumber ClassType KeyDate ChangeNumber StdClass Status  

Stores the given SAP class params into the global TCL ::SAPDat array for a future object classification transaction.

Parameters
ClassNumberClass Number
ClassTypeClass Type
KeyDateValidity Time in the SAP internal format
ChangeNumberChange Number
StdClassIndicator: Standard Class
StatusClassification Status
Returns
0

◆ selectDocumentClassification()

TPSAP::CLASS::selectDocumentClassification   DocumentNumber DocumentType DocumentPart DocumentVersion  

Stores the given SAP document info record object key into the global TCL ::SAPDat array for a future Document Info Record classification transaction.

Parameters
DocumentNumberDocument Number
DocumentTypeDocument Type
DocumentPartDocument Part
DocumentVersionDocument Version
Returns
0

◆ selectDocumentObjectLinkClassification()

TPSAP::CLASS::selectDocumentObjectLinkClassification   LinkNumber  

Stores the given SAP Document Object Link object key into the global TCL ::SAPDat array for a future Document Object Link classification transaction.

Parameters
LinkNumber
Returns
0

◆ selectGenericObjectLinkClassification()

TPSAP::CLASS::selectGenericObjectLinkClassification   ObjectKey ObjectTable  

Stores the given SAP generic object key and the object table into the global TCL ::SAPDat array for a future transfer. This function enables T4S to maintain generic object classifications.

Parameters
ObjectKey(Internal SAP object number based on the given ObjectTable)
ObjectTable(ObjectTable defining the given ObjectKey -> CRVS_B = PRT, EQUI = Equipment, MARA = MaterialMaster, DRAD = Object Link, DRAW = DIR, AENR = ChangeNo, PLKO = RoutingHeader, ...)
Returns
OK

◆ selectMaterialMasterClassification()

TPSAP::CLASS::selectMaterialMasterClassification   MaterialNumber  

Stores the given SAP material master id into the global TCL ::SAPDat array for a future Material Master classification transaction.

Parameters
MaterialNumberMaterial Number
Returns
0

◆ selectPlanClassification()

TPSAP::CLASS::selectPlanClassification   PlanType GroupId GroupCounter  

Stores the given SAP Routing Identifier into the global TCL ::SAPDat array for a future Routing classification transaction.

Parameters
PlanTypePlan Type
GroupIdPlan Group Id
GroupCounterPlan Group Counter
Returns
0

◆ setClassification_by_Reference()

TPSAP::CLASS::setClassification_by_Reference   SourceMaterialMaster TargetMaterialMaster args  

Used to copy the data of an existing material master object classification to the actual transferred material.

Parameters
SourceMaterialMasterThe source material from which the classification will be copied from.
TargetMaterialMasterThe target material to which the classification will be copied to.
args(not used)
Returns
OK

◆ storeObjectClassificationCurrency()

TPSAP::CLASS::storeObjectClassificationCurrency   Index CHARACT VALUE_FROM VALUE_TO VALUE_RELATION CURRENCY_FROM_ISO CURRENCY_TO_ISO INHERITED INSTANCE CHARACT_DESCR  

Sets the input structure for the ALLOCVALUESCURR->Classification BAPI for a future transfer - Values of Type CURR.

Parameters
Indexinternal TCL array index
CHARACTCharacteristic Name
VALUE_FROMInternal floating point value from
VALUE_TOInternal floating point value to
VALUE_RELATIONCode for value dependency/relation It is possible to define ranges, where the FROM or TO value is coded with a special operator.

Example: 1,54>-<2,088

All possible coding's are listed below:

Code Operator Value1 Operator Value2
1 EQ Value1
2 GE Value1 LT Value2
3 GE Value1 LE Value2
4 GT Value1 LT Value2
5 GT Value1 LE Value2
6 LT Value1
7 LE Value1
8 GT Value1
9 GE Value1
Parameters
CURRENCY_FROM_ISOISO Currency Code for value from
CURRENCY_TO_ISOCurrency Code for value to
INHERITEDIndicator: characteristic is inherited
INSTANCEInstance counter
CHARACT_DESCRCharacteristic description
Returns
0

◆ storeObjectClassificationNumericValue()

TPSAP::CLASS::storeObjectClassificationNumericValue   Index CHARACT VALUE_FROM VALUE_TO VALUE_RELATION UNIT_FROM_ISO UNIT_TO_ISO INHERITED INSTANCE CHARACT_DESCR  

Sets the input structure for the Classification BAPI for a future transfer - Values of Type NUM, DATE, TIME.

Parameters
Indexinternal TCL array index
CHARACTCharacteristic Name
VALUE_FROMInternal floating point value from
VALUE_TOInternal floating point value to
VALUE_RELATIONCode for value dependency/relation It is possible to define ranges, where the FROM or TO value is coded with a special operator.

Example: 1,54>-<2,088

All possible coding's are listed below:

Code Operator Value1 Operator Value2
1 EQ Value1
2 GE Value1 LT Value2
3 GE Value1 LE Value2
4 GT Value1 LT Value2
5 GT Value1 LE Value2
6 LT Value1
7 LE Value1
8 GT Value1
9 GE Value1
Parameters
UNIT_FROM_ISOBase unit of measure in ISO code for value from
UNIT_TO_ISOBase unit of measure in ISO code for value to
INHERITEDIndicator: characteristic is inherited
INSTANCEInstance counter
CHARACT_DESCRCharacteristic description
Returns
0

◆ storeObjectClassificationStringValue()

TPSAP::CLASS::storeObjectClassificationStringValue   Index CHARACT VALUE_CHAR INHERITED INSTANCE VALUE_NEUTRAL CHARACT_DESCR  

Sets the input structure for the Classification BAPI for a future transfer - Values of Type CHAR, BOOL.

Parameters
Index- internal TCL array index
CHARACTCharacteristic Name
VALUE_CHARCharacteristic Value
INHERITEDIndicator: characteristic is inherited
INSTANCEInstance counter
VALUE_NEUTRALNeutral Characteristic Value
CHARACT_DESCRCharacteristic description
Returns
0

◆ storeObjectClassificationStringValue2()

TPSAP::CLASS::storeObjectClassificationStringValue2   Index CHARACT VALUE_CHAR INHERITED INSTANCE VALUE_NEUTRAL CHARACT_DESCR VALUE_CHAR_LONG VALUE_NEUTRAL_LONG  

Sets the input structure ALLOCVALUESCHAR for the Classification BAPI for a future transfer - Values of Type CHAR, BOOL.

Parameters
Indexinternal TCL array index
CHARACTCharacteristic Name
VALUE_CHARCharacteristic Value
INHERITEDIndicator: characteristic is inherited
INSTANCEInstance counter
VALUE_NEUTRALNeutral Characteristic Value
CHARACT_DESCRCharacteristic description
VALUE_CHAR_LONGCharacteristic Value (long version with up to 70 characters)
VALUE_NEUTRAL_LONGNeutral Characteristic Value (long version with up to 70 characters)
Returns
0