Skip to Content
author's profile photo Former Member
Former Member

Query on CRM Inbox Search

Hi All,

This is with respect to Inbox Search for CRM 2005.

We have customized "Assigned To" field so as to show all the employees under Call Center.

Following is the code to do this

DATA: lt_org_unit_list TYPE TABLE OF objec,

ls_org_unit_list TYPE objec,

lv_org_objid TYPE hrobjid,

ls_org_units TYPE crmst_aui_org_unit,

lv_org_unit TYPE objektid,

lv_key TYPE valpos,

ls_empl_ass TYPE crmst_aui_domvalues_dd,

lt_p1000 TYPE TABLE OF p1000,

lv_p1000 TYPE p1000,

lv_partner_guid TYPE bu_partner_guid,

lv_plan_version TYPE plvar,

lv_bp TYPE bu_partner,

lv_lines TYPE i,

lv_org_otype TYPE otype,

lv_call_center_id TYPE objec-stext.

  • Append Groups of the Agent

  • 1. Step: Get all assigned OrgUnits

CALL FUNCTION 'RH_STRUC_GET'

EXPORTING

act_otype = 'O'

act_objid = '50000607'

act_wegid = 'O-S-CP'

TABLES

result_objec = lt_org_unit_list

EXCEPTIONS

OTHERS = 3.

CHECK sy-subrc = 0.

DELETE lt_org_unit_list WHERE stext <> 'Call Center'.

LOOP AT lt_org_unit_list INTO ls_org_unit_list.

lv_call_center_id = ls_org_unit_list-objid.

ENDLOOP.

CLEAR: lt_org_unit_list,ls_org_unit_list.

  • Append Groups of the Agent

  • 1. Step: Get all assigned OrgUnits

CALL FUNCTION 'RH_STRUC_GET'

EXPORTING

act_otype = 'O'

act_objid = lv_call_center_id

act_wegid = 'OO-S-BP'

TABLES

result_objec = lt_org_unit_list

EXCEPTIONS

OTHERS = 3.

CHECK sy-subrc = 0.

DELETE lt_org_unit_list WHERE otype <> 'BP'.

lv_key = '0004'.

LOOP AT lt_org_unit_list INTO ls_org_unit_list.

lw_value-valpos = lv_key. "unique sequential number

lw_value-ddtext = ls_org_unit_list-stext.

APPEND lw_value TO c_responsibles.

lw_orgunit-key = lv_key. "reference to group created in c_responsibles

lw_orgunit-otype = ls_org_unit_list-otype.

lw_orgunit-objid = ls_org_unit_list-objid.

lw_orgunit-stext = ls_org_unit_list-stext.

APPEND lw_orgunit TO c_org_units.

lv_key = lv_key + 1.

ENDLOOP.

The problem is when I am selecting an employee from the drop-down, it does not show the correct results i.e. it does not show the records for that employee, instead it populates all the records for that Call Center.

Can someone please let me know what am I missing.

Thanks,

Nikhil

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 12, 2011 at 01:36 PM

    Solved myself

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.