I have a strange situation with select-options.
I am using WDR_SELECT_OPTIONS.
when i double click this windows( f4 help).
I got this error:
PAGE: ERROR: Access via 'NULL' object reference not possible. (termination: RABAX_STATE)
ST22 : OBJECTS_OBJREF_NOT_ASSIGNED
Termination occurred in the ABAP program "/1BCWDY/U9RGIEU9FW
in "APPLY_RESULT".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 36
of the (Include) program "/1BCWDY/B_U9RGJI0125IU5ZWOPZ0N".
La cancelación ocurrió en una aplicación Web Dynpro
Componente Web Dynpro WDR_OVS
Controlad.Web Dynpro COMPONENTCONTROLLER.
Here my code in init event in my view.
data: lt_range_table type ref to data,
rt_range_table type ref to data,
lt_range_table2 type ref to data,
rt_range_table2 type ref to data,
read_only type abap_bool,
typename type string.
* it_rut type ref to data.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_seleccion( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
wd_this->m_wd_select = wd_this->wd_cpifc_seleccion( ).
* init the select screen
wd_this->m_handler = wd_this->m_wd_select->init_selection_screen( ).
*
* create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'ZGGERUT' ).
*
CALL METHOD wd_this->m_handler->add_block
EXPORTING
i_id = 'B'
i_block_type = if_wd_select_options=>mc_block_type_group
i_title = 'Introduce los datos a continuación'
i_hide_if_empty = abap_false.
*
*
*DATA: complex_restrictions TYPE if_wd_select_options=>t_complex_restrictions,
* ls_rsoptions type rsoptions.
* clear ls_rsoptions.
* ls_rsoptions-bt = abap_false.
* ls_rsoptions-cp = abap_true.
* ls_rsoptions-eq = abap_false. " for enable only single value*
* ls_rsoptions-ge = abap_false.
* ls_rsoptions-gt = abap_false.
* ls_rsoptions-le = abap_false.
* ls_rsoptions-lt = abap_false.
* ls_rsoptions-nb = abap_false.
* ls_rsoptions-ne = abap_false.
* ls_rsoptions-np = abap_false.
* complex_restrictions-m_include = ls_rsoptions.
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'ZGGERUT'
it_result = lt_range_table
i_read_only = read_only
* I_COMPLEX_RESTRICTIONS = complex_restrictions
* i_use_complex_restriction = abap_true
i_within_block = 'B').
*********************
* create a range table that consists of this new data element
lt_range_table2 = wd_this->m_handler->create_range_table(
i_typename = 'ZMVD_TIPO' ).
wd_this->m_handler->add_selection_field(
i_id = 'ZMVD_TIPO'
it_result = lt_range_table2
i_read_only = read_only
i_within_block = 'B').