Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using CLCLRS02

Former Member
0 Likes
1,057

Hello Experts,

I'm trying to show new fields in CL30N and I'm using CLCLRS01 and CLCLRS02.

I have been able to show new fields (CLCLRS01) but I do not know how to use CLCLRS02 to select the values.

Can anybody give me an example?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
818

Hi Laura,

This enhancement CLCLRS02 is used to fill the additional fields.The user exit in this enhancement is used in the object search in the classification system. The objects found are included in table IT_OB_KEYS. The object key is contained in field OBJECT, in the same form as it is in in the classification system on the database (KSSK-OBJEK, AUSP-OBJEK). The fields that are key fields for the object in the master data tables are also filled.

Table ET_OB_VALUES must be filled with the object key, the field names defined in module EXIT_SAPLCLRS_001, and the associated values.

The value for fields with character format is given in field ATWRT, for those with numerical format, the interval is given in fields ATFLV, ATFLB and ATCOD (for values, see the documentation for the data element). If the value has a unit, the value is to be entered in the unit given in Exit EXIT_SAPLCLRS_001. If a different unit of measure is given in field ATAWE, the value is converted to and displayed in this unit.

Thanks,

Prasad GVK

3 REPLIES 3
Read only

Former Member
0 Likes
819

Hi Laura,

This enhancement CLCLRS02 is used to fill the additional fields.The user exit in this enhancement is used in the object search in the classification system. The objects found are included in table IT_OB_KEYS. The object key is contained in field OBJECT, in the same form as it is in in the classification system on the database (KSSK-OBJEK, AUSP-OBJEK). The fields that are key fields for the object in the master data tables are also filled.

Table ET_OB_VALUES must be filled with the object key, the field names defined in module EXIT_SAPLCLRS_001, and the associated values.

The value for fields with character format is given in field ATWRT, for those with numerical format, the interval is given in fields ATFLV, ATFLB and ATCOD (for values, see the documentation for the data element). If the value has a unit, the value is to be entered in the unit given in Exit EXIT_SAPLCLRS_001. If a different unit of measure is given in field ATAWE, the value is converted to and displayed in this unit.

Thanks,

Prasad GVK

Read only

0 Likes
818

Hello Prasad,

I’ve tried to give values as you have explained, but it does not work correctly. In CLCLRS01  I have indicated:


et_fields-fieldname = 'X'.
et_fields
-datatype  = 'NUM'.
et_fields
-length    = 2.
et_fields
-decimals  = 0.

APPEND et_fields.


et_fields
-fieldname = 'Y'.
et_fields
-datatype  = 'C'.
et_fields
-length    = 8.

APPEND et_fields.

And then in CLCLRS02:

LOOP AT it_ob_keys.

et_ob_values
-object = it_ob_keys-objek.
et_ob_values
-mafid = '0'.
et_ob_values
-fieldname = 'X'.
et_ob_values
-atflv = 5.
APPEND et_ob_values.
CLEAR et_ob_values.


et_ob_values
-object = it_ob_keys-objek.
et_ob_values
-mafid = '0'.
et_ob_values
-fieldname = 'Y'.
et_ob_values
-atwrt = 'hola'.
et_ob_values
-atflv = 7.
APPEND et_ob_values.
CLEAR et_ob_values.


ENDLOOP.



The result is:

What am I doing wrong??

Thanks.

Read only

0 Likes
818

Hello, problem solved!!!

Field mafid should be defined as follows:

  et_ob_values-mafid = 'O' .

Thanks and regards.