(SP31) Lookup API documentation
Main Signature
Advanced users may use the class CL_RSDA_INFOPROV_QUERY to create their own reports. Below you can find API documentation of the SELECT( ) method for retrieving data.
CALL METHOD CL_RSDA_INFOPROV_QUERY=>SELECT
EXPORTING
I_INFOPROV = lv_infoprov_name
* I_T_ENTRIES =
* I_T_ENTRY_FIELDS =
* I_T_FIELD_SELECTIONS =
* I_R_SELECTION_SET =
* I_WHERE_CONDITION =
* I_APPEND =
* I_ORDER_BY_PRIMARY_KEY =
* I_HINT =
* I_STORAGE_SELECTION = CL_RSDA_INFOPROV_QUERY=>C_STORAGE_SELECTION-ALL
CHANGING
C_T_DATA =
.
Signature of SELECT
method:
Parameter | Type | Description | Optional |
---|---|---|---|
i_infoprov | char30 | Infoprovider name | |
i_t_entries | Any table | Table "FOR ALL ENTRIES" | X |
i_t_entry_fields | t_entry_fields | Projection and Alias Name for "FOR ALL ENTRIES" Table | X |
i_t_field_selections | t_field_selections | Projection, Alias Name, and Aggregation of ResultSet | X |
i_r_selection_set | cl_rsmds_set | Selection Condition as Multidimensional Set Object | X |
i_where_condition | csequence | Selection Condition As Open SQL Expression on Active Tab | X |
i_append | rs_bool | Indicator: Add Selected Data Records to C_T_DATA | X |
i_order_by_primary_key | rs_bool | Indicator: Sort by Primary Key (is Dominant) | X |
i_hint | rsdu_hint | DB hint for save | X |
i_storage_selection | rsda_storage_selection | Select DB (Online DB/NLS/ Online DB and NLS) | X |
ct_data | Standard Table | Result data set |
Code example
Note: For simplicity of code example, below code contains hardcoded values that need to be replaced with values relevant for the system where code is executed.
DATA:
lref_data TYPE REF TO data,
lx_error TYPE REF TO cx_root,
lv_count TYPE int4.
FIELD-SYMBOLS: <lt_data> TYPE STANDARD TABLE.
TRY .
CREATE DATA lref_data TYPE TABLE OF ('/BIC/AZJG_AD012').
ASSIGN lref_data->* to <lt_data>.
CALL METHOD cl_rsda_infoprov_query=>select
EXPORTING
i_infoprov = 'ZJG_AD01'
i_where_condition = `CALYEAR >= '2005'`
CHANGING
c_t_data = <lt_data>.
lv_count = LINES( <lt_data> ).
WRITE: 'Lines of data read: ', lv_count.
EXIT.
CATCH cx_root INTO lx_error.
ENDTRY.