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

Raising clause in component controller method

Hi all.

I am currently trying to raise an exception in a component controller method which

has to be catched by the calling viewcontroller. But I can't find a way to define

the raise clause. Am i blind or is this not possible?

Thank you in advance.

Cheers,

Sascha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 08, 2007 at 04:39 PM

    Hi Sascha,

    This is not possible. The view designer does not support everything that is supported by ABAP OO (like static methods or attributes, constant values, catching any event of any class, etc). Main reasons are that either a certain feature does not fit into WD (static methods) or violates the holy grail of platform independence of WD in ABAP and Java. In WDJ you won't be able to define two methods that have the same name (although the Java language would support it in contrast to ABAP).

    Anyways, there have been small expections to this rule in order to adopt WD better to a specific platform. Nonetheless, it would be strange to completely rebuild the ABAP class builder for the purpose of enabling all kinds of ABAP OO language features within the Web Dynrpo design time. Of course, it is obvious that every developer wants to use exceptions, optional parameters, constant values, etc. Hence the assistance class concept was introduced. It doesn't mean that we won't add optional parameters, exceptions or refactoring in future. It means that the assistance class is the (already existing) place to unleash the full power of ABAP OO and all the powerful features that come along with using the class builder such as the refactoring framework and much, much more. The assistance class allows for an easy and convinient integration of ABAP OO into the WDA environment and it's highly advised to use it.

    Best regards,

    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Thomas.

      Thanks for the answer. It is pretty dissapointing but ok. I just wanted to forward the exception which is raised by a model method. So I catch it in the comp controller method and just return the message.

      Cheers,

      Sascha

  • Posted on Jan 08, 2007 at 04:39 PM

    You are not blind, I think the following post is very interesting:

    https://forums.sdn.sap.com/click.jspa?searchID=644915&messageID=2774067

    Sergio

    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.