Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Class builder

Former Member
0 Likes
6,169

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

1 ACCEPTED SOLUTION
Read only

rosenberg_eitan
Active Contributor
0 Likes
5,752

Hi,

But that single RETURNING parameter can be complex .

Regards.

regards.

18 REPLIES 18
Read only

Former Member
0 Likes
5,752

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

Read only

0 Likes
5,752

Hi Aarshrith,

                  Thanks for ur rply. No it can return multiple i have done before for multiple but i cannot find any sort of issue.

Read only

0 Likes
5,752

I guess you have confused EXPORTING with RETURNING.

If you were able to return multiple parameters using RETURNING, prove it and I would glad tell SAP that their documentation is wrong.

ABAP Keyword Documentation

Read only

0 Likes
5,752

Hi manish,

            

                 ur correct. but can you tell me the solution regarding this example and is related to sap technical example 8. can you please try this. I think its returning multiple values.

Read only

Former Member
0 Likes
5,752

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

Sincerely,

Priyaranjan

Read only

0 Likes
5,752

Hi Priyaranjan,

                    

                       Thanks for ur rply. All methods are different i checked it but iam getting the same error.

Read only

Former Member
0 Likes
5,752

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

Read only

0 Likes
5,752

k.k. Thanks i wl try  and see it.

Read only

Former Member
0 Likes
5,752

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.

Read only

Former Member
0 Likes
5,752

what was your mistake?

Read only

0 Likes
5,752

You are right. Instead of exporting parameters i have specified returning parameters.

Read only

Former Member
0 Likes
5,752

Thank you ..JJ

Read only

0 Likes
5,752

ur pleasure. Your working on abap right now.

Read only

0 Likes
5,752

as a abap hr..consulant.

Read only

0 Likes
5,752

This message was moderated.

Read only

rosenberg_eitan
Active Contributor
0 Likes
5,753

Hi,

But that single RETURNING parameter can be complex .

Regards.

regards.

Read only

0 Likes
5,752

Hi Eitan,

            Your example is very good and thanks for sharing with us.

Read only

Former Member
0 Likes
5,752

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