Skip to Content
author's profile photo Former Member
Former Member

Account Search Requirement

Hi,

I am working on a requirement wherein I need to create new custom fields in result view of Account search page.

To populate the values in newly created field, I have written the logic in DO_PREPARE_OUTPUT of BP_HEAD_SEARCH component and view

BP_HEAD_SEARCH/MainSearchResult . but in the code current entity is not storing the values of new fileds in the end.

Kindly help in this regard.Below is the code :

method do_prepare_output.
CALL METHOD SUPER->DO_PREPARE_OUTPUT
EXPORTING
IV_FIRST_TIME = ABAP_FALSE
.

data: current TYPE REF TO if_bol_bo_property_access,
lr_current TYPE REF TO cl_crm_bol_entity,
lr_col TYPE REF TO if_bol_entity_col,
lr_relid TYPE REF TO cl_crm_bol_entity,
idnumber type string,
idtype type string,
lv_size type SYTABIX.

current = me->typed_context->result->collection_wrapper->get_current( ).
lr_current ?= current.

IF lr_current IS BOUND.
lr_current->get_related_entities( EXPORTING iv_relation_name = 'BuilIdentificationRel' RECEIVING rv_result = lr_col ).
ENDIF.

IF lr_col IS BOUND.
lr_relid = lr_col->GET_first( ).
ENDIF.


If lr_relid is bound.
lr_relid->get_property_as_string( EXPORTING iv_attr_name = 'IDENTIFICATIONNUMBER' RECEIVING rv_result = idnumber ).
lr_relid->get_property_as_string( EXPORTING iv_attr_name = 'IDENTIFICATIONTYPE' RECEIVING rv_result = idtype ).

CALL METHOD LR_CURRENT->IF_BOL_BO_PROPERTY_ACCESS~SET_PROPERTY
EXPORTING
IV_ATTR_NAME = 'ZZAFLD000007'
IV_VALUE = idtype.

CALL METHOD LR_CURRENT->IF_BOL_BO_PROPERTY_ACCESS~SET_PROPERTY
EXPORTING
IV_ATTR_NAME = 'ZEXTID1'
IV_VALUE = idnumber.

endif.
endmethod.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2012 at 05:28 AM

    Hi Anubhuti,

    Try to comment the super class and see the result .

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.