cancel
Showing results for 
Search instead for 
Did you mean: 

Hyperlink to Service Request

Former Member
0 Kudos

Hello collegues,

I have a fact sheet Z, in the BSP_DLC_fs component.

This Block has the service request of the BP.

My customer need that exists a hyperlink to service request detail.

I`ve implemented the GET_P_XX.. Method, and I`ve implemented an event relationed.

In the code of the event, I indentified the guid of the service request, but I don´t have certeid about the component that need call (BTQRSrvReq, BTAdminH,SRQM_INCIDENT_H,BT311_CSR I´m confused with this elements)

Also, I don´t know how call the view.

Thanks a lot,

Roberto

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

we have realized exactly the same.

Here the coding from our eventhandler:

DATA: lv_index       TYPE int4,
        lr_entity      TYPE REF TO cl_crm_bol_entity,
        lv_event       TYPE REF TO cl_htmlb_event_tableview,
        lr_msg_srv     TYPE REF TO cl_bsp_wd_message_service.
data:  lr_data_collection         TYPE REF TO if_bol_bo_col.
DATA  lr_nav_srv             TYPE REF TO if_crm_ui_navigation_service.
DATA: lr_property            TYPE REF TO if_bol_bo_property_access,
      lv_id     TYPE CRMT_OBJECT_ID.

* get index of result list selected
  CALL METHOD cl_thtmlb_util=>get_event_info
    EXPORTING
      iv_event = htmlb_event_ex
    IMPORTING
      ev_index = lv_index.

* set entity as current one
  lr_entity ?= me->typed_context->btqrsrvreq->collection_wrapper->find( iv_index = lv_index ).

  lv_id = lr_entity->get_property_as_string( iv_attr_name = 'OBJECT_ID' ).

  DATA: query          TYPE REF TO cl_crm_bol_query_service,
        result         TYPE REF TO if_bol_bo_col.

* get Query service
    query = cl_crm_bol_query_service=>get_instance( 'BTQuery1O' ).
    query->set_property( iv_attr_name = 'OBJECT_ID'
                      iv_value = lv_id ).
* execute query
    result ?= query->get_query_result( ).
    lr_entity ?= result->get_first( ).

  CHECK lr_entity IS BOUND.

  CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_entity_based
    EXPORTING
      ir_entity           = lr_entity
      iv_ui_object_type   = 'CRM_SRQM_INCIDENT'
      iv_ui_object_action = 'B'
    RECEIVING
      rr_result           = lr_property.

  CREATE OBJECT lr_data_collection TYPE cl_crm_bol_bo_col.
  lr_data_collection->add( lr_property ).
  lr_data_collection->add( lr_entity ).

  lr_nav_srv = cl_crm_ui_navigation_service=>get_instance( me ).
  IF lr_nav_srv IS BOUND.
    lr_nav_srv->navigate_dynamically( lr_data_collection ).
  ENDIF.

Good Luck.

Kind regards

Manfred

Answers (1)

Answers (1)

Former Member
0 Kudos

Guau!!

The code is perfect, and work fine!!

How did yo know that query service is 'BTQuery1O' and how did you know the object type 'CRM_SRQM_INCIDENT'?

Thanks!!!

Roberto

Edited by: Javier Caballero on Jan 26, 2011 2:09 PM