This small blog explains how to search for Interaction Center’s inbox items which are not assigned to any employee in S/4HANA for CM.

Figure%201%20-%20Final%20result

Figure 1 – Final result

In CRM 7.0, this search can be performed using the search operator ‘Is empty’ (See also following OSS note: 2986918 – How to search for inbox items which are not assigned to any employee).

In S/4HANA for CM the Inbox search operator ‘Is empty’ is not available (anymore) and the above OSS note is not valid. The search on empty Employee Responsible is (currently) not part of the design in S/4.

So here is a small trick to implement this search.

Remark: Of course, another option could be to filter the result list on empty ‘Employee Responsible’ after the search has been performed.

Realization

Customizing

Define a new Quick Search (Tx SM30 – View: CRMV_AUI_QUICKS)

Figure%202%20-%20Quick%20Search

Figure 2 – Quick Search

Use a “dummy” Description value (in this case ‘ZNOEMPLOYEE’) to uniquely identify the quick search

Workbench

Inbox Badi

Create a custom implementation of the Inbox Badi (Tx SE18 – Badi name: CRM_IC_INBOX_BADI)

Adjust method IF_EX_CRM_IC_INBOX_BADI~BEFORE_SEARCH to remove the “dummy” Description and add a “dummy” Employee Assigned value:

  METHOD if_ex_crm_ic_inbox_badi~before_search.

   DATA: ls_selection_parameters TYPE genilt_selection_parameter.CASE i_inbox_map_item_type.
      WHEN 'ONEORDER'.
        READ TABLE c_select_options WITH KEY attr_name = 'DESCRIPTION' low = 'ZNOEMPLOYEE' ASSIGNING <ls_selection_parameters>.
        IF sy-subrc = 0 AND  <ls_selection_parameters> IS ASSIGNED.
          DELETE c_select_options WHERE attr_name = 'DESCRIPTION'.
          ls_selection_parameters-attr_name = 'EMPLOYEEASSIGNED'.
          ls_selection_parameters-sign = 'I'.
          ls_selection_parameters-option = 'EQ'.
          ls_selection_parameters-low = 'ZNOEMPLOYEE'.
          APPEND ls_selection_parameters TO c_select_options.
        ENDIF.ENDMETHOD.

 

Define Custom Handler Class for Inbox Query

Custom%20Handler%20Class

Figure 3 – Custom Handler Class

Create new Custom Class ZCL_CRM_QUERYLEANAUI_RUN_BTIL child of standard class CL_CRM_QUERYLEANAUI_RUN_BTIL.

Redefine method READ_BUSINESS_TRANSACTIONS_S4 and add the code between comments in the ‘WHEN ‘EMPLOYEEASSIGNED’ statement. This clears the “dummy” Employee Assigned value and allows the search on inbox items not assigned to any employee.

WHEN 'EMPLOYEEASSIGNED'.
       DATA: lt_assignedto_build_range TYPE RANGE OF crmt_partner_no,
             lt_assignedto_range       TYPE RANGE OF crmt_partner_no.
              IF <fs_parameter> IS NOT INITIAL.
                CALL METHOD get_range_adv
                  EXPORTING
                    is_param           = <fs_parameter>
                    iv_advanced_search = iv_advanced_search
                  IMPORTING
                    et_range           = lt_assignedto_build_range.

* My teams unassigned tickets (searh on employee responsible empty) - start
                LOOP AT lt_assignedto_build_range ASSIGNING FIELD-SYMBOL(<ls_assignedto>).
                  IF <ls_assignedto>-low = 'ZNOEMPLOYEE'.
                    <ls_assignedto>-low = ''.
                  ENDIF.
                ENDLOOP.
* My teams unassigned tickets (searh on employee responsible empty) - end

                APPEND LINES OF lt_assignedto_build_range TO lt_assignedto_range.
              ENDIF.

 

Conclusion: As long as this search is not available in standard, this is a small trick to perform it

 

Please share feedback in a comment

Ask questions about CRM WebClient UI

Read other CRM WebClient UI blog posts

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x