‎2006 Aug 07 3:24 PM
Hi !
I need to create a report of all FERT material and their characteristic values. please tell me at which
transparent table & field i find the characteristic values, and the table relations ship to table MARA
and CABN.
thanks
moshe
‎2006 Aug 07 3:37 PM
Hey,
Select the materials from MARA based on Material type(field MTART) and then use the function module BAPI_OBJCL_GETDETAIL to get the classification details.
The import parameters OBJECTTABLE should be set to MARA, OBJECTKEY should be set to material number with leading zeroes and CLASSNUM should be set to 001.
-Kiran
*Please mark useful answers
‎2006 Aug 08 8:39 AM
Hi Kiran !
First thanks for your answer.
I wanted to ask about the function parameter
CLASsTYPE. What is the meaning of CLASsTYPE field what value should i assign to CLASsTYPE field in order to execute the bapi ?
‎2006 Aug 08 8:53 AM
Hey,
There was a typo in my previous post. The CLASSTYPE has to be set to 001 and CLASSNUM is to be set to the name of the class.
Use the function BAPI_OBJCL_GETCLASSES instead of the function I had suggested earlier. BAPI_OBJCL_GETCLASSES will give you the list of all classes and characteristics assgined to the material. Set the parameter READ_VALUATIONS to X to get the characteristic assignments.
If you want to retrieve characteristics of a specific class then use BAPI_OBJCL_GETDETAIL.
Class type: Each class is assigned to an class type. It is used to uniquely identify a class. For e.g. All material classes are assigned to class type 001, equipment classes are assigned to 002, functional location classes are assigned to 003.. etc
-Kiran
‎2006 Aug 08 8:55 AM
classtype is nothing but Classification value.
in MM03 transaction, if you select CLASSIFICATION view it will ask you the class type (ex 001...) , for this classification type you will fill other values.
its table field is <b>KLART.</b> you can find it in AUSP etc..tables
regards
srikanth
‎2006 Aug 07 3:46 PM
‎2006 Aug 07 4:26 PM
Follow the below steps to get the finished goods and their characteristic values.
1) Declare two internal tables as follows:
**-Table for holding object key
BEGIN OF it_object_key occurs 0,
objek TYPE ausp-objek, " Key of object to
" be classified
END OF it_object_key,
**-Table for holding characteristic values for material
BEGIN OF it_ausp occurs 0,
objek TYPE ausp-objek, " Key of object to
" be classified
atinn TYPE ausp-atinn, " Internal characteristic
atwrt TYPE ausp-atwrt, " Characteristic value
END OF it_ausp,
2) Get all the finished materials into an internal table.
select matnr
from mara
into it_mara
where mtart = 'FERT'.
3) Store the material numbers as object keys
LOOP AT it_mara.
it_object_key-objek = it_mara-matnr.
APPEND it_object_key.
CLEAR it_object_key.
ENDLOOP.
4) Get the characteristic values for materials
IF NOT it_object_key[] IS INITIAL.
SELECT objek " Key of object to be classified
atinn " Internal characteristic
atwrt " Characteristic value
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_object_key
WHERE objek = it_object_key-objek.
IF sy-subrc = 0.
SORT it_ausp BY objek atinn.
ENDIF.
ENDIF.
Note: If you know any internal characteristic for which values are to be retrieved, pass the internal characteristic in the 'where' clause of above 'select' statement.
IF NOT it_object_key[] IS INITIAL.
SELECT objek " Key of object to be classified
atinn " Internal characteristic
atwrt " Characteristic value
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_object_key
WHERE objek = it_object_key-objek
and atinn = c_internal_charac.
IF sy-subrc = 0.
SORT it_ausp BY objek atinn.
ENDIF.
ENDIF.
‎2007 Feb 23 3:16 PM