cancel
Showing results for 
Search instead for 
Did you mean: 

manipulate / change query result object

Former Member
0 Kudos
411

Hi experts,

I've enhanced my Activity Search and the result set to. BUT, my custom fields of the result set are still empty. I don't want to fill the custom fields via the GET_-Methods because then it is not possible to sort by my custom fields. But I have to sort by them.

I tried to manipulate my result object in eh_onsearch event. if you try lr_entity->set_properties( ls_attributes ) the properties will not be updated, because by definition, it is not allowed to manipulate result objects.

Is there a chance to update them anyway.

Thanks and regards,

Sebastian

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Sebastian,

Please let me know how did you solve your problem. I have the same requirement.

Regards

Raj

Former Member
0 Kudos

Thanks for your reply, but in this thread nothing is mentioned about the search result list and a way to fill my custom fields into context node.

Former Member
0 Kudos

Hi Sebastian,

I would strongly recommend using AET. Its a wizard you don't have to take much pains. It has option to enhance your search and result views at a same time.

Please follow link provided by Rajni and you should be good.

Otherwise, steps involved:

1. Append query structure

2. Enhance BTIL class of search object to add logic for search using your field.

3. Replacing standard class with custom class.

5. In result view redefining GET_TABLE_LINE_SAMPLE method to add your custom field in it.

6. Adding custom field in one of the context nodes of result view and then may be adjusting design layer.

7 Finally displaying your field in result list in config.

Regards,

BJ

former_member193352
Active Contributor
0 Kudos

Dear Sebastin,

Your approach looks fine to me so far. You just need to do additional steps in order to make the search work. Please look into the following thread where this similar problem has been answered.

Thanks

Vishal

Former Member
0 Kudos

Hi all,

thanks for your answers. I appended the structure crmst_query_act_btil.

So any solution for this?

Thanks and regards,

Sebastian

Edited by: Sebastian Wilhelm on Aug 25, 2011 8:41 AM

Do you know which BAdI I have to implement?

Former Member
0 Kudos

Hi,

No need to directly enhance the structure its better to use AET.

I think you want to add a custom attribute to activity. The activity_h and activity_i parts are available via AET.

while creating a field via AET you can make it relvant for search and result set, no need to code anything.For adding field via AET please see the below link.

[http://help.sap.com/saphelp_crm700_ehp01/helpdata/en/01/320bd270e84f419953906fe8050ed1/frameset.htm]

Thanks,

Rajini.

Former Member
0 Kudos

Hi Sebastian

What is the approach you followed to create the custom fields (AET or appending fields to strcutures) if you use the AET pls check the below things

1) while creating are you selected that custom fields should be extended to both search and reuslt structures.

2) please check the generated custom fields info in Transaction Genil_model_browser under folder advanced search query the field should extend in Advanced search structure and search result structure.

3) use the right custom fields on the correct configuration.

in the above scenario the fields will be automatically filled with data

if you extend the BOL structures the with the customfield then you have to implement the necessary badi to fill the custom fields.

Thanks & Regards

Raj

Former Member
0 Kudos

Hi,

Did you add a custom field using AET? or you are trying to add a field which already exists in SAP CRM?

If you are adding the field using AET then the values should show up when you add correct field in configuration (provided data is there for that field) in later case please go through my comments in below post:

Regards,

BJ