Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting material characteristics

Former Member
0 Likes
7,685

Hi ,

I have to get characteristics of a matnr. For this, I have googled and got to know that the table AUSP contains fields OBJEK and ATINN which can be used to fetch characteristics of matnr from another table and that AUSP-OBJEK = MATNR.

Unfortunately, I dont find my MATNR in the table AUSP.

My question is, how to get ATINN of matnr.

Cheers

A.

13 REPLIES 13
Read only

Former Member
0 Likes
3,298

Hi

May This wiki page helpful [http://wiki.sdn.sap.com/wiki/display/SAPMDM/Issuesinfetchinginternalcharacteristicsofmaterials]

Read only

Former Member
0 Likes
3,298

Hi A,

In table AUSP you will find all the charateristics for the material so you have it already. In case you want to get the external name of the characteristic, use the conevrsion routine:

CONVERSION_EXIT_ATINN_OUTPUT.

Kind regards,

Robert

Read only

0 Likes
3,298

Thanks for the replies. Both were helpful. But the problem is still stuck at the table "AUSP". I have values for ATINN, MAFID and KLART. Unfortunately there doesnt exist any entry in the field "ATWRT" fullfilling aformentioned field values i.e;

SELECT atwrt from ausp into lv_atwrt where atinn = lv_atinn and mafid = 'O' and KLART = lv_klart .

The above query doesnt deliver ATWRT.

Cheers,

A.

Read only

Former Member
0 Likes
3,298

Hi,

1.

CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'

export.

OBJECTKEY_IMP = material number "material should be as it is in mara including zero's

OBJECTTABLE_IMP = MARA "table name

CLASSTYPE_IMP =001 "class type of that material

READ_VALUATIONS

KEYDATE

LANGUAGE =EN

tables.

ALLOCLIST = itab "Here u will get material related class name

2.Pass this class name to below function module to get the characterstics of that material.

CALL FUNCTION 'CARD_CLASS_READ_CHARACTS'

EXPORTING

class = L_CLASS "class name

class_type = '001' "Class type

LANGUAGE = SY-LANGU

tables

characteristics = GT_CHAR "characterstic

characteristics_values = GT_CHAR_VAL

Thanks and Regards

Srinivas

Edited by: briteny on Mar 1, 2011 8:58 AM

Read only

0 Likes
3,298

Hi Britney,

I executed FM "CARD_CLASS_READ_CHARACTS" in SE37. Unfortunately I am getting "?" in column Characteristic Value and not the characteristics.

Cheers,

Read only

0 Likes
3,298

Use BAPI_OBJCL_GETDETAIL

OBJECTKEY -> Material Number
OBJECTTABLE -> MARA
CLASSNUM -> Class name from MM03 Classification View
CLASSTYPE -> Class Type from MM03 Classification View

Read only

0 Likes
3,298

BAPI_OBJCL_GETDETAIL is displaying character descriptions and not their Values..

Read only

0 Likes
3,298

Are you sure? Did you check these values?

ALLOCVALUESNUM-VALUE_FROM,VALUE_TO
ALLOCVALUESCHAR-VALUE_CHAR
ALLOCVALUESCURR-VALUE_FROM,VALUE_TO

Hope you are talking about material characteristics in material master.

Read only

0 Likes
3,298

FM "CLAF_CLASSIFICATION_OF_OBJECTS" supplied complete charactereistics values.

Thanks

Read only

0 Likes
3,298

Hi,

1. First declare a variable objek in the matnr structure(i_mara).

objek should be of type cuobn.

loop at i_mara assigning <fs_mara>.

<fs_mara>-objek = <fs_mara>-matnr.

endloop.

2. select cuobj

objek

from inob

into table i_inob

for all entries in i_mara

where (objab = 'MARA' or obtab = 'MARAT')

and objek = i_mara-objek

and klart = '026'.

3.define a variable objek1 in structur(i_inob)

objek1 type objnum.

loop at i_inob assigning <fs_inob>.

<fs_inob>-objek1 = <fs_inob>-cuobj.

endloop.

call function 'conversion_exit_atinn_input'

exporting

input = 'zcolour'

importing

output = v_atinn

4. select objek

atwrt

from ausp

into table i_ausp

for all entries in i_inob

where objek = i_inob-objek1

and atinn = v_atinn.

Thanks & Regards,

Priz.

Read only

0 Likes
3,298

Hi,

In point 4, getting the condition objek = i_inob-objek1 Not True

Read only

0 Likes
3,298

The below SQL works for me ,

SELECT
mara~matnr,
ausp~atwrt
FROM mara
LEFT OUTER JOIN inob ON ( inob~klart = '001' “class type
AND inob~obtab = 'MARA'
AND inob~objek = mara~matnr
)
LEFT OUTER JOIN cabn ON ( cabn~atnam = 'Z_xxxx_MATE' ) “char. value
LEFT OUTER JOIN ausp ON ( ausp~objek = inob~cuobj
AND ausp~atinn = cabn~atinn
AND ausp~klart = '001' “class type

)
INTO TABLE @DATA(itab_clas)
WHERE mara~matnr = '000000000001000xxx'.

Read only

0 Likes
3,298

Ashish, do you have any extra detail on when/why you use left table join? I have only used it to exclude tables I added that I didn't need in SQVI. Any other details would be greatly appreciated.