Skip to Content
Technical Articles
Author's profile photo Sumeet Gehlot

Creating a Search Page SAP CRM 7.0 EHP 1

  • With the SAP CRM 7.0 EHP1 (Enhancement Pack 1), new wizard for Search Page is available which enable the creation of Search pages in a simpler and standard manner.
  • Search Page is a view set that hosts a search query view and result view

  1. Creating and Defining a Model

  • Open a Component Workbench  BSP_WD_CMPWB  and enter the component name. e.g. ZSEARCH_PAGE
  • Click on Create.
  • New Abap objects created one by one needs to assigned and stored in a single package and transport request.

Once you click on Save all the classes are generated automatically.

Window will have its own IMPL class  ZL_ZSEARCH__MAINWINDOW_IMPL  and controller

Window Context IMPL class as  ZL_ZSEARCH__MAINWINDOW_CTXT .

Component Controller  with its IMPL Class ZL_ZSEARCH__BSPWDCOMPONEN_IMPL

Component Controller context IMPL class  ZL_ZSEARCH__BSPWDCOMPONEN_CTXT is created.

  2. Add Model

   Click to RUNTIME REPOSITORY EDITOR -> Switch to edit mode -> Right click on Model ->


3. Create Custom Controller

  • Custom Controller is used to share the data between two views.We will used later
  • Step-> Define Name as ZCuCo -> Add Model Node  as BuilHeader -> Continue  till Last step.

4. Creating a Search Page

  • Next Step is Creating a Search Page -> Right Click on View-> Create Search Page as Shown below

  • It  will create a New Search Page , Window , Search View and Result view, View Set  automatically  -> Continue .


  • As we are creating an Advanced search ,  Select BOL object  for

      Search Query node , Once you selected wizard will automatically fetch corresponding Result node.



  • You can define options – as Saved Search Creation , Navigation Links , Result View Selections etc.
  • Here we are creating a Navigation Link as BP_NUMBER .
  • You can define Buttons as well by default.

  • So 3 Views are created using that Search View Page
  • Search Page as View Set
  • SearchQueryView as AdvancedSearchView
  • SearchResultView as Display View

  • you can can see in Runtime repository how the viewsets , viewarea and views are bounded together.

   5.Search Query Config

  Click on Configuration tab -> click on edit mode ->Create new Configuration and Accept Default values

  – > Show available fields->Drag or Drop on Selected search criteria list.

  6. SearchResultConfig


Testing Component

7. Creating Over View Page

  •   Create Overview Page and Enter a name for overview page->assign a package and save it.
  •   Custom Controller ,Controller Implementation , Custom Controller, and Context are created.

8.  Creating Another  Form View name as Display View , Add Model node as BuilHeader and link it to custom controller.

  • This binding ensures that data will be shared between views and custom controller and with any other  context node bound to the same context node.

9.  Assign Display View to OverViewPage.

10. Over View Page Configuration and Display View Configuration.

  • Select available assignments blocks list to add them to display assignments blocks.
  • Keep Load options enabled so that they are displayed upon load -> Save.

11. Navigation Link

  • As BP_NUMBER is a hyperlink in a result view , so we decided to navigate to another view(DisplayView)
  • Right Click on CLICK_ON_LINK and Redefine.

  • Here Search page creation wizard has taken care of retrieving a BOL entity corresponding to that link on which user clicks.

  •        Here index of that line is retrieved from event info then get the BOL entity from collections.

  • Open Implementation class of SearchResultView ->Navigate_to_link.

  • Here for the BP_NUMBER we add a bol event handler to collection and pass collection to outbound plug.

  • Redefine outbound plug.

  • Here in Navigate method the name of the outbound plug is ‘Navigate’ that we will later define in runtime repository as Navigation Links.

  • Right Click on Inbound Plug->IP_RESULT_VIEW as plug name of OverViewPage.

  • Here object is sent from result page via inbound plug is received in overviewpage inboundplug and set in context node of custom controller

  • Creating a Navigation Link -> Enter the Source and Target View.

  • Create  event ‘Back ’ and outbound plug  to ‘toResult

  • Add Following code to navigate as already discussed in previous slide.

  • Add inbound plug of SearchResultViewFromDisplay’.

  • Navigation Id as ‘Back’  -> Enter Source View and Target View.

  • Testing Application
  • Click on Back Button to navigate to result View

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo zafar karnalkar
      zafar karnalkar

      Hi Summet,

            Nice document.




      Author's profile photo Faisal PC
      Faisal PC

      Hi Sumeet,


      Nice document.




      Author's profile photo Ricky Shaw
      Ricky Shaw

      Hi Summet,

      Finally, i am seeing a blank screen when i click on a BP Number. I think this should show the Overview page.

      10) Over View Page Configuration and Display View Configuration. •Select available assignments blocks list to add them to display assignments blocks.

      While doing above step(#10), I am unable to see any fields available in assignment blocks for display purpose. I used 'BUILHEADER' for BOL Entity while creating display view page. What does the display page does here? Can you please tell me where am I wrong?

      Author's profile photo Amal Aravind
      Amal Aravind

      Hi Sumeet,

      Nice document.




      Author's profile photo Ricky Shaw
      Ricky Shaw

      Hi Amal, Did you try to implement this? Were you able to see some data on Overview/Display Pages(Step#10) ?

      Author's profile photo ram ram
      ram ram

      Hi Summit, nice share .


      But When we are doing like this, .htm page is not appearing for any of the views like search, result and View set also.


      I want to add "Saved Search as" input field to save my custom search . How we add the same into search page .




      Author's profile photo Faisal PC
      Faisal PC

      Hi Ram,


      If you create a search page via 'Create as search page', an .htm page won't be shown in the component workbench. But still you can work with .htm page. Please have a look here.


      create a button in search view of the search result page created by Wizard create search page




      Author's profile photo Sumeet Gehlot
      Sumeet Gehlot
      Blog Post Author
      Hi Ram,  Check the point 4, screenshot 4.... if you want to have checked that saved searched field.  In case of adding button you can refer Faisal approach suggested.  Thanks Sumeet
      Author's profile photo Former Member
      Former Member

      Hi Sumeet,


      I did search page follow your step. Then my display view show "BuilHeader not bound".

      Could you please suggest me.




      Author's profile photo Former Member
      Former Member

      In step 10, I can't see any value in Overviewpage configuration,


      and step Creating a Navigation Link -> Enter the Source and Target View.


      can't find the OverViewPage in target view.


      Can you help me?

      Author's profile photo Kaushal Shah
      Kaushal Shah

      Nice article. Thanks for posting.

      I used wizard to create my bespoke component. Search and result views are working fine for the first time. I can select criteria on search page, press search button and result list is correctly displayed. But from there onwards, if I press SEARCH button again, all the fields in result list displays "not bound" message. Although the result list contains BO objects. Just that the fields don't display the information. Any idea what could be missing?