Show TOC

Collecting the ResultsLocate this document in the navigation structure

After having called the submit method, you can use the following methods to retrieve the request result:

Method Description
get_result_object This method returns a reference to interface IF_ODL_OBJECT encapsulating the result of the request. You can use this method if you do not know whether the result is an entity or an entity set.
get_result_entity This method returns a reference to interface IF_ODL_ENTITY. We recommend using this method if you know that the result is an entity.
get_result_entityset This method returns a reference to interface IF_ODL_ENTITYSET. We recommend using this method if you know that the result is an entity set.
get_raw_result This method returns the raw result of the request in the form of an ABAP xstring.
get_result_string This method returns the result of the request in the form of an ABAP string.
get_result_header This method returns the HTTP result code of the request.
has_next This method returns the result header fields of the request.
Note Before collecting the result with one of the above methods, you need to have called submit beforehand. Otherwise, the result is not yet available and a CX_ODL_PROCESS_DYNAMIC exception will be raised.

For your result object, the interfaces IF_ODL_OBJECT, IF_ODL_ENTITY, and IF_ODL_ENTITYSET provide methods to further query the result. For more information, refer to the system documentation for these interfaces.

Example

You have an lo_request request object for which the submit method has been called. You can retrieve the result entity object, the result XML and the result code as follows:

DATA: lo_entity 	TYPE REF TO if_odl_entity,
      lv_xml 	   TYPE xstring,
      lv_result_code TYPE clb2_result_code.
lo_entity = lo_request->get_result_entity( ).
lv_xml = lo_request->get_raw_result( ).
lv_result_code = lo_request->get_result_code( ).