2008 Jan 17 1:14 AM
I have found VBWS_MARA_CLASSIFICATION_GET but this always tells me that the class isn't found. Then I found a few threads that gave me BAPI_OBJCL_GETDETAIL but that doesn't help if I don't know the class object. Is there any way to get the material classification data through a BAPI or FM that I can put into a BAPI? If not then what do I have to do to get this data?
Regards,
Davis
2008 Jan 17 3:31 AM
Hi Davis,
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.
cheers,
Hema.
2008 Jan 17 3:30 AM
Hi Davis,
if u r talking about material description then it MAKT.
or,
use the Fn module : read_text.
cheers,
Hema.
2008 Jan 17 3:31 AM
Hi Davis,
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.
cheers,
Hema.
2008 Jan 17 6:31 PM
Hema,
Thank you very much for that information. I
Regards,
Davis
Edited by: Davis on Jan 17, 2008 2:00 PM
2008 Jan 17 3:32 AM
Or Davis u can use the following code, I got it 4m my friend.
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.
cheers,
Hema.