Skip to Content
0
Oct 12, 2009 at 10:04 AM

Navigate from a standard component to a custom component

137 Views

Hello,

I've created a custom component showing some data of an erp sales order, and I want navigate to it clicking on erp order history.

I tried with some coding.

view_manager->navigate(..)

view_manager->navigate(
                  SOURCE_REP_VIEW = me->rep_view
                  OUTBOUND_PLUG = 'ywcrmerphistory'
                  DATA_COLLECTION = lr_data_collection ).

I've created a new outbound plug and set up a navigation link on the repository.xml file but this is, as far as I know, a navigation intra-view and even if navigation worked, it seems that underlaying component still remains the same ICCMP_ERP_ORDER. In brief no real cross component navigation is performed.

link id

lr_nav_srv = cl_crm_ui_navigation_service=>get_instance( me ).
lr_nav_srv->navigate( iv_link_id = 'YWERPHIST'
                                     iv_data_collection = lr_data_collection ).

First I have created a new target to my new component and then I have created YWERPHIST link id in customizing UIFramework->Tech. role .def. -> Define navigation bar profile -> Defilne logical links, assigning the new link to my new target.

With this option no navigation is performed, since I get an exception navigation rejected.

window navigation

lr_window ?= me->view_manager->get_window_controller( ).
lr_window->call_outbound_plug( iv_outbound_plug   = 'ywcrmerphistory'
                                                      iv_data_collection = iv_data_collection ).

I've created an outbound plug in the main window and I tried to navigate through it but no navigation was performed. Navigation was still rejected, and an exception was raised.

How can I implement cross component navigation to my custom new component from an existing one, so that I have all the back functionality on?

Thank you very much for your help!

Cheers

Luca