on 08-03-2012 10:42 AM
Hi,
I was exploring dynamic navigation. Can anyone summarize what objects support dynamic navigation?
Regards,
Sayan
Hi Nithish,
Thanks for your inputs. Debugging the standard code I came to realize we need to maintain the outbound field mappings in the navigation bar profile as shown below:
It's working fine. But now I am facing this issue:
When I go to details view, the previous view(where the link was) is not registered in the Back button. So when I click Back from the details view it navigates to some other view rather than the view where the hyperlink is present. Any pointers on this would be helpful.
Regards,
Sayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sayan,
Please go through the below mentioned links for Dynamic navigation.
http://wiki.sdn.sap.com/wiki/display/CRM/SAP+CRM+WEBUI+Dynamic+Navigation+to+Activity+Create
http://wiki.sdn.sap.com/wiki/display/CRM/CRM+-+Navigating+to+your+custom+BSP+component
http://wiki.sdn.sap.com/wiki/display/CRM/Creation+of+Hyperlinks+to+navigate+dynamically+on+Web+UI
All Objects will support Dynamic Navigation in Web UI Level. If you want more information can you brief me with examples for understanding.
Thanks,
Sakthivel.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sakthivel,
Thanks for those links. I had already gone through those links.
I wrote the following code:
data: lr_nav_descr type ref to if_bol_bo_property_access,
lr_core type ref to cl_crm_bol_core,
lr_nav_serv type ref to if_crm_ui_navigation_service,
lr_header type ref to cl_crm_bol_entity,
lr_entity type ref to if_bol_bo_property_access,
lv_partner_guid type crmt_genil_object_guid,
lr_col type ref to cl_crm_bol_bo_col.
data lv_partner type bu_partner.
lr_entity ?= me->typed_context->znode->collection_wrapper->get_current( ).
call method lr_entity->get_property_as_string
exporting
iv_attr_name = 'PARTNER'
* iv_use_iso_format = ABAP_FALSE
receiving
rv_result = lv_partner.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = lv_partner
importing
output = lv_partner.
select single partner_guid from but000 into lv_partner_guid where partner = lv_partner.
* Get the BOL Core Instance
lr_core ?= cl_crm_bol_core=>get_instance( ).
* get the BuilHeader object
lr_header = lr_core->get_root_entity( iv_object_name = 'BuilHeader'
iv_object_guid = lv_partner_guid ).
* add the Builheader to the collection
create object lr_col.
lr_col->if_bol_bo_col~add( iv_entity = lr_header
iv_set_focus = abap_true ).
cl_crm_ui_descriptor_obj_srv=>create_ui_object_based(
exporting
iv_ui_object_type = 'BP_ACCOUNT'
iv_ui_object_action = 'B'
receiving rr_result = lr_nav_descr ).
lr_nav_serv = cl_crm_ui_navigation_service=>get_instance( ).
* check if navigation is possible
if lr_nav_serv->is_dynamic_nav_supported( ir_descriptor_object = lr_nav_descr ) = abap_true.
lr_col->if_bol_bo_col~insert( iv_bo = lr_nav_descr
iv_index = 1 ).
* start the navigation
lr_nav_serv->navigate_dynamically( iv_data_collection = lr_col ).
endif.
But the IF clause is failing every time. Please suggest.
Regards,
Sayan
Hello Sayan,
Compare below given code make changes on your code accordingly.
DATA: lr_nav_descr TYPE REF TO if_bol_bo_property_access.
DATA: lr_navigation TYPE REF TO if_crm_ui_navigation_service.
DATA: lr_col TYPE REF TO cl_crm_bol_bo_col.
DATA: rv_value_node TYPE REF TO cl_bsp_wd_value_node.
DATA dref TYPE REF TO data.
CREATE DATA dref TYPE zprocess_type. "struct
FIELD-SYMBOLS <ref> TYPE zprocess_type. " strctu
ASSIGN dref->* TO <ref>.
<ref>-zprocesstype = '0010'.
CREATE OBJECT rv_value_node
EXPORTING
iv_data_ref = dref.
CALL METHOD rv_value_node->if_bol_bo_property_access~set_property
EXPORTING
iv_attr_name = 'ZPROCESSTYPE'
iv_value = <ref>-zprocesstype.
cl_crm_ui_descriptor_obj_srv=>create_ui_object_based(
EXPORTING iv_ui_object_type = 'ZOBJECTYPE'
iv_ui_object_action = 'A'
RECEIVING rr_result = lr_nav_descr ).
CHECK lr_nav_descr IS BOUND.
lr_navigation = cl_crm_ui_navigation_service=>get_instance( ).
CHECK lr_navigation IS BOUND.
* Check whether navigation is supported
IF lr_navigation->is_dynamic_nav_supported( lr_nav_descr ) NE abap_true.
RETURN.
ELSE.
CREATE OBJECT lr_col.
lr_col->if_bol_bo_col~add( iv_entity = lr_nav_descr ).
lr_col->if_bol_bo_col~add( iv_entity = rv_value_node ).
lr_navigation->navigate_dynamically( lr_col ).
ENDIF.
ENDMETHOD.
I hope this will work fine. Please do rewards if it's helpful.
Thanks,
Sakthivel.M
Hi Sayan,
For dynamic navigation , first it should be registered in Define Work Area Component Repository in spro with object types and actions for each component.
I guess BP_ACCOUNT and display action are already registered . Try with create entity based method and pass the header entity to it.
cl_crm_ui_descriptor_obj_srv=>create_entity_based ( EXPORTING iv_ui_object_type = lv_ui_object_type
iv_ui_object_action = 'B'
ir_entity = lr_entity
RECEIVING rr_result = lr_nav_descr ).
lr_col->clear( ).
lr_col->add( iv_entity = lr_nav_descr ).
lr_nav = cl_crm_ui_navigation_service=>get_instance( ).
IF lr_nav->is_dynamic_nav_supported( lr_nav_descr ) = abap_true.
lr_nav->navigate_dynamically( lr_col ).
ENDIF.
Regards,
Nithish
Hi Sayan,
As far as I know , we need to to maintain only entries for target component in Work Area Repository.
As lr_nav->is_dynamic_nav_supported( lr_nav_descr ) is returning false , you may try checking the standard functionality of component BP_HEAD_SEARCH result view in OP_TOEMAIL method, the dynamic navigation is used here to navigate on email component.. Check whether the value is returning true or false.
Also, from which component are you triggering the navigation? if you don't have the MODEL BP in the run time repository of your source component and try to load component BP and use dynamic navigation.
Regards,
Nithish
User | Count |
---|---|
5 | |
1 | |
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.