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

Needed replacement for obsolete fm 'BAPI_CLASS_GET_CLASSIFICATIONS'

Former Member
0 Likes
1,212

Hi All,

I am upgrading 4.6c system to ECC version, I have encountered an obsolete fm 'BAPI_CLASS_GET_CLASSIFICATIONS'.Can anyone provide me replacement for this fm.Below is the code.

CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'

EXPORTING

classtype = 'P01'

classnum = wa_obj_class-class

key_date = sy-datum

IMPORTING

return = ws_return

TABLES

object_classification = it_values

class_objects = it_object.

Rewards if useful.

Thanks & Regards,

Indu.

3 REPLIES 3
Read only

Former Member
0 Likes
771

Hi,

try this: CLAF_CLASSIFICATION_OF_OBJECTS

call function 'CLAF_CLASSIFICATION_OF_OBJECTS'

exporting

class = <class>

classtype = <klart>

object = <matnr>

objecttable = 'MARA'

tables

t_class = t_class

t_objectdata = t_objectdata

exceptions

no_classification = 1

no_classtypes = 2

invalid_class_type = 3

others = 4.

Read only

0 Likes
771

Hi,

Use,

  • Retrieve Material Batch Classes

CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

EXPORTING

classtype = zc7b1_batch_class_type

features = 'X'

language = 'E'

object = w_object

objecttable = 'MCH1'

initial_charact = 'X'

TABLES

t_class = t_lclass

t_objectdata = t_objectdata

EXCEPTIONS

no_classification = 1

no_classtypes = 2

invalid_class_type = 3

OTHERS = 4.

Read only

0 Likes
771

Hi All,

Thanks for the immediate reply.I have replaced the code as per ur suggestion as follows

CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

EXPORTING

CLASS = wa_obj_class-class

  • CLASSTEXT = 'X'

classtype = 'P01'

  • CLINT = 0

  • FEATURES = 'X'

  • LANGUAGE = SY-LANGU

object =

  • OBJECTTABLE = ' '

KEY_DATE = SY-DATUM

  • INITIAL_CHARACT = 'X'

  • NO_VALUE_DESCRIPT =

  • CHANGE_SERVICE_CLF = 'X'

  • INHERITED_CHAR = ' '

  • CHANGE_NUMBER = ' '

tables

t_class = it_values

t_objectdata = it_object

  • 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.

But i am not able to replace the EXPORTING parameter 'object'.As it is mandatory parameter i cannot ignore it.Kindly suggest me a solution.

Regards,

Indu..