Skip to Content
author's profile photo Former Member
Former Member

SAP ABAP Object ERROR

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 19, 2005 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.