Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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  The SCN Rules of Engagement and search before postings.

Message was edited by: Andrei Vishnevsky

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question