Skip to Content
0
Jan 13, 2023 at 04:26 PM

FM CLAF_CLASSIFICATION_OF_OBJECTS

104 Views Last edit Jan 13, 2023 at 04:55 PM 2 rev

Trying to use this FM, if I run the FM in se37 it returns results.

If I run this code with the same inputs, it doesn't return anything. Why would it work in the test but not in code? Subrc is returning 1.

DATA: lv_sclass   TYPE TABLE OF sclass,
      lv_clobjdat TYPE TABLE OF clobjdat WITH HEADER LINE.


CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
  EXPORTING
    classtype          = '001'
    features           = 'X'
    object             = 'testcomp'
    objecttable        = 'MARA'
    initial_charact    = 'X'
  TABLES
    t_class            = lv_sclass
    t_objectdata       = lv_clobjdat
  EXCEPTIONS
    no_classification  = 1
    no_classtypes      = 2
    invalid_class_type = 3
    OTHERS             = 4.

IF sy-subrc = 0.
  LOOP AT lv_clobjdat.
    WRITE: / 'SPR_PKG_TYPE =',lv_clobjdat-ausp1.
  ENDLOOP.
ENDIF.<br>