cancel
Showing results for 
Search instead for 
Did you mean: 

BuilHeader related entities - returns just 100

mike_mcinerney
Participant
0 Kudos

I have a partner based component based on BP_DATA ( with runtime model BP_APPL ) .

I have a custom view that lists the number of activites that are associated with the partner.

While prepping my output (in on_new_focus) I create a collection as:

lref_main_collection ?= lref_main_entity->get_related_entities( iv_relation_name = 'BuilActivityRel' ).

( lref_main_entity is a BuilHeader )

I know that there are about 250 related entities, but my collection truncates at 100.

How can I adjust this?

View Entire Topic
Former Member
0 Kudos

Hi Mike,

Which version of CRM system are you using ??

As of CRM 7.0 and below , it should fetch all the bol relations. There is no filter option to fetch related entities ( which is now present in 7.0 Ehp1).

Try reading the relation using tcode GENIL_BOL_BROWSER by loading BP query and fetch the Activity Relations.

Regards,

Nithish

sridhar_s7
Explorer
0 Kudos

Hello Mike,

The search results will be defaulted to 100.

CL_BUPA_IL_ACTIVITY_COMP->GET_SELECTION_PARAMS.

However this can overwritten by implementing the badi CRM_BP_UIU_BT , to change

selection param.

Regards

Sridhar

mike_mcinerney
Participant
0 Kudos

Nithish,

We are at SAP CRM ABAP 7.0 .  ( I should have mention that).

As mentioned above, the filter does not seem to work.  It would have been my preferred solution.

The BADI solution mentioned below seems the most viable.

Thanks...

...Mike

Former Member
0 Kudos

Mike ,

Have you tried checking in Genil_bol_browser for the mentioned relationship . You can give it a try and figure out exact problem why its limiting to 100.

Regards,

Nithish

mike_mcinerney
Participant
0 Kudos

Sridhar,

Thanks - a number of folks suggested what would have been my preferred solution - to use a maxhit enabled filter, but for some reason, that did not work for me.  That was my preferred route, as I had much more conditional control over when it was enacted.

I have coded up your suggested BADI implementation, and yes, it does work for me - my only concern is that I am limitted in filter criteria.

I'm not closing this yet, but will probably go with in the direction you have suggested.

Thanks...

...Mike

Former Member
0 Kudos

Hi Mike,

Your system is CRM Ehp1 , where the actual filters are added in method get_related_entities_by_filter . Not all bol relations can use this filter . You can check in tcode genil_model_editor and figure out whether filter class has been assigned to any relation or not.

Coming to using filter , you need to activate CRM_BP_SFWS_ATTRIBUTE_SETS switch ( tcode swf1) assigned to business function crm_inf_1 which needs to turn on ( tcode swf5). then it will take filter into account . Here we have to pass all the selection parameters by ourselves ( even the partner number, partner function,etc) and we can fix the MAX_HITS .,hen it will work .

Be careful while activating this business function CRM_INF_1, its irreversible .

At the end , I guess the best solution is to create a badi implementation of CRM_BP_UIU_BT which was technique used before ehp1 .

Regards,

Nithish

mike_mcinerney
Participant
0 Kudos

All,

So, this was good discussion.

In the end, we implemented the suggested BADI for this piece of work.

In the future, I could see us activating the suggested switch and using the gett_related_entities_by_filter.

Thanks to all...  

...Mike