Skip to Content

Regarding exception ..

Dear friends,,

Could you kindly help me please to share your experience .. ??

I want to know how to raise exception in program (SE38).

I insert code for :




catch cx_root.

............... (1).


That's "try-catch" working when there is error. The program will not exit directly. But the problem, i will not know if there is a problem, because the program run smoothly as if it were not error.

My solution is:

I still wanna raise an error when error's happening, but i will catch what's transaction no that's getting error.

< i plan to insert code to raise that error in point (1) >

But i don't know how to raise the error in the program (SE38).

Could you help me what command that can raise the error (and the program will exit directly) ????

Really need your help please ..



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 29, 2008 at 08:45 AM

    If i understand you correctly, you have to put the appropriate code in the catch-branch.

    Either raise another exception


    or put a Message like this:

    Message 'Error xyz found doing abc' type 'A'.

    Both will terminate you program with a roll back and a sys abend. You can put other code which is suitable for you, of course.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 08:47 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 30, 2008 at 01:14 AM


    I'd like to say thanks ..

    My problem has solved completely ..

    I still use try-catch method ..

    But in the catch area, i use message using type 'X'.

    With that type, it will get out to short-dump (st22).

    Point has been awarded as my gratitude to you..



    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.