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

claf_classification_of_objects

Former Member
0 Likes
5,552

hi,

what is the use of 'claf_classification_of_objects' module when this function module use .

my object is get the production order detatils using 'bapi_prodord_get_detail' after want use this function module and pass the parameters in

class = cis

classtype = 001

object = afpo-matnr after i want down load the production order deatils. please help me what is the use of this function module .

regards

jai

hi,

what is the use of 'claf_classification_of_objects' module when this function module use .

my object is get the production order detatils using 'bapi_prodord_get_detail' after want use this function module and pass the parameters in

class = cis

classtype = 001

object = afpo-matnr after i want down load the production order deatils. please help me what is the use of this function module .

regards

jai

4 REPLIES 4
Read only

Former Member
0 Likes
3,029

hi

CLAF_CLASSIFICATION_OF_OBJECTS is used to get material-characteristics

use the Function Module CLAF_CLASSIFICATION_OF_OBJECT

to obtain the multiple values of the classification characterstic

Here is a sample code.

DATA : LV_CLASSNUM LIKE KLAH-CLASS,

LV_CLASS LIKE BAPI1003_KEY-CLASSTYPE VALUE '002' ,

LV_OBJECTKEY LIKE BAPI1003_KEY-OBJECT ,

LV_TAB LIKE BAPI1003_KEY-OBJECTTABLE VALUE 'EQUI',

LT_CLASSSTRUCT TYPE STANDARD TABLE OF SCLASS,

LT_VAL_CHAR TYPE STANDARD TABLE OF CLOBJDAT,

LW_VAL_CHAR TYPE CLOBJDAT .

CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

EXPORTING

CLASS = LV_CLASSNUM

CLASSTEXT = 'X'

CLASSTYPE = LV_CLASS

LANGUAGE = SY-LANGU

OBJECT = LV_OBJECTKEY

OBJECTTABLE = LV_TAB

KEY_DATE = SY-DATUM

INHERITED_CHAR = 'X'

TABLES

T_CLASS = LT_CLASSSTRUCT

T_OBJECTDATA = LT_VAL_CHAR

EXCEPTIONS

NO_CLASSIFICATION = 0

NO_CLASSTYPES = 0

INVALID_CLASS_TYPE = 0

OTHERS = 0.

IF SY-SUBRC <> 0.

ENDIF.

ENDIF.

regards

Navjot

Message was edited by:

navjot sharma

Read only

Former Member
0 Likes
3,029

> hi,

>

> what is the use of 'claf_classification_of_objects'

> module when this function module use .

>

> my object is get the production order detatils

> using 'bapi_prodord_get_detail' after want use this

> function module and pass the parameters in

> lass = cis

> classtype = 001

> object = afpo-matnr after i want down load the

> production order deatils. please help me what is the

> use of this function module .

with this funciton you read afpo-matnr <b>material </b> 001 class classification

If you want read <b>production order classification</b>

You may:

1. read order CUOBJ

CALL FUNCTION 'CO_SF_AFPO_READ'
      EXPORTING
        aufnr_imp = aufnr
      TABLES
        afpo_tab  = lt_afpo
      EXCEPTIONS
        not_found = 1
        OTHERS    = 2.
*->
    IF sy-subrc = 0.
      READ TABLE lt_afpo INTO ls_afpo
      WITH KEY aufnr = aufnr
               posnr = '0001'.
      IF sy-subrc = 0.
        lv_cuobj = ls_afpo-cuobj.
      ENDIF.
    ENDIF.

2.Read order data:

 CALL FUNCTION 'CUD0_GET_VAL_FROM_INSTANCE'
        EXPORTING
          instance                 = lv_cuobj
*   IMPORTING
*     TYPE_OF                  =
*     OWNER                    =
        TABLES
          attributes               = lt_attr
     EXCEPTIONS
       instance_not_found       = 1
       OTHERS                   = 2
                .

Read only

Former Member
0 Likes
3,029

Hi Jaya,

FM <b>CLAF_CLASSIFICATION_OF_OBJECTS</b> is used for Classification Data for Object.

Regards,

Hemant

Read only

Former Member
0 Likes
3,029

hi

good

CLAF_CLASSIFICATION_OF_OBJECTS Return all of the characteristics for a material

DATA : LV_CLASSNUM LIKE KLAH-CLASS,

LV_CLASS LIKE BAPI1003_KEY-CLASSTYPE VALUE '002' ,

LV_OBJECTKEY LIKE BAPI1003_KEY-OBJECT ,

LV_TAB LIKE BAPI1003_KEY-OBJECTTABLE VALUE 'EQUI',

LT_CLASSSTRUCT TYPE STANDARD TABLE OF SCLASS,

LT_VAL_CHAR TYPE STANDARD TABLE OF CLOBJDAT,

LW_VAL_CHAR TYPE CLOBJDAT .

CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

EXPORTING

CLASS = LV_CLASSNUM

CLASSTEXT = 'X'

CLASSTYPE = LV_CLASS

LANGUAGE = SY-LANGU

OBJECT = LV_OBJECTKEY

OBJECTTABLE = LV_TAB

KEY_DATE = SY-DATUM

INHERITED_CHAR = 'X'

TABLES

T_CLASS = LT_CLASSSTRUCT

T_OBJECTDATA = LT_VAL_CHAR

EXCEPTIONS

NO_CLASSIFICATION = 0

NO_CLASSTYPES = 0

INVALID_CLASS_TYPE = 0

OTHERS = 0.

IF SY-SUBRC <> 0.

ENDIF.

ENDIF.

SORT LT_VAL_CHAR BY ATNAM .

READ TABLE LT_VAL_CHAR INTO LW_VAL_CHAR WITH KEY ATNAM = 'PROPERTY' BINARY SEARCH .

IF SY-SUBRC EQ 0 .

P_LW_REPORT_CHARAC = LW_VAL_CHAR-AUSP1

ENDIF.

thanks

mrutyun^