CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
sumeet_gehlot
Contributor


  • 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



11 Comments