cancel
Showing results for 
Search instead for 
Did you mean: 

Clase excepciu00F3n: CX_BOL_EXCEPTION - line 118

Former Member
0 Kudos
88

Hi guys,

I face this exception when i try to save a BP after editing the taxnumber in component BP_DATA/accountaxnumberlist and it's giving me this exception Clase excepción: CX_BOL_EXCEPTION CL_CRM_BOL_CORE=>REREAD_ENTITY.

It seems that a component that it's trying to access has been deleted, any idea?

Best Regards

Jon

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Check your changes in BP_DATA component for that view, may be in some method you would be calling the reread_entity method incorrectly.

Regards,

Shobhit

Former Member
0 Kudos

i have checked it and i do ot see any call to the method.

Former Member
0 Kudos

Can you copy paste your custom code if you have enhance any method of that view.

Regards,

Shobhit

Former Member
0 Kudos

Yes.

There it is

method CONNECT_NODES.

    DATA: coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper.

    super->connect_nodes( iv_activate ).


endmethod.
method CREATE_CONTEXT_NODES.


    super->create_context_nodes( controller ).


endmethod.

method CREATE_BUILTAXNUMBER.
  DATA:
    model        TYPE REF TO if_bsp_model,
    coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
    entity       TYPE REF TO cl_crm_bol_entity.             "#EC *
*      entity_col   TYPE REF TO if_bol_entity_col.    "#EC *

  model = owner->create_model(
      class_name     = 'ZL_BP_DATA_ACCOUNTTAXNUM1_CN01'
      model_id       = 'BuilTaxNumber' ).                   "#EC NOTEXT

  builtaxnumber ?= model.
*    CLEAR model.

* initial setting for depandant model node
  coll_wrapper =
    builheader->get_collection_wrapper( ).
  TRY.
      entity ?= coll_wrapper->get_current( ).
    CATCH cx_sy_move_cast_error.
  ENDTRY.
  IF entity IS BOUND.
    builtaxnumber->on_new_focus(
                 focus_bo = entity ).
  ENDIF.
endmethod.

I also implemented crm_bp_uiu_save badi and the method on save event of the implementation of this badi called

zl_crm_im_bp_tax_numbers_check, and the code is this


METHOD on_save_event.

* Check required fields:
  DATA:  lr_comp_contr       TYPE REF TO cl_bsp_wd_component_controller,
         lr_wind_contr       TYPE REF TO cl_bsp_wd_window,
         lr_view_contr       TYPE REF TO cl_bsp_wd_view_controller,
         lr_ovview_contr     TYPE REF TO cl_bsp_wd_view_controller,
         lr_runtime_rep      TYPE REF TO cl_bsp_wd_repository,
         lv_name             TYPE        string,
         lt_children         TYPE        tbsp_wd_rep_views,
         lr_child            TYPE REF TO cl_bsp_wd_rep_view,
         lr_child_rep_view   TYPE REF TO cl_bsp_wd_rep_view,
         lr_ov_rep_view      TYPE REF TO cl_bsp_wd_rep_view,
         lt_active_views     TYPE bsp_dlc_ovw_dyn_views_list_t,
         lt_static_views     TYPE bsp_dlc_ovw_dyn_views_list_t.
DATA: lv_empty_mandatory_field TYPE abap_bool.

  FIELD-SYMBOLS: <ov_controller> TYPE ANY.
  lr_wind_contr = me->gv_ovp_window_contr.

  CHECK lr_wind_contr IS BOUND.

  CALL METHOD lr_wind_contr->('GET_VIEWS')
    RECEIVING
      rt_active_views = lt_active_views.
  TRY.
*   Obtenemos el controlador del componente
    lr_comp_contr ?= me->gv_ovp_window_contr->m_parent.
  ENDTRY.
  CALL METHOD lr_wind_contr->('READ_CHILDREN')
    RECEIVING
      rt_return = lt_children.

  LOOP AT lt_children INTO lr_child.

    lv_name = lr_child->get_name( ).

    IF lv_name EQ 'BP_HEAD/BPHEADOverview'.
      lr_ov_rep_view = lr_child.
      EXIT.
    ENDIF.
  ENDLOOP.

  READ TABLE lt_active_views TRANSPORTING NO FIELDS
  WITH KEY viewid = 'BP_DATA.BP_DATA/TaxNumberWindow'.

