Fonction SAP BAPI_CLASS_GET_CLASSIFICATIONS - Read Values Assigned to Objects in Class

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CHARACTS_OF_CLASS_ONLY BAPIFLAG u 1 X Only Read Characteristics of the Class
CLASSNUM BAPI_CLASS_KEY-CLASSNUM C 18 External Class Number
CLASSTYPE BAPI_CLASS_KEY-CLASSTYPE C 3 Class Type
KEY_DATE BAPI_KEY_DATE-KEY_DATE D 8 SY-DATUM X Validity Time
LANGU_INT BAPI_LANGUAGE-LANGUAGE_INT C 1 X Internal Language Key
LANGU_ISO BAPI_LANGUAGE-LANGUAGE_ISO C 2 X ISO Language Key

Paramètre Reférence Type Long. Description
RETURN BAPIRETURN1 u 470 Return Parameters for Messages

Paramètre Reférence Long. Facultatif Description
CLASS_OBJECTS BAPI_CLASS_OBJECTS 80 Read Values of These Objects
OBJECT_CLASSIFICATION BAPI_OBJECT_VALUES 240 Values for Objects

Functionality
This function module is for implementing BAPI
Class.GetClassifications.
It reads values assigned to the objects classified in the class (not insubordinate classes).
If there are value descriptions, these are returned with the value.
You must enter the class type, class, and objects whose values youwant to read.
Note: the function module does not read values of referencecharacteristics.

Example
DATA:
objects LIKE bapi_class_objects OCCURS 0 WITH HEADER LINE,
assigned values LIKE bapi_object_values OCCURS 0 WITH HEADER LINE,
return LIKE bapireturn1.
objects-object_key = 'TESTOBJEKT'.
APPEND objects.
CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
EXPORTING
classtype = '001'
classnum = 'TEST CLASS'
key_date = 19991231
langu_iso = 'EN'
IMPORTING
return = return
TABLES
object_classifications = assigned values
class_objects = objects
EXCEPTIONS
others = 0.

Description
Return parameter for messages

Description
External class number: together with CLASSTYPE, this identifies aclass.

Description
Class type: together with CLASSNUM, this identifies a class.

Description
If engineering change management is active, the date influences theresult.

Default
Systemdatum

Description
Internal language key

Default
Logon language

Description
Language in which value descriptions are returned.
ISO format

DEFAULT&
Logon language

Description
A line must be appended to the table for each object.
You can only enter objects that are not classes.
OBJECT_KEY: Object number
OBJECT_TYPE: If the class type allows multiple object types (TCLA-
MULTOBJ = 'X'), you must enter the object table to
identify the object (for example, MARA for a material).

Description
OBJECT_KEY: Object number
NAME_CHAR : Name of characteristic
When you call the module, enter the characteristics whose
values you want to read for the objects found in this
field.
CHAR_VALUE: Characteristic value in alphanumeric format
If the characteristic has format CHAR or BOOL, this field
contains an entry.
DESCR_CVAL: Value description
If the characteristic has format CHAR and value
descriptions exist in the language you are working in, this
field contains an entry.
NUM_VAL_FM: Characteristic value in a numeric format or lower limit of
interval.
If the characteristic has format NUM, DATE, TIME, or CURR,
this field contains an entry.
The values are in internal format:
NUM: Figure without unit
DATE: YYYYMMDD, for example, 19971231
CURR: Amount without currency key (with decimal point)
TIME: HHMMSS (maximum value is 240000)
If the value is a single value, field VAL_RELATN contains
a 1.
NUM_VAL_TO: Upper limit of numeric interval
If the characteristic has format NUM, DATE, TIME, or CURR,
and an interval is found, this field contains the upper
limit of the interval (in internal format).
CURR_VAL_FM: If the characteristic has format CURR, this field shows
the same value as field NUM_VAL_FM, but in external format.
CURR_VAL_TO: If the characteristic has format CURR, this field shows
the same value as field NUM_VAL_TO, but in external format.
VAL_RELATN: Value description
If the characteristic has format NUM, DATE, TIME, or CURR,
This field contains an entry that describes the
relationship between NUM_VAL_FM and NUM_VAL_TO.
These fields can describe a single value or an interval.
The example below assumes that:
NUM_VAL_FM = 1 or initial
NUM_VAL_TO = 5 or initial

VAL_RELATN NUM_VAL_FM NUM_VAL_TO Example
1 EQ 1
2 GE LT >=1 - <5
3 GE LE >=1 - <=5
4 GT LT >1 - <5
5 GT LE >1 - <=5
6 LT <5
7 LE <=5
8 GT >1
9 GE >=1
Formats CHAR and BOOL always have a 1 in this field.
UNIT: Unit in internal format
If the characteristic has format NUM or CURR (CURR is
compatible with internal formats in the classification
system), the unit or currency is shown here in external
format.
BASE_UOM_ISO: Unit in ISO format
If the characteristic has format NUM, this field shows the
unit in ISO format
UNIT_T_EXT: External technical unit (6 characters)
If the characteristic has format NUM, this field shows the
unit in external technical format
CURRENCY: Currency in internal format
If the characteristic has format CURR, this field shows the
currency in internal format.
CURRENCY_ISO: Currency in ISO format
If the characteristic has format CURR, this field shows the
currency in ISO format.
OBJECT_TYPE: Type of object (for example, MARA for materials). This
field only contains an entry if the class type allows
multiple object types.