Application Development 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: 

Function Module CLAF_CLASSIFICATION_OF_OBJECTS is thrrowing exception

Former Member
0 Kudos

Hi,

I have used this function in one of my program

CLAF_CLASSIFICATION_OF_OBJECTS

-


but it is throwing "NO_CLASSIFICATION" Exception and breaks into a short dump

only if i give some plant in the selection screen which is

can any one help.

3 REPLIES 3

athavanraja
Active Contributor
0 Kudos

if you want to prevent the dump, after the function module call check for sy-subrc

if sy-subrc eq 1 .

  • its NO_CLASSIFICATION exception

endif .

call function 'CLAF_CLASSIFICATION_OF_OBJECTS'

....

exceptions

no_classification = 1

invalid_class_type = 2.

make sure that the exceptions are not commented when you call the FM.

Regards

Raja

former_member188685
Active Contributor
0 Kudos

try to uncomment the exceptions.

   CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
      EXPORTING
        classtext          = ' '
        classtype          = '300'
        features           = ' '
        language           = sy-langu
        object             = matl
        objecttable        = 'MARA'
        key_date           = p_date
      TABLES
        t_class            = class_allocs
        t_objectdata       = obj_data
<b>      EXCEPTIONS
        no_classification  = 1
        no_classtypes      = 2
        invalid_class_type = 3
        OTHERS             = 4.
    IF sy-subrc = 0.</b>

endif.

and handle them if you can.

regards

vijay

Former Member
0 Kudos

It means that there is no classification maintained for the object in that plant. Are you asking how to avoid dump or avoid the error itself? Avoiding dump is already covered by others here, and to avoid the error itself, you basically need to maintain the data.

Is this material classification at batch level or something else?

Please let us know.

Srinivas