2014 Dec 01 8:44 PM
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
2014 Dec 02 2:49 PM
Hi Volker,
yes, this behavior is known - especially in SAP_BASIS 7.31. In this release we can't infer the type to that extent as we currently do it in SAP_BASIS 7.4. In the higher releases we are much better - nevertheless there are still some cases when we need to propose TYPE ANY instead of the complete (correct) type.
We plan to improve this in the future, but unfortunately I can't give you any date.
Thanks for your understanding and best regards, Sebastian
Hi Volker,
yes, this behavior is known - especially in SAP_BASIS 7.31. In this release we can't infer the type to that extent as we currently do it in SAP_BASIS 7.4. In the higher releases we are much better - nevertheless there are still some cases when we need to propose TYPE ANY instead of the complete (correct) type.
We plan to improve this in the future, but unfortunately I can't give you any date.
Thanks for your understanding and best regards, Sebastian
2014 Dec 02 2:49 PM
Hi Volker,
yes, this behavior is known - especially in SAP_BASIS 7.31. In this release we can't infer the type to that extent as we currently do it in SAP_BASIS 7.4. In the higher releases we are much better - nevertheless there are still some cases when we need to propose TYPE ANY instead of the complete (correct) type.
We plan to improve this in the future, but unfortunately I can't give you any date.
Thanks for your understanding and best regards, Sebastian
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |