‎2008 Jun 06 8:09 AM
I am using AUSP table to get the Charateristics of the Material, but for some Materials the Charateristics are not updated in the AUSP table, but when i see thru MM03 txn the charateristics are displayed.
Is there any other table where Charateristics are maintained.
‎2008 Jun 06 8:20 AM
Hi,
U can directly use this FM to get the material characteristics
BAPI_CLASS_GET_CLASSIFICATIONS
Thanks,
Anon
‎2008 Jun 06 8:10 AM
Hi,
check here:
Classification
KLAH Class Detail
CABN Characteristic Detail
CAWN Characteristic Values
CAWNT Characteristic Value Texts
KSML Characteristic Allocation to Class
KSSK Material Allocation to Class
Regards Vassko!
‎2008 Jun 06 8:19 AM
Hi
for material classification retreval the tables used are
MARA, INOB, KSSK, KLAH, AUSP
first read data from MARA into I_MARA
based on the entries of I_MARA reada data from I_INOB
Based on I_INOB read data from I_KSSK
IF I_KSSK is not intial
select dataf from KLAH into I_KLAH
select data from AUSP.
endif.
sample code is
IF NOT i_mara IS INITIAL.
Extracting data from INOB table
SELECT cuobj
klart
obtab
objek
FROM (w_inob)
INTO TABLE i_inob
FOR ALL ENTRIES IN i_mara
WHERE obtab = c_mara
AND objek = i_mara-fmatnr.
IF sy-subrc = c_0.
SORT i_inob BY objek.
ENDIF.
IF i_inob IS NOT INITIAL.
PERFORM f_get_cuobj.
Extracting data from KSSK table
SELECT objek
klart
clint
FROM (w_kssk)
INTO TABLE i_kssk
FOR ALL ENTRIES IN i_inob
WHERE objek = i_inob-fcuobj.
IF sy-subrc = c_0.
SORT i_kssk[] BY objek klart clint.
ENDIF.
ENDIF.
IF i_kssk IS NOT INITIAL.
Extracting data from KLAH table
SELECT
clint
klart
class
FROM (w_klah)
INTO TABLE i_klah
FOR ALL ENTRIES IN i_kssk
WHERE clint = i_kssk-clint
AND klart = i_kssk-klart.
IF sy-subrc = c_0.
SORT i_klah[] BY clint klart class.
ENDIF.
Extracting data from AUSP table
SELECT objek
atinn
klart
atwrt
FROM (w_ausp)
INTO TABLE i_ausp
FOR ALL ENTRIES IN i_kssk
WHERE objek = i_kssk-objek.
IF sy-subrc = c_0.
SORT i_ausp[] BY objek atinn.
ENDIF.
ENDIF.
IF NOT i_ausp[] IS INITIAL.
Extracting data from KSML table
SELECT clint
imerk
klart
FROM (w_ksml)
INTO TABLE i_ksml
FOR ALL ENTRIES IN i_ausp
WHERE imerk = i_ausp-atinn
AND klart = i_ausp-klart.
IF sy-subrc = c_0.
SORT i_ksml BY clint imerk.
ENDIF.
Extracting data from CABN table
SELECT atinn
atnam
atfor
FROM (w_cabn)
INTO TABLE i_cabn
FOR ALL ENTRIES IN i_ausp
WHERE atinn = i_ausp-atinn.
IF sy-subrc = c_0.
SORT i_cabn[] BY atinn.
ENDIF.
ENDIF.
ELSE.
error message
ENDIF.
Regards,
Sriram
‎2008 Jun 06 8:20 AM
Hi,
U can directly use this FM to get the material characteristics
BAPI_CLASS_GET_CLASSIFICATIONS
Thanks,
Anon
‎2008 Jun 06 8:32 AM