T4S4  18.1 C7177 A20283
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...
 
 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 succesfully, 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 args
 Stores the given SAP change master id into the global TCL ::SAPDat array for a future transfer. More...
 
 selectClassificationDefinition ClassNumber ClassType KeyDate ChangeNumber StdClass Status args
 Stores the given SAP class params into the global TCL ::SAPDat array for a future transfer. More...
 
 selectDocumentClassification DocumentNumber DocumentType DocumentPart DocumentVersion args
 Stores the given SAP document info record object key into the global TCL ::SAPDat array for a future transfer. More...
 
 selectDocumentObjectLinkClassification LinkNumber args
 Stores the given SAP document object link object key into the global TCL ::SAPDat array for a future transfer. More...
 
 selectGenericObjectLinkClassification ObjectKey ObjectTable args
 Stores the given SAP 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 args
 Stores the given SAP material master id into the global TCL ::SAPDat array for a future transfer. More...
 
 selectPlanClassification PlanType GroupId GroupCounter args
 Stores the given SAP routing object key into the global TCL ::SAPDat array for a future transfer. More...
 
 setClassification_by_Reference ObjectKey TargetObjectKey args
 Used to create a MM object classification based on an existing SAP MM object classification. More...
 
 storeObjectClassificationCurrency Index CHARACT VALUE_FROM VALUE_TO VALUE_RELATION CURRENCY_FROM_ISO CURRENCY_TO_ISO INHERITED INSTANCE CHARACT_DESCR args
 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 args
 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 args
 Sets the input structure 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
KeyDate- OPTIONAL (default empty)
blnMap5CharacterCharacteristic2Boolean- OPTIONAL (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

References charactGetDetail(), and TPSAP::getSessionLogChannel().

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

References TPSAP::getSessionLogChannel(), and tpco_scanHEX16().

Referenced by charactGetDataType().

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

References TPSAP::getSessionLogChannel(), and tpco_scanHEX16().

◆ clearObjectClassificationCurrency()

TPSAP::CLASS::clearObjectClassificationCurrency   args  

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

Parameters
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

Referenced by initObjectClassificationStructure().

◆ clearObjectClassificationNumericValues()

TPSAP::CLASS::clearObjectClassificationNumericValues   args  

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

Parameters
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

Referenced by initObjectClassificationStructure().

◆ clearObjectClassificationStringValues()

TPSAP::CLASS::clearObjectClassificationStringValues   args  

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

Parameters
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

Referenced by initObjectClassificationStructure().

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

References TPSAP::getSessionLogChannel().

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

References TPSAP::getLoginLanguageISO(), TPSAP::getSessionLogChannel(), tpco_scanHEX16(), and tpwrite().

Referenced by setClassification_by_Reference(), and TPSAP::MM::setClassificationData_by_Reference().

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

References TPSAP::getLoginLanguageISO(), TPSAP::getSessionLogChannel(), and tpco_scanHEX16().

Referenced by setClassification_by_Reference(), and TPSAP::MM::setClassificationData_by_Reference().

◆ 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 succesfully, table Return contains no messages of type 'E'.

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

Important: This function required the T4S JCO connector.

Parameters
ClassNum- Class
ClassType- Class Type
KeyDate- Valid-From Date
blnWithDescription- Determine language dependent Description - (optional - default TRUE)
Returns
OK and TCL array ::ClassResultDat or ERROR with message

References TPSAP::getSessionLogChannel(), TPSAP::performSapCall(), and tpco_scanHEX16().

◆ initClassificationStructureChange()

TPSAP::CLASS::initClassificationStructureChange   args  

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

Parameters
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

◆ initClassificationStructureCreate()

TPSAP::CLASS::initClassificationStructureCreate   args  

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

Parameters
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

◆ initObjectClassificationStructure()

TPSAP::CLASS::initObjectClassificationStructure   args  

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

Parameters
argsnone
Returns
0

References clearObjectClassificationCurrency(), clearObjectClassificationNumericValues(), clearObjectClassificationStringValues(), and TPSAP::getSessionLogChannel().

Referenced by selectClassificationDefinition().

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

References TPSAP::getSessionLogChannel().

◆ selectChangeMasterClassification()

TPSAP::CLASS::selectChangeMasterClassification   ChangeNumber args  

Stores the given SAP change master id into the global TCL ::SAPDat array for a future transfer.

Parameters
ChangeNumber
argsnone
Returns
0

References TPSAP::ECM::getInternalChangeNumber(), and TPSAP::getSessionLogChannel().

◆ selectClassificationDefinition()

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

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

Parameters
ClassNumber
ClassType
KeyDate
ChangeNumber
StdClass
Status
argsnone
Returns
0

References TPSAP::getSessionLogChannel(), and initObjectClassificationStructure().

Referenced by setClassification_by_Reference(), and TPSAP::MM::setClassificationData_by_Reference().

◆ selectDocumentClassification()

TPSAP::CLASS::selectDocumentClassification   DocumentNumber DocumentType DocumentPart DocumentVersion args  

Stores the given SAP document info record object key into the global TCL ::SAPDat array for a future transfer.

Parameters
DocumentNumber
DocumentType
DocumentPart
DocumentVersion
argsnone
Returns
0

References TPSAP::DIR::getInternalDocumentNumber(), and TPSAP::getSessionLogChannel().

◆ selectDocumentObjectLinkClassification()

TPSAP::CLASS::selectDocumentObjectLinkClassification   LinkNumber args  

Stores the given SAP document object link object key into the global TCL ::SAPDat array for a future transfer.

Parameters
LinkNumber
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

◆ selectGenericObjectLinkClassification()

TPSAP::CLASS::selectGenericObjectLinkClassification   ObjectKey ObjectTable args  

Stores the given SAP 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, ...)
argsnone
Returns
OK

