Skip to Content

material classification data

hi guys,

on mm03 we can view classification data of a particular material. does anybody know a function module or bapi that can be used to retrieve classification data for any material?

thanks,

vitish

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 10:31 AM

    Hi,

    Check this code

    DATA: V_CLASS LIKE KLAH-CLASS VALUE 'MAT_SEL_CLASS_JASC',

    V_CLASSTYPE LIKE KLAH-KLART VALUE '023',

    V1_OBJECT LIKE AUSP-OBJEK,(nothing but material no)

    V_OBJECTTABLE LIKE TCLA-OBTAB VALUE 'MARA',

    V_LANGU LIKE SY-LANGU,

    V_DATUM LIKE SY-DATUM.

    V_LANGU = 'EN'.

    V_DATUM = SY-DATUM.

    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

    EXPORTING

    CLASS = V_CLASS

    CLASSTEXT = 'X'

    CLASSTYPE = V_CLASSTYPE

    CLINT = 0

    FEATURES = 'X'

    LANGUAGE = V_LANGU

    OBJECT = V1_OBJECT

    OBJECTTABLE = V_OBJECTTABLE

    KEY_DATE = V_DATUM

    INITIAL_CHARACT = 'X'

    NO_VALUE_DESCRIPT =

    CHANGE_SERVICE_CLF = 'X'

    INHERITED_CHAR = ' '

    CHANGE_NUMBER = ' '

    TABLES

    T_CLASS = T_CLASS

    T_OBJECTDATA = T_CLOBJDAT

    I_SEL_CHARACTERISTIC =

    T_NO_AUTH_CHARACT =

    EXCEPTIONS

    NO_CLASSIFICATION = 1

    NO_CLASSTYPES = 2

    INVALID_CLASS_TYPE = 3

    OTHERS = 4 .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    READ TABLE T_CLOBJDAT INDEX 2. " KEY 'MAT_CHAR_THICKNESS'.

    IF SY-SUBRC = 0.

    T_OUTPUT1-THICK = T_CLOBJDAT-AUSP1.

    ENDIF.

    You can also try this BAPI BAPI_OBJCL_GETDETAIL

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 10:40 AM

    Hi Vitish,

    Use FM 'BAPI_OBJCL_GETDETAIL' to retrieve the classification data.

    Import params:

    1. Object key : give the material number

    2. Object table : give material master table i.e. MARA

    3. Class Num: Give the class name from which u have to fetch the characteristic data

    4. Class type: give '001' for material

    You will get the classification data in the following tables:

    ALLOCVALUESNUM

    ALLOCVALUESCHAR

    ALLOCVALUESCURR

    This should be helpful, do get back in case of any queries.

    Thanks and regards,

    Sonal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.