2014 Jun 09 10:38 AM
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
2014 Jun 09 12:24 PM
Hi,
But that single RETURNING parameter can be complex .
Regards.
regards.
2014 Jun 09 10:52 AM
Functional methods can return only one parameter...Please refer ABAP Keyword Documentation
2014 Jun 09 10:58 AM
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.
2014 Jun 09 11:02 AM
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.
2014 Jun 09 11:09 AM
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.
2014 Jun 09 10:54 AM
It should be declare with two different methods.check it once.
Sincerely,
Priyaranjan
2014 Jun 09 10:59 AM
Hi Priyaranjan,
Thanks for ur rply. All methods are different i checked it but iam getting the same error.
2014 Jun 09 11:04 AM
Instead of returning parameter use importing parameter.it will work.
2014 Jun 09 11:07 AM
2014 Jun 09 11: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.
2014 Jun 09 11:39 AM
2014 Jun 09 11:42 AM
You are right. Instead of exporting parameters i have specified returning parameters.
2014 Jun 09 12:06 PM
2014 Jun 09 12:10 PM
2014 Jun 09 12:12 PM
2014 Jun 09 12:14 PM
2014 Jun 09 12:24 PM
Hi,
But that single RETURNING parameter can be complex .
Regards.
regards.
2014 Jun 09 12:28 PM
Hi Eitan,
Your example is very good and thanks for sharing with us.
2014 Jun 10 10: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