Skip to Content
0
Jun 27, 2008 at 08:42 AM

Changing attribut of select option parameter by radio button

32 Views

Hello,

on a wd4abap view we have a radio button group and

some select options which are contained in an embedded view of type

WDR_SELECT_OPTIONS component.

The radio button group and the select-options works fine except of the following functionality.

Depending on the value of a radio button group we want to set the obligatory parameter of a select option to true / false.

To Do this, we implement an action

ONACTIONDO_INPUT_PREPARE

which is bound to the onselect attribute of the radio button group.

The result is that a dump in the wdr-select-option component occurs.

Code and Dump is stated below.

Is there a better way to implement this logic or is it an error in the framework ?

Best regards

Michael

  DATA lo_nd_query_options TYPE REF TO if_wd_context_node.
  DATA lo_el_query_options TYPE REF TO if_wd_context_element.
  DATA ls_query_options TYPE wd_this->element_query_options.
  DATA lv_key LIKE ls_query_options-key.
  DATA lv_sel_opt TYPE REF TO if_wd_select_options.
  data lt_result type ref to data.

* navigate from <CONTEXT> to <QUERY_OPTIONS> via lead selection
  lo_nd_query_options = wd_context->get_child_node( name = wd_this->wdctx_query_options ).

* get element via lead selection
  lo_el_query_options = lo_nd_query_options->get_element(  ).



* get single attribute
  lo_el_query_options->get_attribute(
    EXPORTING
      name =  `KEY`
    IMPORTING
      value = lv_key ).

  CASE lv_key.
    WHEN 'T'.

    WHEN 'E'.
      lv_sel_opt = wd_this->mo_selopt_tour_handler.

      CALL METHOD lv_sel_opt->upd_selection_field
        EXPORTING
          i_id                      = 'PARTNER'
          i_obligatory              = abap_false
          i_read_only               = abap_true
          .




    WHEN OTHERS.
  ENDCASE.  .

Der Aufruf der URL http://rb3ni24.server.bosch.com:8062/sap/bc/webdynpro/rb04/yl5_ui_moni_detect/ wurde aufgrund eines Fehlers abgebrochen.

Hinweis

Folgender Fehlertext wurde im System DM7 prozessiert: Dereferenzierung der NULL-Referenz.

Der Fehler trat auf dem Applikationsserver rb3ni24_DM7_62 und im Workprozess 0 auf.

Die Abbruchart war: RABAX_STATE

Die ABAP-Aufrufhierarchie war:

Method: ADD_RANGE_TABLE_TO_NODE of program CL_WDR_SELECT_OPTIONS=========CP

Method: RENDER_DELTA of program CL_WDR_SELECT_OPTIONS=========CP

Method: WDDOMODIFYVIEW of program /1BCWDY/9SYPKIXJ21Y8IHQCOHF1==CP

Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/9SYPKIXJ21Y8IHQCOHF1==CP

Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP

Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP

Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP

Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP

Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP

Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP