Techskills

May 15, 2009

SAP CRM — Web-IC Component — Navigation between views

Now we have the event handler and the plugs we need to add some code. These plugs are like skeletons. So we need to put some code. Before adding that we will create the second view. We need the navigation link name to add in the code. So let us go heand and create the second view like how we created the first view.

Create second view with view name as otherview.

Make the view configurable.

Add the Button HTML code. Here we need to add button as back. The code is as follows.

  <thtmlb:button id      = “BackBtn”
               design  = “EMPHASIZED”
               onClick = “BACK”
               text    = “Back”
               tooltip = “To First View” />

Now create a event and the inbound and outbound plug for this otherview as you did for the first view.Make sure that you create a event for back not for next. In this veiw we are calling this as Back button. See the following screen shot.

view-nav-06

I created event BACK and inbound plug as fromfirstview and outbound plug as tofirstview. Add these two view to the window. See the following screen shot.

view-nav-07

Now let us create a navigation link for this two screen. This is in the Runtime Repository Editor.See the following screen shot for the navigation links.

view-nav-08

view-nav-09

I named the ID as fvTOov firstview to other view and declared all the source view and the target view. We need to do the same to navigate from other view to first view when user click on the back button.  See the following screen shot for the other Navigation link.

view-nav-10

view-nav-11

OK now the two navigation links are created.  The important thing is the above links that we created are only the skeleton meaning it created only the class moduels and the methods that the Component can unserstand. Now you need to add the code inside these plugs so that when every you click on the event that fires the plug which then executes our code.

15 Comments »

  1. Thank u very much for the post. Very nice explaination.

    Comment by Raj — May 17, 2009 @ 1:48 pm

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

    Thanks
    Neha.

    Comment by Neha — June 7, 2009 @ 1:39 am

  3. 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.

    Comment by oliver.yang — June 23, 2009 @ 5:39 am

  4. you can use a custom cotroller or component controller to pass the data between views. see the following link
    http://blogs.moovar.com/sap/sap-crm-create-custom-controller-for-a-web-ic-component/

    Comment by kumar — June 23, 2009 @ 5:50 am

  5. 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.

    Comment by oliver.yang — June 23, 2009 @ 7:49 pm

  6. 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.

    Comment by kumar — June 23, 2009 @ 9:14 pm

  7. 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.

    Comment by oliver.yang — June 24, 2009 @ 9:10 pm

  8. 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

    Comment by Prasoon — August 6, 2009 @ 8:54 pm

  9. I never ever post but this time I will,Thanks alot for the great blog.

    Comment by Sandy — August 30, 2009 @ 5:45 pm

  10. 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

    Comment by Mattias — September 15, 2009 @ 11:48 pm

  11. 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

    Comment by Mattias — September 16, 2009 @ 1:21 am

  12. 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

    Comment by KMK — September 30, 2009 @ 8:27 am

  13. 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

    Comment by Sara — February 9, 2010 @ 6:55 am

  14. 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,

    Comment by terc — May 23, 2010 @ 2:26 pm

  15. 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!!

    Comment by Jon — July 26, 2010 @ 4:52 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress