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

***The following step is very important***

Now Still the WEB IC only know this is a ordinary view. Now we need to convert this view in to Search View. For that we need to change the super class of the Implementation class.  Double click on the implementation class and go to the attribute table of the class module. You will see the super class as ZL_ZSRCMP_SEARCHADV. Now click on the super class you will see the SAP’s inherited class as CL_BSP_WD_VIEW_CONTROLLER. We need to change this class to the SAP’s advance Search controller CL_BSP_WD_ADVSEARCH_CONTROLLER. Now your plain view became as search view.  The above is very important. If you didn’t do this then your view is ordinary view only.  See the following screen shot.

search-result-12

search-result-13

Once the above implementation class is converted for the search now we need to convert the context nodes to act as search related nodes. We need to change the implementation of the context node to search related node.  Only change the node that you want to show up on the search screen. Don’t do this for every node. In this example I have search node and result node. I want the search node show on the screen. So I modify only the search node with this new implementation class. Replace the existing super class CL_BSP_WD_CONTEXT_NODE with CL_BSP_WD_CONTEXT_NODE_ASP.

See the following screen shot.

search-result-15

search-result-16

Please add the following code in the searchadv.htm Please rpleace all the “ to ” when you copy.

  <%@page language=”abap” %>

<%@extension name=”htmlb” prefix=”htmlb” %>

<%@extension name=”xhtmlb” prefix=”xhtmlb” %>

<%@extension name=”crm_bsp_ic” prefix=”crmic” %>

<%@extension name=”bsp” prefix=”bsp” %>

<%@extension name=”chtmlb” prefix=”chtmlb” %>

<%@extension name=”thtmlb” prefix=”thtmlb” %>

<thtmlb:advancedSearch id                = “advs0”

                       fieldMetadata     = “<%= controller->GET_DQUERY_DEFINITIONS( ) %>”

                       header            = “<%= TestSearch->get_param_struct_name( ) %>”

                       fieldNames        = “<%= controller->GET_POSSIBLE_FIELDS( ) %>”

                       values            = “//TestSearch/PARAMETERS”

                       maxHits           = “//TestSearch/MAX_HITS”

                       onEnter           = “SEARCH”

                       ajaxDeltaHandling = “false” />

Activate this class and go back to the component editor. 

Now click on the configuration on the view you will see a different configuration than the ordinary view configuration. See the following screen shot.

search-result-171

Edit this screen and add all the fields to the right and save the configuration. The screen looks as follow.

search-result-18

This is like the same way you add the new fields.

See some more information in the following link. The detail is explained there.

https://techskills.files.wordpress.com/2009/05/search-result-281.jpgsap-crm-web-ic-make-view-configurable/ 

Now the search view is ready. Let us start building the result view.

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