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

Getting BAPI Exceptions

Hi all

I have a JCO program and I want to get the exceptions avaliable in the BAPI.

as you know there are Import and export parameters in the BAPI as well as Changing annd Tables

there are also the Exceptions

I do not know how to get these exceptions when any exception happened.

can you help me please how to get the exception message to display it in the iView.

if you can please provide a sample code or guide me to a web site that may help finding a solution for that.

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2004 at 05:55 AM

    Hi again,

    I tried it and I got the solution 😊

    I read the log carefully and I found it returns an AbapException

    in JCo, we nedd actually to catch this type of exception to handle exceptions from SAP side.

    you catch JCO.AbapException and you can get the exception messgae and key

    String key;
    String exMessage;
    catch (JCO.AbapException ex3)
    {		
    exMessage = ex3.getMessage();
    key = ex3.getKey();
    //your logic
    }
    

    Thanks

    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.