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

Class builder

methods GET_VEHICLE

returning

value(EV_CAR_MODEL) type CHAR20

value(EV_CAR_DETAIL) type CHAR50

value(EV_BIKE_MODEL) type CHAR20

value(EV_BIKE_DETAIL) type CHAR50 . I am getting error in the following code can and it is se24 while activating the class I got this issue.


can anyone please answer my question.Below is the screen shot regarding the issue.




Moderator message - Please use proper subject lines in future.

Message was edited by: Suhas Saha

image.png (33.7 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Posted on Jun 09, 2014 at 11:24 AM

    Hi,

    But that single RETURNING parameter can be complex .

    Regards.

    regards.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 10:04 AM

    Instead of returning parameter use importing parameter.it will work.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 09:52 AM

    Functional methods can return only one parameter...Please refer ABAP Keyword Documentation

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 09:54 AM

    It should be declare with two different methods.check it once.

    Sincerely,

    Priyaranjan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 10:22 AM

    Hi All,

    Thanks to all I got the solution. All of u are correct I only made a some blunder mistake.

    Thanks once again for your replies.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 10:39 AM

    what was your mistake?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 11:06 AM

    Thank you ..JJ

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2014 at 09:42 AM

    Hi,

    You can have only one returning parameter for a method in a class.I've just created test class with method having same parameter's which you've posted.On activation, it is giving me same error msg '"... TYPE type" addition can only be specified once -'.

    When you click on correct errors in error line it deletes all the three returning parameter's as shown below.

    On Activation,it prompts with message which says 'do you want to delete parameter' as shown below

    Thus, the method has only one returning parameter.

    Hope this gives you justification for your query.

    Thanks

    KH


    Capture.JPG (36.7 kB)
    Capture.JPG (27.8 kB)
    Capture.JPG (38.5 kB)
    Capture.JPG (43.6 kB)
    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.