Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8378

Re: Navigation is not correct

$
0
0

Hi Jerry,

 

Check Configuration part in spro - for navigation .

 

untitled.JPG

 

Then in the associated Outbound Plug -

 

DATA : lr_entity           TYPE REF TO cl_crm_bol_entity.

     DATA : lr_iobject          TYPE REF TO cl_crm_bol_entity.

     DATA : lv_map_srv          TYPE REF TO cl_crm_ui_object_mapping_srv.

     DATA : lr_nav_descr        TYPE REF TO if_bol_bo_property_access.

     DATA : lr_nav              TYPE REF TO if_crm_ui_navigation_service.

     DATA : lr_data_collection  TYPE REF TO if_bol_bo_col.

     DATA : lv_ui_type          TYPE bsp_dlc_object_type.

 

" Get your entity first

     lr_entity ?= ir_entity.

 

     IF lr_entity IS BOUND.

*  Get BOR object data

       lv_map_srv = cl_crm_ui_object_mapping_srv=>get_instance( ).

 

       CHECK lv_map_srv IS BOUND.

 

       lv_ui_type = lv_map_srv->determine_ui_object_of_entity( lr_entity ).

 

*  Create UI based Entity

       CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_entity_based

         EXPORTING

           ir_entity           = lr_entity

           iv_ui_object_type   = lv_ui_type

           iv_ui_object_action = 'B'            "display

         RECEIVING

           rr_result           = lr_nav_descr.

 

       CREATE OBJECT lr_data_collection

         TYPE cl_crm_bol_bo_col.

 

*  Add the UI Descriptor the BOL Collection

       lr_data_collection->add( lr_nav_descr ).

 

       lr_data_collection->insert( iv_bo = lr_entity

                                   iv_index = 2 ).

 

*   Get Instance of Navigation Service

       lr_nav = cl_crm_ui_navigation_service=>get_instance( me ).

 

*   Navigate to Target Component

       IF lr_nav->is_dynamic_nav_supported( lr_nav_descr ) = abap_true.

         lr_nav->navigate_dynamically( lr_data_collection ).

       ENDIF.

     ENDIF.


Regards,

Sumeet


Viewing all articles
Browse latest Browse all 8378

Trending Articles