10-19-2005 10:29 AM
HI
I GOT THESE TYPE OF ERROR IN THE EXCEPTION HANDLING IN THE CLASS BASED METHOD.,HERE I WRITE THE CODE
TRY.
CALL METHOD OL_OBJ->GET_DATA
EXPORTING
IM_VAL = 23
IM_VAL1 = 34.
CATCH ZCX_ERROR INTO LP_ZCX_ERROR.
IF NOT LP_ZCX_ERROR IS INITIAL.
RAISE EXCEPTION TYPE ZCX_ERROR
EXPORTING
TEXTID = IP_ZCX_ERROR->TEXTID
NODE_TYPE = IM_NODE_TYPE.
ENDIF.
ENDTRY.
I GOT THE THESE KIND OF ERROR
ERROR MESSAGE
Old and new exceptions cannot be used the same time.
YOU HAVE ANY IDEA
MEANS
REGARDS
GG
10-19-2005 10:42 AM
Hi Guna,
I am afraid there's no workaround to this. Just decide for one type of exception declaration in your method GET_DATA or your current method depending on where this error is reported.
Kind regards,
Thomas
10-19-2005 1:19 PM
hi
i am calling the method inside another method.,
i want to raise the exception when it fails.,
so that i am using the TRy endtry block
10-19-2005 1:29 PM
Hi Guna,
The question is: Does the method called support class based exceptions? If not, you cannot catch them, but you should use old style exceptions.
Furthermore, the next question is if the current method already has old style or class based excpetions? If it has old style exceptions you cannot raise a class based one, but you need to raise a old style one.
Hope, this clarifies.
Kind regards,
Thomas
10-19-2005 10:43 AM
Hi Guna,
i guess that the method OL_OBJ->GET_DATA has a EXCEPTION in the definition.
It's not allowed to match class-based-exception and the this old exception concept.
Hope I'm not wrong,
Stefan