cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out the view that calls a pop-up window?

Former Member
0 Kudos

Hi,

The BP_HEAD_SEARCH component is a pop-up called by several other components (Contact, Activity, etc).

So I need to customize it in according to which view called it (BP_HEAD or BT126H_APPT, for instance). I see OUTER_REP_VIEW attribute, however it has several protected attributes and, some times, it doesn't work because it hasn't parent attribute filled.

Regards,

André

Accepted Solutions (1)

Accepted Solutions (1)

xavier_dehairs2
Active Participant
0 Kudos

Hi, the Search context node attached to the MainSearch view contains reference to entity of type CL_CRM_BOL_DQUERY_SERVICE. In this class, there is a method called GET_NAME which returns the query name. This could help you indentifying the context in which the popup is running.

Regards,

Xavier

Former Member
0 Kudos

Xavier,

However the value is always BuilHeaderAdvancedSearch.

Let me explain again:

Several views around the system use the BP_HEAD_SEARCH component to search up a partner. The most of them use the SearchHelp view and the configuration is object and subobject as . The component usage is always CUAccountValueHelp.

For example, in the Activity (company field) or in the Organization - Relationship assignment block, if you use the pop-up to search a partner, the configuration is the same.

But I need to know who called the pop-up: Activity module (BT126H_APPT) or Organization - Relationship (BPData)?

Regards,

André

suchita_phulkar
Active Contributor
0 Kudos

Hi ,

I dont have idea about the std. attribute available which could let you know the name of caller view, but there is a logical way to around this.

1. in the context node class of search node in BP_HEAD_SEARCH, define a public attribute say zcaller_view.

2. In the event handler of the caller view ( where pop_up is created ) , you can retrive this node as

lv_cn = gv_popup->get_context_node( 'SEARCH' ).

3. Set the attribute as

lv_cn->zcaller_view = 'the view name here' .

Now , you can always retrieve this attribute in the necessary event in BP_HEAD_SEARCH

Thanks and regards

Suchita

Former Member
0 Kudos

Suchita,

Great ideia!!!!

Thanks a lot.

André

Answers (0)