SAP CRM — Web-IC Component — Navigation between views

For first view we need to add the code in the event of the first view. Go to first view in the componebt broswer and double click on the event EH_ONNEXT that will take you to the class editor there add the folloing code.

METHOD eh_onnext.

    op_tosecondview( ).

ENDMETHOD.

See the following screen shot.

view-nav-12

Now click on the outbound plug and add the following code.

 
  view_manager->navigate( source_rep_view = rep_view
                           outbound_plug = ‘fvTOov’ ).

You are asking the code to execute the fvTOov navigation link that we created. See the following screen shot.

view-nav-13

OK now you first view is configured to send the control to second view(other view). Now we need to make the same from the second view(otherview) to the first view.

Go to otherview and double click on the outbound plug and edit the code and add the following code.

  METHOD op_tofirstview.
  view_manager->navigate( source_rep_view = rep_view
                         outbound_plug = ‘ovTOfv’ ).

ENDMETHOD.

Go to otherview and double cilck  in the EH_ONBACK event. Add the following code.

METHOD eh_onback.
  op_tofirstview( ).
ENDMETHOD.

Now your second view(otherview) is ready to trun the control back to first view if the user click on the back button.

Once you added the code compile all the codes. Now the component and the views are ready to go and back between views.

See the firstview displayed in the browser.

view-nav-14

On clicking the next button see the second view on the browser.

view-nav-15

On clicking back button the view retruns back to the previous screen. So now you know how to navigate between screens.

If you have any question let me know.

Advertisements

18 thoughts on “SAP CRM — Web-IC Component — Navigation between views

  1. Realy all the posts are very helpful. Keep adding some more tutorials for CRM 2007 as they are realy beneficals to newbees.

    Thanks
    Neha.

  2. First, thank you for your wonderful articles.
    In this post, you described the navigation between views.
    In addition, i want to know how to transfer data between views.
    Hope for your excellent articles.
    Yours sincerely.

  3. Thank you, that’s very helpful.
    Now, we have a new question.
    Can we use the component controller to pass data between components?
    Otherwise we also found ‘InterfaceController’ in the RunTime Repository Editor.
    Is that used for passing data between components?
    And how to do that?
    Thanks.
    Oliver.

  4. if you want to use a component in another component then you need to have a interface that is created with context nodes. These nodes are available in the calling component. for example

    let us assume that we have two component Comp1 and comp2, if you want to use comp2 in comp1 then comp2 needs to have interface(you can expose all the information from comp2 to comp1 thru interface controller) if you are doing other way around then you need to have comp1 interface defined. Hope this helps.

    thanks
    Kumar.

  5. Thank you for your help, kumar.
    As a beginner, although i understand what you said, i still don’t know how to do that step by step.
    Besides, in china(i’m from china ~O(∩_∩)O~), most people working in this field are beginners. So i can’t find enough helpful information.
    May you provide some detailed information?

    Thanks again for your help.
    Oliver.

  6. Hi,

    I wanted to know how can we navigate from one view to another which is in different views. We want to navigate from iccmp_emp_detl view to iccmp_bt_inr view. Please help.

    Thanks,
    Prasoon

  7. Hi,

    Thanks for great explanation of creating new views in components. However, I have a similar task;
    How can I change a an existing start view to another existing view in the same component? I.e in the web ui (CRM2007) I choose Create new Sales order button, then it takes me to view “ERPCartItemListView”. How can I change this so it takes me to view “ERPHDetailsView”?

    Thanks
    Mattias

  8. I figured out how to chenge the view in a component..

    1. Create an outbound plug and inbound plug
    2. In the event handler, call that method
    3. Create a new Navigation link, and assign outbound-/inbound plug to it
    4. Add the target in the window

    /Mattias

  9. Hi,

    I am looking for help in CRM 7.0 step by step configuration for the sales order scenario (eCommerce).
    I have worked with CRM 4.0/CRM 5.0 etc. I need to review my past knowledge in configuring Master data, business process , sales order related process, like Sales org setup, partner determination, business activities,pricing, etc.

    I would greatly appreciate if you could either send me the documents or point me in the right direction.

    Many Thanks in advance

    Regards,
    KMK

  10. Hello,
    How can I know in my component the logical link?
    I want to produce some links that will navigate same Z-component that will be reports with
    other variants. We r working on interaction center. you can save variants of report but you can’t see them as “my saved reports”. Our solution is to prepare some variants and make a link for each one. The problem is we can’t get the name of the link in our component. It is in
    CL_CRM_UI_CORE_APPL_CONTROLLER target_id.
    Thanks,
    Sara

  11. Dear Kumar, thank you very much for the sharing. I got error message after I hit NEXT button in view1. I have spent a lot time check code and debug but couldn’t figure out, could you please help?

    BSP exception: Access to URL /sap(bD1lbiZjPTMxMCZkPW1pbg==)/bc/bsp/sap/bspwd_cmp_test/ is forbidden

    Cheers,

  12. Dear Kumar,
    I have added a new component to bp_head.
    This component has two windows and i want to navigate from one to the other when i select one field.
    I have followed all the steps of the wiki but i when i try to navigate this exception is throwed.
    An exception has occurred Exception Class CX_BSP_WD_INV_VA_ASSIGNMENT – Assigned view ZBP_PEDMM/ERPMMDetail in view area Root could not be loaded.
    Method: CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
    Source Text Row: 118
    An exception occurred during the activation of target view ZBP_PEDMM/ERPMMDetail for the navigation
    An exception has occurred Exception Class CX_BSP_WD_RUNTIME_ERROR –
    Method: CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
    Source Text Row: 165

    Any idea?
    Thanks!!

  13. Hi,

    Thanks for your blog,

    I have followed the same procedure as you have mentione here, but I got the following error in outbound plug method.

    “Field ovTOfv is unknown. It is not contained in one of the tables nor it is defined by a DATA statemnt.”

    Could you please help me on this.

    Thanks,
    Jenibalet S

Leave a Reply to kumar Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s