Hi all,
I'm implementing the examples from the REST How-To and have come across the following behaviour: I've created the basic classes and want to add the method REGISTER_RESOURCES as described in section 2.3.2. Now I have the following code:
METHOD register_resources. registry->register_discoverable_resource( EXPORTING url = '/restflights/01/carriers' handler_class = 'CL_SFLIGHT_ADT_RES_CARRIERS' description = 'Carriers' category_scheme = 'http://www.mycompany,com/adt/categories/examples/flights' category_term = 'carriers' ). collection = registry->register_discoverable_resource( url = '/restflights/01/flights' * accepted_types = * handler_class = * parameter = description = 'Flights' category_scheme = 'http://www.mycompany,com/adt/categories/examples/flights' category_term = 'flights' ). ENDMETHOD.
Naturally, the editor will complain about collection not being defined. If I use the quick fix to declare a local variable, I get
DATA: collection TYPE any.
which is not quite what I expected - I think this should be a TYPE REF TO IF_ADT_DISCOVERY_COLLECTION since this is what the method returns. The backend is SAP_BASIS/ABA 7.31 SP 13. Is this a known issue?
Thanks
Volker