10-11-2010 8:05 AM
Dear Experts ,
We are using material classification in the material master. Under classification tab of material master , we are maintaining certain characteristics and their corresponding values.
I want to read those values and use those in one of the report.
Can you please help me in identifying Function Module which will return the values of all the attributes of that material.
Thanks in advnce,
Regards,
Nikhil
10-11-2010 8:23 AM
Hi Nikhil,
You can Use 'BAPI_OBJCL_GETDETAIL' it requires OBJECTKEY -material number in your case
OBJECTTABLE- MARA, CLASSNUM-Give your class name,CLASSTYPE-give your class type also
another FM for this functionality CLAF_CLASSIFICATION_OF_OBJECTS.
Regards,
Pawan
10-11-2010 8:25 AM
Hi,
You can use the function module CLAF_CLASSIFICATION_OF_OBJECTS .
You can also try to use the table AUSP to read the values..You need to specify the OBJEK as material number(18 char).
Regards,
Nagaraj
10-11-2010 8:46 AM
Hello Nikhil if you have plant and Material you will fetch the CUOBJ field from MARC table and pass it to
VC_I_GET_CONFIGURATION you will get you desired value in the return table
10-11-2010 8:53 AM
Dear Anup ,
The Material in question is not confiurable material. Hence CUOBJ field in MARC in blank.
Please suggest.
Regards,
Nikhil
10-11-2010 9:05 AM
You can check those details using CT06 transaction.
FM CLAF_CLASSIFICATION_OF_OBJECTS can be used to retrive the data using program.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
class = gc_class
classtext = 'X'
classtype = gc_classtype
clint = gc_mmpsk
features = 'X'
language = sy-langu
object = l_object
key_date = sy-datum
initial_charact = 'X'
change_service_clf = ' '
inherited_char = 'X'
TABLES
t_class = lt_class
t_objectdata = lt_objectdata
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4.
10-11-2010 10:15 PM
Use BAPI 'BAPI_OBJCL_GETCLASSES' to retrieve the classification details for given material. Refer the documentation of BAPI for more details . Here is sample code for BAPI call .
DATA : v_objectkey TYPE bapi1003_key-object ,
v_classtype TYPE bapi1003_key-classtype .
v_objectkey = matnr. " material
v_classtype = '023'. " Classification type
CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
EXPORTING
objectkey_imp = v_objectkey
objecttable_imp = 'MARA''
classtype_imp = v_classtype
read_valuations = 'X'
TABLES
alloclist = l_i_alloclist
allocvalueschar = l_i_char_value
return = l_i_return.
10-12-2010 10:18 AM
HI Tushar ,
I tried to use this BAPI.
But I am getting message as "Object does not Exists".
Please suggest.
Regards,
Nikhil
10-12-2010 2:45 PM
Nikhil,
You may be passing some incorrect parameter to this BAPI , I just mentioned above a sample code , please try with passing existing material number and classification type to BAPI in your system. You can pass hardcoded value 'MARA' to objecttable_imp parameter.
I used this BAPI in past and it worked perfectly for me .