References TPSAP::getSessionLogChannel().

◆ selectMaterialMasterClassification()

TPSAP::CLASS::selectMaterialMasterClassification   MaterialNumber args  

Stores the given SAP material master id into the global TCL ::SAPDat array for a future transfer.

Parameters
MaterialNumber
argsnone
Returns
0

References TPSAP::MM::getInternalMaterialNumber(), and TPSAP::getSessionLogChannel().

Referenced by setClassification_by_Reference(), and TPSAP::MM::setClassificationData_by_Reference().

◆ selectPlanClassification()

TPSAP::CLASS::selectPlanClassification   PlanType GroupId GroupCounter args  

Stores the given SAP routing object key into the global TCL ::SAPDat array for a future transfer.

Parameters
PlanType
GroupId
GroupCounter
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

◆ setClassification_by_Reference()

TPSAP::CLASS::setClassification_by_Reference   ObjectKey TargetObjectKey args  

◆ storeObjectClassificationCurrency()

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

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

Parameters
Index- internal TCL array index
CHARACT
VALUE_FROM
VALUE_TO
VALUE_RELATION
CURRENCY_FROM_ISO
CURRENCY_TO_ISO
INHERITED
INSTANCE
CHARACT_DESCR
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

◆ storeObjectClassificationNumericValue()

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

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

Parameters
Index- internal TCL array index
CHARACT
VALUE_FROM
VALUE_TO
VALUE_RELATIONIt 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_ISO
UNIT_TO_ISO
INHERITED
INSTANCE
CHARACT_DESCR
argsnone
Returns
0

References TPSAP::getSessionLogChannel().

◆ storeObjectClassificationStringValue()

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

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

Parameters
Index- internal TCL array index
CHARACT
VALUE_CHAR
INHERITED
INSTANCE
VALUE_NEUTRAL
CHARACT_DESCR
arsgnone
Returns
0

References TPSAP::getSessionLogChannel().

Referenced by setClassification_by_Reference(), and TPSAP::MM::setClassificationData_by_Reference().