Skip to Content
avatar image
Former Member

WebClient UI enhancement - navigation into document details fails

Dear all!

I have enhanced compoent AIC_INCIDENT_S view AIC_INCIDENT_S/IncidentSRL which is the result list of the incident search. I added a customer field to the context in orrder to display the number of an request for change.

My target is that the user can click this document number and navigation into the rfc details. But unfortunately the navigation does not work (it navigates nowhere) and even worse the navigation does not work at all after is clicked the rfc.


I implemented the P-method as follows to make it clickable. The event to be fired is named HEADEROV_RFC.

METHOD get_p_zzfld00000h.
  CHECK gv_value_help_mode = abap_false.

  CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
    WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
      rv_value = gc_event_headerov_rfc.
  ENDCASE.
ENDMETHOD.

I have created an event handler in the same view named EH_ONHEADEROV_RFC which is implemented as follows.

  METHOD eh_onheaderov_rfc.
    DATA: lo_col       TYPE REF TO if_bol_bo_col,
          lo_entity    TYPE REF TO if_bol_bo_property_access,
          lv_crmt_guid TYPE crmt_object_guid,
          lv_ui_usage  TYPE flag.


    cl_thtmlb_util=>get_event_info(
      EXPORTING
        iv_event = htmlb_event_ex
      IMPORTING
        ev_index = DATA(lv_index) ).
    CHECK lv_index IS NOT INITIAL.


    lo_entity ?= gr_result_list_cnode->collection_wrapper->find( iv_index = lv_index ).
    CHECK lo_entity IS BOUND.


*   get the clicked document number 
    DATA lv_zzfld00000h TYPE zdtel000024.
    lo_entity->get_property_as_value(
      EXPORTING
        iv_attr_name = 'ZZFLD00000H'
      IMPORTING
        ev_result    = lv_zzfld00000h
    ).

*   select the order GUID
    SELECT SINGLE guid
             FROM crmd_orderadm_h
             INTO @DATA(lv_guid)
            WHERE object_id = @lv_zzfld00000h.
    CHECK sy-subrc = 0.

    lv_crmt_guid = lv_guid.


*   get the root object
    DATA: lo_bol_core    TYPE REF TO cl_crm_bol_core,
          lo_btorder     TYPE REF TO cl_crm_bol_entity,
          lv_object_guid TYPE crmt_genil_object_guid,
          lo_root        TYPE REF TO cl_crm_bol_entity.

    lo_bol_core = cl_crm_bol_core=>get_instance( ).
    CHECK lo_bol_core IS BOUND.

    TRY.
        lo_bol_core->load_component_set( 'BT' ).
        lv_object_guid = lv_guid.
        lo_btorder = lo_bol_core->get_root_entity( iv_object_name = 'BTOrder'
                                                   iv_object_guid = lv_object_guid ).

        IF lo_btorder IS BOUND AND lo_btorder->alive( ) = abap_true.
          lo_root ?= lo_btorder.
        ENDIF.

      CATCH cx_crm_genil_general_error.
    ENDTRY.


    IF lo_root IS BOUND.
      IF cl_crm_uiu_bt_tools=>check_display_authority( lo_root ) IS INITIAL.
        set_btorder_to_coco( lo_root ).
        op_singleselection( ).
      ENDIF.
    ENDIF.
  ENDMETHOD.

Instead of calling method op_singleselection( ) without parameters i tryed to pass the target document using a collection but this did'nt work either.

        DATA(lo_collection) = NEW cl_bsp_wd_collection_wrapper( ).
        lo_collection->if_bol_bo_col~insert(
          EXPORTING
            iv_bo        = lo_root
            iv_index     = 1
            ).
        op_singleselection( iv_data_collection = lo_collection ).

I hope one of you guys can help me with the issue.

Kind regards, Florian

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 15 at 03:41 PM

    Hi Florian,

    I am not sure about the value you specified for 'gc_event_headerov_rfc'. Just to cross-check, change the code this way:

        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'HEADEROV_RFC'.    

    And, put a break point in event handler EH_ONHEADEROV_RFC.

    Let me know if it works.

    -Ricky.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I am actually not sure what I can/must configure in that part of the customizing this is new to me). Can you be a bit more specific, in case the screenshot does not show what you are looking for?

      spro.png (57.1 kB)
  • May 21 at 07:20 AM

    Hi,

    I am now trying to understand this ... "My target is that the user can click this document number and navigation into the rfc details.".

    If that RFC details page is another component, you might have created the Object type for that. That object type should be there in SPRO -> Generic OP mapping.

    Please check this link once.

    https://wiki.scn.sap.com/wiki/display/CRM/CRM+-+Navigating+to+your+custom+BSP+component.

    -Ricky.

    Add comment
    10|10000 characters needed characters exceeded