cancel
Showing results for 
Search instead for 
Did you mean: 

Search Option for Custom Field..

Former Member
0 Kudos

Hi Experts,

I have a requirement, wherein i need create & maintain a new custom field say for e.g. End User, which i have created & maintained in CRM 7.0

Now, i need to provide a search criteria for this field, exactly similar to the one which we have for Prospect in the opportunity creation screen.

I would really appreciate if someone can help me in achieving this.

Thanks & Regards,

Accepted Solutions (1)

Accepted Solutions (1)

stevejonathan_tirtha
Active Participant
0 Kudos

Hi,

since CRM 7.0 we have introduced a new tool named Application Enhancement Tool to enable user creating new fields from WebUI with additional properties like search/result enabled, etc.

Please see following for more details:

/people/tzanko.stefanov2/blog/2008/11/18/application-enhancement-tool-creating-and-reusing-custom-fields-with-crm-70-part-1-of-2

http://help.sap.com/saphelp_crm70/helpdata/EN/20/b0f4f819e844df9f47bc9c70c795f4/frameset.htm

Please do not hesitate to post your question in this forum or in CRM 7.0 forum.

For more details of the Application Enhancement Tool.

Regards,

Steve

Former Member
0 Kudos

Thanks Steve, appreciate your quick response & guidence.

But, my requirement is, i need to give exactly the same search option which we have for Prospect "search" in Opportunity Creation screen to the custom field "End User".

i can see in AET, while creating a new field, we have 2 options like Search Table & Search Help. In that i am unable to find the relevant [standard pacakge], which will give me a search option, through which i can provide search option similar to one we have for searching prospect.

I would appreciate if you can help me in this.

Thanks & Regards,

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

You need to do some development to add this search help to your field. You may try the following steps.

1. In the runtime repository, add the component and search help window as a component usage.

2. Create an outbound plug in your view to call the search help window using the component usage similar to this.

DATA: lv_partner_title TYPE string.
  lv_partner_title = cl_crm_uiu_ro_shlp_util=>get_partner_title( ).
  f4_popup = comp_controller->window_manager->create_popup(
  iv_interface_view_name = cl_crm_uiu_ro_shlp_util=>gc_partner_window                  "'SearchHelpWindow'
  iv_usage_name = cl_crm_uiu_ro_shlp_util=>gc_partner_usage                            "'BP_HEAD_SEARCH'
  iv_title = lv_partner_title ).
  f4_popup->set_on_close_event( iv_view = me iv_event_name = cl_crm_uiu_ro_shlp_util=>gc_partner_close_event ).  "'SEL_PARTNER'
  f4_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
  f4_popup->open( ).
  DATA: ls_map          TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping.

  CLEAR gt_f4_map.
  ls_map-context_attr = 'EC_PARTNER_I'.
  ls_map-f4_attr = 'BP_NUMBER'.
  APPEND ls_map TO gt_f4_map.
 

3. Create the GET_V method of the attribute and insert the code as follows

CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_navdescr
   EXPORTING
     iv_outbound_plug = 'OP_F4_BR_PARTNER_I'.

4. Check the coding in the view you are trying to refer and proceed as per that.

Regards

Prasenjit

Former Member
0 Kudos

Thanks Steve & Prasenjit for the detailed response.

I will try to execute as suggested. Is there any way, i can make this field to enter free text. The scenario here is, if the USER does not find the prospect in the system, he should be able to key in the text in that partciular field. I know, we can create the Prospect in the system, but this what the requirement is.

Appreciate, if any one of you can suggest me on this.

k

Thanks & regards,

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

If this is an F4 help then the user would have option to enter the data into the field. You do not need to worry about it.

Regards

Prasenjit

Answers (3)

Answers (3)

Former Member
0 Kudos

Issue resolved, thanks Steve & Prasenjit

Former Member
0 Kudos

Hi Steve,

Appreciate if you can suggest the solution on this.

Thanks,

Rajiv

stevejonathan_tirtha
Active Participant
0 Kudos

Hi,

I looked into Opportunity Application and opened the Prospect F4 Help.

This F4 Help opens a BP search page. This field does not use any Check Table or Search Help which is defined DDIC.

What you can do is following:

1. Enable the expert mode in the AET Overview Page -> this will enable you to define a data element.

2. Create a new custom field

3. Select the part Partner in the Selection Part popup. This selection will create your new custom field in the BTPartner BOL object, where you find the Prospect field as well. This is only my assumption, when you want to define the field on the same BOL object like the Prospect field.

3. Use the data element CRMT_PARTNER_NO, which is the data element used for Prospect.

4. Save and generate the custom field

After that enhance the UI you want to change using the Enhancement Set in Component Workbench.

1. Find the view and the context node where you define. This is my assumption from your requirement:

Component/View: BT111H_OPPT/Details

Context Node : BTPARTNERPROSPECT (This related to the part you select in the previous step)

2. After you find the context node class, enhance this context node and implement V-Getter and P-Getter for your new custom field. You might need to install this note 1316083 in order to enable the Getter and Setter generation from component workbench.

3. You can see example implementation of V-Getter and P-Getter from the PARTNERNO.

I hope this will help you further.

Regards,

Steve

Former Member
0 Kudos

Hi Steve,

Sorry for delay in giving you an update on the steps you suggested.

Now, i have the same search criteria for my Custom Field similar to the one we have for standard Prospect Serach Field. But the issue is, whenever i search & select the desired customer, it doesnt sit in the Custom Field, but gets updated in the standard field.

Appreciate if you can suggest a fix on this.

Thanks & Regards,

Rajiv