advanced search component for oneorder objects in sap crm 7 part 2

12
Advanced Search Component for OneOrder Objects in SAP CRM 7.0 Part 2 By Rahul A Koshti, TATA Consultancy Services Scenario: As described in the Part1 of ‘Creation of Advanced Search Component’, Our basic SEARCH component is ready to use. This second part demonstrates the creation of hyperlinks in result list and navigation to the details overview page upon following that hyperlink. 1. Go to View ZRAK_ORDERSRCH/Result. Expand the context node BTQR1Order and Implement the GET_P method of attribute OBJECT_ID. 2. Copy the below code into method GET_P_OBJECT_ID. Basically GET_P method returns the properties depending upon the value of inbound parameter IV_PROPERTY. The interface IF_BSP_WD_MODEL_SETTER_GETTER has the constants defined. 1) FP_FIELDTYPE – Checks for property 'fieldType' and returns the field type as LINK. 2) FP_ONCLICK – Checks for property 'onClick' and returns the event name (e.g. SELECTION).

Upload: assign7997061

Post on 18-Jan-2016

13 views

Category:

Documents


2 download

DESCRIPTION

Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

TRANSCRIPT

Page 1: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

Advanced Search Component for OneOrder Objects in SAP CRM 7.0 Part 2

By Rahul A Koshti, TATA Consultancy Services

Scenario:

As described in the Part1 of ‘Creation of Advanced Search Component’, Our basic SEARCH component is ready to use. This second part demonstrates the creation of hyperlinks in result list and navigation to the details overview page upon following that hyperlink.

1.     Go to View ZRAK_ORDERSRCH/Result. Expand the context node BTQR1Order and Implement the GET_P method of attribute OBJECT_ID.

2.     Copy the below code into method GET_P_OBJECT_ID. Basically GET_P method returns the properties depending upon the value of inbound parameter IV_PROPERTY.

The interface IF_BSP_WD_MODEL_SETTER_GETTER has the constants defined.

1) FP_FIELDTYPE – Checks for property 'fieldType' and returns the field type as LINK.

2) FP_ONCLICK – Checks for property 'onClick' and returns the event name (e.g. SELECTION).

3) FP_TOOLTIP – Checks for property 'tooltip' and returns the tooltip text. (e.g. 'Click to see the details').

Page 2: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

method GET_P_OBJECT_ID.  case iv_property.      when if_bsp_wd_model_setter_getter=>fp_fieldtype.        rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.      when if_bsp_wd_model_setter_getter=>fp_onclick.        rv_value = 'SELECTION'.                       "#EC NOTEXT      when if_bsp_wd_model_setter_getter=>fp_tooltip.        rv_value = 'Click to see the details'.  endcase.endmethod.  

3.     Create new view to display the one order details into separate view. E.g. Details.

Page 3: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

4.     Define the Model Node BTOrder of type BOL BTOrder and Model Node BTAdminH of type BOL BTAdminH. Use the BTOrder as higher level node with BOL relation BTOrderHeader for Model Node BTAdminH.

5.     Create the Binding/Linkage with the Custom Controllers (QueryCuCo.do) context node BTOrder.

Page 4: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

6.     Select the View Type as ‘Form View Without Buttons’ and also choose Configurable checkbox.

7.     Right click on Views and choose ‘Create Overview Page’ from context menu. Enter the name ‘DetailsOV’.

Page 5: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

8.     Right click on ViewArea ‘OverviewPage’ and then choose ‘Add View’ to add ‘Details’ View into it. Then choose the ‘Details’ view from search help and press ‘Enter’ key.

9.     As shown below the ‘Details’ view will appear under the Overview Page ‘DetailsOV’ (ViewArea OverviewPage). Then Click on ‘SAVE’ button.

Page 6: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

10.  Go to the Configuration tab of View ZRAK_ORDERSRCH/Details. Click on EDIT button and then choose the fields from available fields and then click on ‘Save’ button.

11.  Add the OverviewPage ZRAK_ORDERSRCH/DetailsOV into Window ZRAK_ORDERSRCH/MainWindow.

Note: If you don’t assign View ZRAK_ORDERSRCH/DetailsOV to Window ZRAK_ORDERSRCH/MainWindow (default) then, you won’t see the available views to configure it in Overview Page as described below.

12.  Go to Configuration tab of OverviewPage ViewSet ZRAK_ORDERSRCH/DetailsOV. Click on EDIT button; choose ‘Overview Page’ radio button and Continue.

Page 7: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

13.  As shown below move the ‘Details’ view from Available Assignment Blocks to Displayed Assignment Blocks. Enter the Title as ‘Details’.

14.  Go to View ZRAK_ORDERSRCH/Result. Define the new Outbound Plug ‘TODetails’.

15.  New method OP_TODETAILS will appear as shown below under the node Outbound Plugs.

Page 8: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

16.  Open the Runtime Repository Editor. Create Navigational Link from Result list to Details Overview Page.

17.  Enter the Navigational Link ID ‘TODetails’. As shown below choose the Source Details (View ZRAK_ORDERSRCH/Result, Outbound Plug TODETAILS) and the Target Details (ViewZRAK_ORDERSRCH/DetailsOV, Inbound Plug DEFAULT).

18.  The Navigation Link would appear as shown below.

19.  Go to View ZRAK_ORDERSRCH/Result. Create New Event ‘SELECTION’.

Page 9: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

20.  The event handler method EH_ONSELECTION would appear as shown below.

21.  Call the outbound plug method OP_TODETAILS into event handler method EH_ONSELECTION.

22.  Pass the navigational link name ‘TODETAILS’ as outbound plug name for navigation from View Manager.

23.  The Navigation from Result list to Details OverviewPage is ready to use. Test the Component.

Search the one order object. E,g, 5000000. Hover the cursor in Transaction Number, You would see the tool tip text ‘Click to see the details’. Click on the Hyperlink.

Page 10: Advanced Search Component for OneOrder Objects in SAP CRM 7 Part 2

24.  The Details would appear into new Overviewpage as shown below.