SAP CRM — WEB IC Create a new search view and result view

In this post let is see how to create a search and result view and link the view to the BOL object.

To learn about Custom BOL for a Z Table Click here.

Click Here to Go thru that post to understand how to create a New component and the new view.

Pre request. A new Component and a BOL object. Use the above link to learn about that before start going forward.

OK now you have a component. Let us go thru and see how we can create a search and result views.

For search you need to have 3 views one is search view and another is result view and a third view is the View set. In this view set you combine the view one and two. We are going to use the ZTBOL as our BOL object for this example.

Component Initial Preparation for Search and Result View creation

First we need to link the custom BOL object to this Component. Go to the Runtime Repository Editor and click on the edit. Now add the ztbol to this component.  See the following screen shot.

search-result-01

search-result-02

search-result-03

Now the custom BOL component (ZTBOL) is added to our search and result component. Make sure you save this. 

Search View

Create a view with the MODEL Node using the custom BOL.

Now click  on the browser component structure tab and go to the ZSRCMP component. Click on the View and right click to create a view. The Create New View Wizard will popup and continue the process. See the following screen shots for the process.

search-result-05

The Above is the name of the View.

search-result-06

In the above screen you need to enter the name for the model nodes(like a abap structure name) and the BOL entity that you created during the Custom BOL creation( for more info Click here for custom BOL)

Select the TestSearchAdv structure that we need for the search view. TestResult structure will be used for the result view. Now let us go to the next screen in the wizard .  Now we need to identify the attributes fields that we need to use for this model nodes.  So go to model attributes screen. Skip the value node screen. In the Add Model Attributes to Modell Node click on the + sign to add the attributes. See the following screen shot.

Advertisements

12 thoughts on “SAP CRM — WEB IC Create a new search view and result view

  1. Great post. Very much informative and useful.

    I would really appreciate if you could send to my e-mail an example of view navigation.

    Thanks
    Raj

  2. Hi,
    Its really very good blog…You are doing a great job…

    Could you please post some good examples on BOL programming……

  3. Hi,
    This is really a good blog explaining each and every step with screen shot, really appreciate your effort.
    Recently I did this example but I am getting following error:

    Cannot display view Z10345028/Search of UI Component Z10345028
    An exception has occurred Exception Class CX_SY_REF_IS_INITIAL – Dereferencing of the NULL reference
    BSP Application: Z10345028
    View Layout: Search.htm
    Method: CL_O24G6ISYMTO34P4BA6I1VLD1NNS=>_ONLAYOUT
    Source Text Row: 63

    I analysed the code and found that the TestSearch is initial and on calling TestSearch->get_param_struct_name( ), it is throwing exception in the SearchAdv.htm. Could you please guide me in this.

  4. Hi,

    I followed the procedure as given in the blog for creating the search view.
    But on click of configuration tab,it is giving the following error.
    An exception occurred in inbound plug IP_DEFAULT of target view BSP_DLC_CONF/AdvSearchConfig
    An exception has occurred Exception Class CX_SY_CREATE_OBJECT_ERROR – The object could not be created: The class does not exist.
    Method: CL_BSP_MODEL=>CREATE_STANDALONE_MODEL
    Source Text Row: 10
    Could you please help in resolving the error.

  5. Hello,
    Great Blog! I was just wondering that would it be possible for you to provide/guide me to some documentation about how to create a BOL object in CRM?
    The objects are already defined as BOR in ERP with webservices as well. Now the problem that I am running into is to how to create a BOL for it in CRM.
    ANy help/guide would be highly appreciated. This is kind of urgent.
    Regards,
    Excimp1

  6. Cannot display view Z10345028/Search of UI Component Z10345028
    An exception has occurred Exception Class CX_SY_REF_IS_INITIAL – Dereferencing of the NULL reference
    BSP Application: Z10345028
    View Layout: Search.htm
    Method: CL_O24G6ISYMTO34P4BA6I1VLD1NNS=>_ONLAYOUT
    Source Text Row: 63

    I analysed the code and found that the TestSearch is initial and on calling TestSearch->get_param_struct_name( ), it is throwing exception in the SearchAdv.htm. Could you please guide me in this.

  7. Hi,
    This is really a good blog explaining each and every step with screen shot, really appreciate your effort.
    Recently I did this example but I am getting following error:

    Cannot display view Z10345028/Search of UI Component Z10345028
    An exception has occurred Exception Class CX_SY_REF_IS_INITIAL – Dereferencing of the NULL reference
    BSP Application: Z10345028
    View Layout: Search.htm
    Method: CL_O24G6ISYMTO34P4BA6I1VLD1NNS=>_ONLAYOUT
    Source Text Row: 63

    I analysed the code and found that the TestSearch is initial and on calling TestSearch->get_param_struct_name( ), it is throwing exception in the SearchAdv.htm. Could you please guide me in this.

Leave a 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