cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Limint the search in BP_HEAD_SEARCH popup to a specific role - BBP000

enaskova
Explorer
0 Likes
423

Hello, I've enhanced SRQM_INCIDENT_S component and added an BP search. But I have to limit it to only Role BBP000. How do I pass the Role that I want to limit the search on?

In the EH_ON_SELECT_PARTNER a window popup is called from the BP_HEAD_SEARCH:

partnervaluehelp_popup = comp_controller->window_manager->create_popup( iv_interface_view_name = 'SearchHelpWindow' iv_usage_name = 'CUPartnerValueHelp' iv_title = lv_title ).

But I want to limit it only to certain roles because fo security reasons.

Could you please share the piece of code if you know how to do that?

I'm looking at a "no employee " filter...

cl_crm_uiu_bp_partner_popup=>account_f4_no_emp_filter( partnervaluehelp_popup ).

But how do we exclude others?

Thank you

Accepted Solutions (0)

Answers (3)

Answers (3)

enaskova
Explorer
0 Likes

I solved my problem by implementing GET_DQUERY_DEFINITIONS in BP_HEAD_SEARCH.

I added two lines code that deleted all the values from the drop down but the value I needed.

WHEN 'ROLE'.

delete <rs_result>-ddlb_options where value <> 'Vendor'.

The search can only be done on vendor now.

enaskova
Explorer
0 Likes

Not exactly what I'm looking for.

I successfully populate the role with the value I want just using the code bellow in the event.

CALL METHOD CL_CRM_UIU_BP_PARTNER_POPUP=>ADD_OR_REPLACE_PARAM EXPORTING IR_POPUP = partnervaluehelp_popup IV_NODE_NAME = 'SEARCH' IV_ATTR_NAME = 'ROLE' IV_SIGN = 'I' IV_OPTION = 'EQ' IV_LOW = 'BBP000'.

But since it's a drop down and the Role fields is wide opened, the user can change it to all and see the data.

I need to code it so one of these will happen:

1. the role field will be grayed out so the user can't change it to a different role

2. brings only role = vendors (which I want) even though the users has selected something else from the drop down.

3. there is only Vendor selection in the drop down.

NTeunckens
Active Contributor
0 Likes

See the following Reference : Old thread on 'ROLE' : link