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

Reading Classification data for material

0 Likes
1,225

Hi all

can anybody give me a FM or BAPI to read the classification data

for a particular material..

Kindly help . apt points will be rewarded

Regards

N manjrekar

4 REPLIES 4
Read only

Former Member
0 Likes
566

HI,

Use the BAPI

BAPI_OBJCL_GETDETAIL

for reading the classification data of Material.

Regards,

Anji

Message was edited by:

Anji Reddy Vangala

Read only

Former Member
0 Likes
566

hi Nikhil,

Please try the following FMS:

<b>CLAF_CLASSIFICATION_OF_OBJECTS

CLAF_OBJECTS_OF_CLASS.</b>

Hope this helps,

Sajan Joseph.

Read only

Former Member
0 Likes
566

Hi Guys,

I have a similar requirement where in i need to link both MARA and KLAH as well as EQUI and KLAH to extract material and equipment of a particular characteristic name ( which is mentioned in the class) . Kindly guide me as to how to go about the process .

Regards,

Venkatesh.

Read only

Former Member
0 Likes
566

Hi Nikhil

just copy paste this code to get the clasification of any material.

hope this will be helpful.

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.

Please close the thread if your query in answered

Reward points if helpful.

Regards

Zarina