Skip to Content
0
Former Member
Jan 15, 2011 at 04:23 PM

Function Module (FM) as web service returning different types of subobjects

30 Views

Dear all,

I'd like to do something like described here for .NET in ABAP:

http://msdn.microsoft.com/en-us/library/system.xml.serialization.soapincludeattribute(VS.80).aspx

I have n specific classes (for example car, bike...) that inherit form a general class (for example vehicle). Now I would like to create a FM (function module) "GET_VEHICLE" and depending on the input parameter this FM should return an instance of car or an instance of bike. This FM must be remote enabled as I need to create a web service for it. For Remote-Enabled Function modules you can unfortunately not define a class (TYPE REF TO vehicle) as export parameter.

Is there any smart solution available in ABAP for this kind of problem?

Thank you very much

Regards

Felix