cancel
Showing results for 
Search instead for 
Did you mean: 

Adjust Search Help for Ad Hoc Agent & Adjust Search Help for Reviewers

0 Kudos

Has any one been successful to add a Z search help (as Search Help for Ad Hoc Agents (Approval Process) or Reviewer) to provide a custom user list (i.e. from a z table) instead of manipulating the CT_RESULTS provided by the standard search  '/SAPSRM/BBP_BUPA_EMPLOYEE'? If yes, please provide the solution. Thx. 

Accepted Solutions (1)

Accepted Solutions (1)

ashish_shah
Contributor
0 Kudos

Hi Wang,

You have two options to achieve this functionality:

  1. You can provide custom search help for Adhoc Agents/reviewer
  2. You can implement a BADI to validate if the selected agent is valid or not.

Custom search help -->

You need to identify the component and its associated node and attribute being used ,

Create a new Z search help, 

then replace the standard search help with new one using following code:


  DATA lo_nd_agent TYPE REF TO if_wd_context_node.

  DATA lr_node_info TYPE REF TO if_wd_context_node_info.

  DATA lo_el_agent TYPE REF TO if_wd_context_element.

* navigate from <CONTEXT> to <AGENT> via lead selection

  lo_nd_agent = wd_context->path_get_node( path = `<Node name>` ).

  lr_node_info = lo_nd_agent->get_node_info( ).

  CALL METHOD lr_node_info->set_attribute_value_help

    EXPORTING

      name            = '<Attr name>'

      value_help_mode = lr_node_info->c_value_help_mode-ddic

      value_help      = '<Z search help name>'.

BADi to validate added agent: /SAPSRM/BD_WF_ADHOC_AGENT_F4 is a BADI that can be used to validate user added AD HOc agents.

Let me know if you need more information.

Regards,

Ashish

0 Kudos

Thanks Ashish,

I used the second option to get a valid short list of agents (z table and some checking) .

Did not try first suggestion.


ashish_shah
Contributor
0 Kudos

Hi Wang,

If the problem is resolved, please mark thread as answered and reward useful answers as per rules of engagement.

Regards,

Ashish

Answers (0)