‎2007 Aug 07 10:47 PM
I am executing a function module to find classification data
CLAF_CLASSIFICATION_OF_OBJECTSwhich gives me a dump for
RAISE NO_CLASSIFICATIONhow to handle such exceptions. I am new to exception handling so could someone help me with the code.
Thank you
‎2007 Aug 07 11:05 PM
Hi,
Try giving the exceptions when calling the function module..
Ex..
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
* CLASS = ' '
* CLASSTEXT = 'X'
classtype =
* 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 =
t_objectdata =
* I_SEL_CHARACTERISTIC =
* T_NO_AUTH_CHARACT =
EXCEPTIONS
NO_CLASSIFICATION = 1
NO_CLASSTYPES = 2
INVALID_CLASS_TYPE = 3
OTHERS = 4
.
Thanks
Naren
‎2007 Aug 07 11:05 PM
Hi,
Try giving the exceptions when calling the function module..
Ex..
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
* CLASS = ' '
* CLASSTEXT = 'X'
classtype =
* 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 =
t_objectdata =
* I_SEL_CHARACTERISTIC =
* T_NO_AUTH_CHARACT =
EXCEPTIONS
NO_CLASSIFICATION = 1
NO_CLASSTYPES = 2
INVALID_CLASS_TYPE = 3
OTHERS = 4
.
Thanks
Naren
‎2007 Aug 07 11:13 PM
When you insert the function call using the pattern button in SE38, you will get the exceptions and optional parameters commented out. Uncomment the exceptions and also the following sy-subrc check. See below.
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.