on 05-15-2018 8:51 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricky,
the constant GC_EVENT_HEADEROV_RFC is defined with value HEADEROV_RFC and the method EH_ONHEADEROV_RFC is executed as well. So believe the problem is located somewhere later in the process.
From what I understand the method op_singleselection( ) should perform the navigation. Somehow the navigation gets lost when this method is performed.
Best regards, Florian
Hi Ricky,
the method OP_SINGLESELECTION is the standard implemention in class CL_BTSRV_ADVSRL_CNTRL. The constant GC_PLUG_SINGLESELECTION is defined with the value 'SINGLESELECTION'.
Definition:
methods OP_SINGLESELECTION
importing
!IV_DATA_COLLECTION type ref to IF_BOL_BO_COL optional .
Implementation:
METHOD op_singleselection.
**********************************************************************
* This method is defined in a generic superclass
* If you need special behaviour, please redefine this method
*
DATA: lr_window TYPE REF TO cl_bsp_wd_window.
***************************************************************************************************
lr_window = me->view_manager->get_window_controller( ).
lr_window->call_outbound_plug( iv_outbound_plug = gc_plug_singleselection
iv_data_collection = iv_data_collection ).
ENDMETHOD.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.