SAP SELECT EXTENDED RESULT ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• EXTENDED RESULT SELECT INTO

SELECT, extended_result
Short Reference

ABAP_SYNTAX
... EXTENDED RESULT @oref ...

What does it do?
The EXTENDED RESULT addition of the INTO clause can be used to provide an extended result of the current main query in a result object. After EXTENDED RESULT, an object reference variable oref of static type for the documented class CL_OSQL_EXTENDED_RESULT must be specified as a host variable , which points to an object of the class. The reference variable must be prefixed with the escape character @.
The following applies to the use of EXTENDED RESULT:
The reference variable must not be initial and the object must be created before the AB-SQL statement is executed. Parameters that specify which values the extended result should include must be passed to the instance constructor of class CL_OSQL_EXTENDED_RESULT.
If possible, the result object is filled with the requested values during the first database access.
If a loop is opened using the statements SELECT or WITH, the result object is filled once when the loop is entered.
If the INTO clause after FETCH is used for the result set of a database cursor opened using OPEN CURSOR, the result object is filled once in the first FETCH statement.
After the AB-SQL statement is closed, the required values can be read using the instance methods of the class. If the result object then contains no results or no valid results, an exception of the class CX_OSQL_EXTENDED_RESULT is raised.



Latest notes:

NON_V5_HINTS
Currently, the addition EXTENDED RESULT can only be used when accessing cached views of the SAP HANA database.
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Excerpt from the executable example SAP HANA, Cached Views.
ABEXA 00611
ABAP_EXAMPLE_END

Return to menu