cancel
Showing results for 
Search instead for 
Did you mean: 

How to add standard fields ( ID + Descr ) to BP search result?

Former Member
0 Kudos

Hi,

I`m trying to add 2 standard fields to search result table.

Some technical info:

Component: BP_HEAD_SEARCH

View: MainSearchResult

I need to include fields:

Design Layer

UI Component: BP_HEAD

View: BP_HEAD/AccountDetails

Context mode: MARKETING

Attribute: CLASSIFIC_TEXT

UI Component: BP_HEAD

View: BP_HEAD/AccountDetails

Context mode: MARKETING

Attribute: STRUCT.CLASSIFIC

My approach was to enhance class " BP_HEAD__MAINSEARCHRES_CN00 " and add custom methods.

First one is:

method GET_ZZRATINGID.

     Data: current TYPE REF TO if_bol_bo_property_access.
   Data: lr_ent type ref to cl_crm_bol_entity.

   if iterator is bound.
     current = iterator->get_current( ).
   else.
     current = collection_wrapper->get_current( ).
   endif.

   lr_ent ?= current.
   lr_ent = lr_ent->get_related_entity( iv_relation_name = 'BuilMarketingRel' ).
   check lr_ent is bound.
   value = lr_ent->get_property_as_string( iv_attr_name = 'CLASSIFIC' ).    


endmethod.

It is shown in Result tab but there is " ERROR IN METADATA" instead of header.

My problems:

1. How to get rid of "ERROR IN METADATA" and have nice text?

2. How to include CLASSIFIC_TEXT?

Creating second method with  iv_attr_name = 'CLASSIFIC_TEXT' doesn`t work...



Any help would be useful.


Moderation: Please follow  and search before postings.

Message was edited by: Andrei Vishnevsky

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Marcin,

Please follow the steps mentioned in this instruction:

SAP CRM: Enhancing the search result view with an extra attribute.

This should solve your issue.

Cheers,

Mark