cancel
Showing results for 
Search instead for 
Did you mean: 

CRM Web UI - Get displayed columns of search result list

axel_brke3
Explorer
0 Kudos

Dear community,

I would like to change a field value in a specific field of a search result depending on the columns that are displayed to the user. This is a requirement in order anonymize names and Ticket IDs in some sensitive reports.

My idea is: Whenever the user triggers search in Web UI and displays the sensitive field, the getter should check if the user currently has the column "Current Processor" and "ID" displayed. If this is the case, the getter returns the value "Not allowed" or something similar.

Is this possible in CRM Web UI?

Thanks a lot!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Axel,

you can access the xml configuration of the displayed columns in the method DO_PERPARE_OUTPUT of the implementation class of your search result view as follows:

  DATA: lv_xml TYPE bsp_dlc_xml.
  IF me->configuration_descr IS BOUND.
    lv_xml = me->configuration_descr->get_config_data( ).
  ENDIF.

Then you could change the search result by changing the collection of STYPED_CONTEXT->SEARCHRESULT.

Best Regards,

Christoph

Answers (2)

Answers (2)

axel_brke3
Explorer
0 Kudos

Thanks a lot for your answers! This was really helpful. I knew about the configuration description, but wasn't aware it's an attribute in the IMPL class.

I ended up using the XML and parsing it as I wanted to implement this in the Getter Method of the field.

Former Member
0 Kudos

Hi

You can achieve this using Table iterator.

In order to read the currently displayed column in search result page, refer to chtmlb:configTable Element Handler Class CL_CHTMLB_CONFIG_TABLE and method GET_COLUMN_DEFINITIONS.

Check out how the global table  gt_column_description is handled, which will give you the displayed result structure.

Can't your user personalize the result page? What if the user hides those two fields using personalization?

Regards,

Bharathy