* No es activa, comprobaremos si está en la lista de vistas disponibles
  IF sy-subrc NE 0.

    lv_name = lr_ov_rep_view->get_name( ).
    lr_ovview_contr ?= lr_wind_contr->get_subcontroller_by_viewname( lv_name ).

    CALL METHOD lr_ovview_contr->('GET_LIST_OF_STATIC_VIEWS')
      RECEIVING
        rt_result = lt_static_views.

    READ TABLE lt_static_views TRANSPORTING NO FIELDS
    WITH KEY viewid = 'BP_DATA.BP_DATA/TaxNumberWindow'.

    IF sy-subrc NE 0.
      RETURN.
    ENDIF.
  ENDIF.

* Si tenemos componente , buscamos su RTE
  CHECK lr_comp_contr IS BOUND.
  lr_runtime_rep ?= lr_comp_contr->get_runtime_repository( ).
* Obtenemos la vista

  lr_child_rep_view ?= lr_runtime_rep->get_view( 'BP_DATA.BP_DATA/TaxNumberWindow' ).

  lr_wind_contr->bind_view( rep_view = lr_child_rep_view
                           viewarea = 'Root'
                           iv_force_binding = abap_true ).  "#EC NOTEXT

  lv_name = lr_child_rep_view->get_name( ).
  lr_view_contr ?= lr_wind_contr->get_subcontroller_by_viewname( lv_name ).

  lv_name = 'BP_DATA/AccountTaxNumberList'.

  lr_view_contr ?=  lr_view_contr->get_subcontroller_by_viewname( lv_name ).

  CALL METHOD lr_view_contr->('ZIF_CRM_UI_MANDAT_FIELDS_CHECK~CHECK_REQUIRED_FIELDS')
    RECEIVING
      rv_empty_mandatory_field = lv_empty_mandatory_field.

  lr_wind_contr->bind_view( rep_view = lr_ov_rep_view
                           viewarea = 'Root'
                           iv_force_binding = abap_true ).  "#EC NOTEXT


  SET HANDLER on_save_event ACTIVATION ' '.
  EXIT.

Former Member
0 Kudos

Put a breakpoint in the badi and the reread_entity method and try to debug, i cannot visualize the error without going into the debugger.

Former Member
0 Kudos

Hi Again,

Here is the piece of coe where the exception is being throwed, in the line i worte here it fails when it tries to make the destroy with he component controller of my enhanced component of bp_data/accounttaxnumberlist it's going mad.

Any idea?

Best Regards

Jon

method WD_DESTROY .

* destroy active children
  field-symbols: <CURRENT_VIEWAREA> type LTYPE_VA_CONTENT.
  loop at VIEWAREA_CONT assigning <CURRENT_VIEWAREA>.
    if <CURRENT_VIEWAREA>-CURRENT-VIEWNAME is not initial and
       <CURRENT_VIEWAREA>-CURRENT-VIEWNAME <> 'Empty'.
here it fails
      <CURRENT_VIEWAREA>-CURRENT-CONTROLLER->WD_DESTROY( ).

*     deactivate the controller
      if <CURRENT_VIEWAREA>-CURRENT-VIEWNAME cs '.'.
        data: LV_USAGE_NAME         type STRING,
              LV_INTERFACEVIEW_NAME type STRING,
              LV_USAGE              type ref to CL_BSP_WD_COMPONENT_USAGE.
        split <CURRENT_VIEWAREA>-CURRENT-VIEWNAME at '.' into LV_USAGE_NAME LV_INTERFACEVIEW_NAME.
        try.
            LV_USAGE ?= ME->COMP_CONTROLLER->GET_COMPONENT_USAGE( LV_USAGE_NAME ).
            LV_USAGE->INTERFACE_VIEW_SET_ACTIVE( IV_NAME     = LV_INTERFACEVIEW_NAME
                                                 IV_ACTIVATE = ABAP_FALSE ).
          catch CX_ROOT. "ignore exceptions in unbind case
        endtry.
      else.
        CONTROLLER_SET_ACTIVE( CONTROLLER_ID = <CURRENT_VIEWAREA>-CURRENT-ID
                               ACTIVE        = 0 ).
      endif.

*     remove controller from the viewarea's current content
      clear <CURRENT_VIEWAREA>-CURRENT.

Former Member
0 Kudos

Note 0001443783