• 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  MainWindow.do

Window Context IMPL class as  ZL_ZSEARCH__MAINWINDOW_CTXT .

Component Controller BSPWDComponent.do  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 ->

   ADD 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
To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

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

      (0) 
  1. 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 .

     

    regards,

    rama

    (0) 
    1. Sumeet Gehlot 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
      (0) 
  2. Hiranya Bunaek

    Hi Sumeet,

     

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

    Could you please suggest me.

     

    Regards,

    Hiranya

    (0) 
  3. Yu-Shiang Chyr

    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?

    (0) 

Leave a Reply